class Github::Activity::Events

def initialize(options = {})

Creates new Activity::Events API
def initialize(options = {})
  super(options)
end

def issue(user_name, repo_name, params={})


github.events.issue 'user-name', 'repo-name' { |event| ... }
github.events.issue 'user-name', 'repo-name'
github = Github.new
= Examples

List all issue events for a given repository
def issue(user_name, repo_name, params={})
  set :user => user_name, :repo => repo_name
  assert_presence_of user, repo
  normalize! params
  response = get_request("/repos/#{user}/#{repo}/issues/events", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def network(user_name, repo_name, params={})


github.events.network 'user-name', 'repo-name' { |event| ... }
github.events.network 'user-name', 'repo-name'
github = Github.new
= Examples

List all public events for a network of repositories
def network(user_name, repo_name, params={})
  set :user => user_name, :repo => repo_name
  assert_presence_of user, repo
  normalize! params
  response = get_request("/networks/#{user}/#{repo}/events", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def org(org_name, params={})


github.events.org 'org-name' { |event| ... }
github.events.org 'org-name'
github = Github.new
= Examples

List all public events for an organization
def org(org_name, params={})
  assert_presence_of org_name
  normalize! params
  response = get_request("/orgs/#{org_name}/events", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def performed(user_name, params={})


github.events.performed 'user-name', :public => true { |event| ... }
github.events.performed 'user-name', :public => true
github = Github.new
= Examples

List all public events that a user has performed

github.events.performed 'user-name' { |event| ... }
github.events.performed 'user-name'
github = Github.new
= Examples

events. Otherwise, you’ll only see public events.
If you are authenticated as the given user, you will see your private

List all events that a user has performed
def performed(user_name, params={})
  assert_presence_of user_name
  normalize! params
  public_events = if params['public']
    params.delete('public')
    '/public'
  end
  response = get_request("/users/#{user_name}/events#{public_events}", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def public(params={})


github.activity.events.public { |event| ... }
github.activity.events.public
github = Github.new
= Examples

List all public events
def public(params={})
  normalize! params
  response = get_request("/events", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def received(user_name, params={})


github.events.received 'user-name', :public => true { |event| ... }
github.events.received 'user-name', :public => true
github = Github.new
= Examples

List all public events that a user has received

github.events.received 'user-name' { |event| ... }
github.events.received 'user-name'
github = Github.new
= Examples

Otherwise, you’ll only see public events.
If you are authenticated as the given user, you will see private events.
These are events that you’ve received by watching repos and following users.

List all events that a user has received
def received(user_name, params={})
  assert_presence_of user_name
  normalize! params
  public_events = if params['public']
    params.delete('public')
    '/public'
  end
  response = get_request("/users/#{user_name}/received_events#{public_events}", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def repository(user_name, repo_name, params={})


github.events.repository 'user-name', 'repo-name' { |event| ... }
github.events.repository 'user-name', 'repo-name'
github = Github.new
= Examples

List all repository events for a given user
def repository(user_name, repo_name, params={})
  set :user => user_name, :repo => repo_name
  assert_presence_of user, repo
  normalize! params
  response = get_request("/repos/#{user}/#{repo}/events", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def user_org(user_name, org_name, params={})


github.events.user_org 'user-name', 'org-name' { |event| ... }
github.events.user_org 'user-name', 'org-name'
github = Github.new
= Examples

as the user to view this.
This is the user’s organization dashboard. You must be authenticated

List all events for an organization
def user_org(user_name, org_name, params={})
  assert_presence_of user_name, org_name
  normalize! params
  response = get_request("/users/#{user_name}/events/orgs/#{org_name}", params)
  return response unless block_given?
  response.each { |el| yield el }
end