123456789_123456789_123456789_123456789_123456789_

Module: Octokit::Client::Events

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/client/events.rb

Overview

Instance Method Summary

Instance Method Details

#issue_event(repo, number, options = {}) ⇒ Sawyer::Resource

Get information on a single Issue Event

Examples:

Get Event information for ID 3094334 (a pull request was closed)

Octokit.issue_event("octokit/octokit.rb", 3094334)

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • number (Integer)

    Event number

Returns:

  • (Sawyer::Resource)

    A single Event for an Issue

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 146

def issue_event(repo, number, options = {})
  paginate "#{Repository.path repo}/issues/events/#{number}", options
end

#issue_events(repo, number, options = {}) ⇒ Array<Sawyer::Resource>

List events for an Issue

Examples:

List all issues events for issue #38 on octokit/octokit.rb

Octokit.issue_events("octokit/octokit.rb", 38)

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • number (Integer)

    Issue number

Returns:

  • (Array<Sawyer::Resource>)

    Array of events for that issue

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 133

def issue_events(repo, number, options = {})
  paginate "#{Repository.path repo}/issues/#{number}/events", options
end

#organization_events(org, options = {}) ⇒ Array<Sawyer::Resource>

List all events for an organization

Requires authenticated client.

Examples:

List events for the lostisland organization

@client.organization_events("lostisland")

Parameters:

Returns:

  • (Array<Sawyer::Resource>)

    List of all events from a GitHub organization

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 95

def organization_events(org, options = {})
  paginate "users/#{}/events/orgs/#{org}", options
end

#organization_public_events(org, options = {}) ⇒ Array<Sawyer::Resource>

List an organization's public events

Examples:

List public events for GitHub

Octokit.organization_public_events("GitHub")

Parameters:

Returns:

  • (Array<Sawyer::Resource>)

    List of public events from a GitHub organization

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 106

def organization_public_events(org, options = {})
  paginate "#{Organization.path org}/events", options
end

#public_events(options = {}) ⇒ Array<Sawyer::Resource>

List all public events for GitHub

Examples:

List all pubilc events

Octokit.public_events

Returns:

  • (Array<Sawyer::Resource>)

    A list of all public events from GitHub

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 16

def public_events(options = {})
  paginate 'events', options
end

#received_events(user, options = {}) ⇒ Array<Sawyer::Resource>

List events that a user has received

Examples:

List all user received events

Octokit.received_events("sferik")

Parameters:

  • user (Integer, String)

    GitHub user login or id

Returns:

  • (Array<Sawyer::Resource>)

    A list of all user received events

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 49

def received_events(user, options = {})
  paginate "#{User.path user}/received_events", options
end

#received_public_events(user, options = {}) ⇒ Array<Sawyer::Resource>

List public events a user has received

Examples:

List public user received events

Octokit.received_public_events("sferik")

Parameters:

  • user (Integer, String)

    GitHub user login or id

Returns:

  • (Array<Sawyer::Resource>)

    A list of public user received events

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 60

def received_public_events(user, options = {})
  paginate "#{User.path user}/received_events/public", options
end

#repo_issue_events(repo, options = {})

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 122

alias repo_issue_events repository_issue_events

#repository_events(repo, options = {}) ⇒ Array<Sawyer::Resource>

List events for a repository

Examples:

List events for a repository

Octokit.repository_events("sferik/rails_admin")

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

Returns:

  • (Array<Sawyer::Resource>)

    A list of events for a repository

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 71

def repository_events(repo, options = {})
  paginate "#{Repository.path repo}/events", options
end

#repository_issue_events(repo, options = {}) ⇒ Array<Sawyer::Resource> Also known as: #repo_issue_events

Get all Issue Events for a given ::Octokit::Repository

Examples:

Get all Issue Events for ::Octokit

Octokit.repository_issue_events("octokit/octokit.rb")

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

Returns:

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 119

def repository_issue_events(repo, options = {})
  paginate "#{Repository.path repo}/issues/events", options
end

#repository_network_events(repo, options = {}) ⇒ Array<Sawyer::Resource>

List public events for a repository's network

Examples:

List events for a repository's network

Octokit.repository_network_events("sferik/rails_admin")

Parameters:

  • repo (String, Repository, Hash)

    A GitHub repository

Returns:

  • (Array<Sawyer::Resource>)

    A list of events for a repository's network

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 82

def repository_network_events(repo, options = {})
  paginate "networks/#{Repository.new(repo)}/events", options
end

#user_events(user, options = {}) ⇒ Array<Sawyer::Resource>

List all user events

Examples:

List all user events

Octokit.user_events("sferik")

Parameters:

  • user (Integer, String)

    GitHub user login or id.

Returns:

  • (Array<Sawyer::Resource>)

    A list of all user events

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 27

def user_events(user, options = {})
  paginate "#{User.path user}/events", options
end

#user_public_events(user, options = {}) ⇒ Array<Sawyer::Resource>

List public user events

Examples:

List public user events

Octokit.user_events("sferik")

Parameters:

  • user (Integer, String)

    GitHub user login or id

Returns:

  • (Array<Sawyer::Resource>)

    A list of public user events

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/events.rb', line 38

def user_public_events(user, options = {})
  paginate "#{User.path user}/events/public", options
end