class Github::Client::Activity::Events

Public Instance Methods

issue(*args) { |el| ... } click to toggle source

List all issue events for a given repository

@example

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

@example

github.activity.events.issue user: 'user-name', repo: 'repo-name'
github.activity.events.issue user: 'user-name', repo: 'repo-name' { |event| ... }

@api public

# File lib/github_api/client/activity/events.rb, line 61
def issue(*args)
  arguments(args, required: [:user, :repo])

  response = get_request("/repos/#{arguments.user}/#{arguments.repo}/issues/events", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
issue_events(*args)
Alias for: issue
issues(*args)
Alias for: issue
list_issue_events(*args)
Alias for: issue
list_org_events(*args)
Alias for: org
list_organization_events(*args)
Alias for: org
list_orgs(*args)
Alias for: org
list_public(*args)
Alias for: public
list_public_events(*args)
Alias for: public
list_repo_network_events(*args)
Alias for: network
list_repository_events(*args)
Alias for: repository
list_repository_network_events(*args)
Alias for: network
list_user_org(*args)
Alias for: user_org
list_user_org_events(*args)
Alias for: user_org
list_user_organization_events(*args)
Alias for: user_org
list_user_performed(*args)
Alias for: performed
list_user_received(*args)
Alias for: received
network(*args) { |el| ... } click to toggle source

List all public events for a network of repositories

@see developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories

@example

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

@example

github.activity.events.network user: 'user-name', repo: 'repo-name'
github.activity.events.network user: 'user-name', repo: 'repo-name' { |event| ... }

@api public

# File lib/github_api/client/activity/events.rb, line 86
def network(*args)
  arguments(args, required: [:user, :repo])

  response = get_request("/networks/#{arguments.user}/#{arguments.repo}/events", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
org(*args) { |el| ... } click to toggle source

List all public events for an organization

@see developer.github.com/v3/activity/events/#list-public-events-for-an-organization

@example

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

@example

github.activity.events.org name: 'org-name'
github.activity.events.org name: 'org-name' { |event| ... }

@api public

# File lib/github_api/client/activity/events.rb, line 112
def org(*args)
  arguments(args, required: [:name])

  response = get_request("/orgs/#{arguments.name}/events", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
organization(*args)
Alias for: org
performed(*args) { |el| ... } click to toggle source

List all events that a user has performed

@see developer.github.com/v3/activity/events/#list-events-performed-by-a-user

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

@example

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

List all public events that a user has performed

@see developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user

@example

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

@api public

# File lib/github_api/client/activity/events.rb, line 185
def performed(*args)
  arguments(args, required: [:user])
  params = arguments.params

  public_events = if params['public']
    params.delete('public')
    '/public'
  end

  response = get_request("/users/#{arguments.user}/events#{public_events}", params)
  return response unless block_given?
  response.each { |el| yield el }
end
public(*args) { |el| ... } click to toggle source

List all public events

@see developer.github.com/v3/activity/events/#list-public-events

@example

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

@api public

# File lib/github_api/client/activity/events.rb, line 14
def public(*args)
  arguments(args)

  response = get_request("/events", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
public_events(*args)
Alias for: public
received(*args) { |el| ... } click to toggle source

List all events that a user has received

@see developer.github.com/v3/activity/events/#list-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.

@example

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

List all public events that a user has received

@see developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received

@example

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

@api public

# File lib/github_api/client/activity/events.rb, line 147
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
Also aliased as: user_received, list_user_received
repo_events(*args)
Alias for: repository
repo_network(*args)
Alias for: network
repos(*args)
Alias for: repository
repository(*args) { |el| ... } click to toggle source

List all repository events for a given user

@example

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

@example

github.activity.events.repository user: 'user-name', repo: 'repo-name'
github.activity.events.repository user: 'user-name', repo: 'repo-name' {|event| ... }

@api public

# File lib/github_api/client/activity/events.rb, line 37
def repository(*args)
  arguments(args, required: [:user, :repo])

  response = get_request("/repos/#{arguments.user}/#{arguments.repo}/events", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
repository_events(*args)
Alias for: repository
repository_network(*args)
Alias for: network
user_org(*args) { |el| ... } click to toggle source

List all events for an organization

@see developer.github.com/v3/activity/events/#list-events-for-an-organization

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

@example

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

@example

github.activity.events.user_org user: 'user-name', name: 'org-name'
github.activity.events.user_org user: 'user-name', name: 'org-name' {|event| ...}

@api public

# File lib/github_api/client/activity/events.rb, line 218
def user_org(*args)
  arguments(args, required: [:user, :name])

  response = get_request("/users/#{arguments.user}/events/orgs/#{arguments.name}", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
user_organization(*args)
Alias for: user_org
user_performed(*args)
Alias for: performed
user_received(*args)
Alias for: received