forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivity.rb
More file actions
39 lines (31 loc) · 912 Bytes
/
Copy pathactivity.rb
File metadata and controls
39 lines (31 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# encoding: utf-8
module Github
class Activity < API
extend AutoloadHelper
autoload_all 'github_api/activity',
:Events => 'events',
:Notifications => 'notifications',
:Starring => 'starring',
:Watching => 'watching'
# Create new Activity API
def initialize(options = {})
super(options)
end
# Access to Activity::Events API
def events(options = {})
@events ||= ApiFactory.new 'Activity::Events', options
end
# Access to Activity::Notifications API
def notifications
@notifications ||= ApiFactory.new 'Activity::Notifications'
end
# Access to Activity::Starring API
def starring
@starring ||= ApiFactory.new 'Activity::Starring'
end
# Access to Activity::Watching API
def watching
@watching ||= ApiFactory.new 'Activity::Watching'
end
end # Activity
end # Github