Class: Events
- Inherits:
-
Object
- Object
- Events
- Defined in:
- lib/github/events/events.rb
Instance Attribute Summary collapse
-
#github ⇒ Object
Returns the value of attribute github.
Instance Method Summary collapse
-
#initialize(github) ⇒ Events
constructor
A new instance of Events.
- #listEvents ⇒ Object
- #listOrgEvents(org) ⇒ Object
- #listOrgPublicEvents(org) ⇒ Object
- #listReceivedEvents(user = nil) ⇒ Object
- #listReceivedPublicEvents(user = nil) ⇒ Object
- #listRepoEvents(repo, user = nil) ⇒ Object
- #listRepoIssueEvents(repo, user = nil) ⇒ Object
- #listRepoNetworkPublicEvents(repo, user = nil) ⇒ Object
Constructor Details
#initialize(github) ⇒ Events
Returns a new instance of Events.
4 5 6 |
# File 'lib/github/events/events.rb', line 4 def initialize(github) @github = github end |
Instance Attribute Details
#github ⇒ Object
Returns the value of attribute github.
2 3 4 |
# File 'lib/github/events/events.rb', line 2 def github @github end |
Instance Method Details
#listEvents ⇒ Object
8 9 10 |
# File 'lib/github/events/events.rb', line 8 def listEvents() @github.get('events') end |
#listOrgEvents(org) ⇒ Object
41 42 43 44 |
# File 'lib/github/events/events.rb', line 41 def listOrgEvents(org) username = @github.username @github.get('users/%s/events/orgs/%s' % [username, org]) end |
#listOrgPublicEvents(org) ⇒ Object
22 23 24 |
# File 'lib/github/events/events.rb', line 22 def listOrgPublicEvents(org) @github.get('orgs/%s/events' % org) end |
#listReceivedEvents(user = nil) ⇒ Object
31 32 33 34 |
# File 'lib/github/events/events.rb', line 31 def listReceivedEvents(user=nil) username = user == nil ? @github.username : user @github.get('users/%s/received_events' % username) end |
#listReceivedPublicEvents(user = nil) ⇒ Object
36 37 38 39 |
# File 'lib/github/events/events.rb', line 36 def listReceivedPublicEvents(user=nil) username = user == nil ? @github.username : user @github.get('users/%s/received_events/public' % username) end |
#listRepoEvents(repo, user = nil) ⇒ Object
12 13 14 15 |
# File 'lib/github/events/events.rb', line 12 def listRepoEvents(repo, user=nil) username = user == nil ? @github.username : user @github.get('repos/%s/%s/events' % [username, repo]) end |
#listRepoIssueEvents(repo, user = nil) ⇒ Object
26 27 28 29 |
# File 'lib/github/events/events.rb', line 26 def listRepoIssueEvents(repo, user=nil) username = user == nil ? @github.username : user @github.get('repos/%s/%s/issues/events' % [username, repo]) end |
#listRepoNetworkPublicEvents(repo, user = nil) ⇒ Object
17 18 19 20 |
# File 'lib/github/events/events.rb', line 17 def listRepoNetworkPublicEvents(repo, user=nil) username = user == nil ? @github.username : user @github.get('network/%s/%s/events' % [username, repo]) end |