Module: Octokit::Client::Events

Included in:
Octokit::Client
Defined in:
lib/octokit/client/events.rb

Instance Method Summary collapse

Instance Method Details

#public_events(options = {}) ⇒ Array

List all public events for GitHub

Examples:

List all pubilc events

Octokit.public_events

Returns:

  • (Array)

    A list of all public events from GitHub

See Also:



10
11
12
# File 'lib/octokit/client/events.rb', line 10

def public_events(options={})
  get("/events", options, 3)
end

#repository_events(repo, options = {}) ⇒ Array

List events for a repository

Examples:

List events for a repository

Octokit.repository_events("sferik/rails_admin")

Parameters:

  • repo (String, Repository, Hash)

    A GitHub repository

Returns:

  • (Array)

    A list of events for a repository

See Also:



31
32
33
# File 'lib/octokit/client/events.rb', line 31

def repository_events(repo, options={})
  get("/repos/#{Repository.new(repo)}/events", options, 3)
end

#user_events(user, options = {}) ⇒ Array

List all user events

Examples:

List all user events

Octokit.user_events("sferik")

Returns:

  • (Array)

    A list of all user events

See Also:



20
21
22
# File 'lib/octokit/client/events.rb', line 20

def user_events(user, options={})
  get("/users/#{user}/events", options, 3)
end