Method: Github::Client::Activity::Events#received
- Defined in:
- lib/github_api/client/activity/events.rb
#received(*args) ⇒ Object Also known as: user_received, list_user_received
List all events that a user has received
These are events that you’ve received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you’ll only see public events.
List all public events that a user has received
148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/github_api/client/activity/events.rb', line 148 def received(*args) arguments(args, required: [:user]) params = arguments.params public_events = if params['public'] params.delete('public') '/public' end response = get_request("/users/#{arguments.user}/received_events#{public_events}", params) return response unless block_given? response.each { |el| yield el } end |