class Github::Events

def initialize(options = {})

Creates new Gists API
def initialize(options = {})
  super(options)
end

def issue(user_name=nil, repo_name=nil, 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=nil, repo_name=nil, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _normalize_params_keys(params)
  response = get("/repos/#{user}/#{repo}/issues/events", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def network(user_name=nil, repo_name=nil, 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=nil, repo_name=nil, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _normalize_params_keys(params)
  response = get("/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={})
  _validate_presence_of org_name
  _normalize_params_keys(params)
  response = get("/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={})
  _validate_presence_of user_name
  _normalize_params_keys(params)
  public_events = if params['public']
    params.delete('public')
    '/public'
  end
  response = get("/users/#{user_name}/events#{public_events}", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def public(params={})


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

List all public events
def public(params={})
  _normalize_params_keys(params)
  response = get("/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={})
  _validate_presence_of user_name
  _normalize_params_keys(params)
  public_events = if params['public']
    params.delete('public')
    '/public'
  end
  response = get("/users/#{user_name}/received_events#{public_events}", params)
  return response unless block_given?
  response.each { |el| yield el }
end

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


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

List all repository events for a given user
def repository(user_name=nil, repo_name=nil, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _normalize_params_keys(params)
  response = get("/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={})
  _validate_presence_of user_name, org_name
  _normalize_params_keys(params)
  response = get("/users/#{user_name}/events/orgs/#{org_name}", params)
  return response unless block_given?
  response.each { |el| yield el }
end