forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.rb
More file actions
84 lines (67 loc) · 2.19 KB
/
Copy pathclient.rb
File metadata and controls
84 lines (67 loc) · 2.19 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# encoding: utf-8
module Github
class Client < API
# Serving up the ‘social’ in Social Coding™, the Activity APIs
# provide access to notifications, subscriptions, and timelines.
#
def activity(options = {})
@activity ||= ApiFactory.new 'Activity', options
end
def emojis(options = {})
@emojis ||= ApiFactory.new 'Emojis', options
end
def gists(options = {})
@gists ||= ApiFactory.new 'Gists', options
end
def gitignore(options = {})
@gitignore ||= ApiFactory.new 'Gitignore', options
end
alias :git_ignore :gitignore
# The Git Database API gives you access to read and write raw Git objects
# to your Git database on GitHub and to list and update your references
# (branch heads and tags).
def git_data(options = {})
@git_data ||= ApiFactory.new 'GitData', options
end
alias :git :git_data
def issues(options = {})
@issues ||= ApiFactory.new 'Issues', options
end
def markdown(options = {})
@markdown ||= ApiFactory.new 'Markdown', options
end
# An API for users to manage their own tokens. You can only access your own
# tokens, and only through Basic Authentication.
def oauth(options = {})
@oauth ||= ApiFactory.new 'Authorizations', options
end
alias :authorizations :oauth
def orgs(options = {})
@orgs ||= ApiFactory.new 'Orgs', options
end
alias :organizations :orgs
def pull_requests(options = {})
@pull_requests ||= ApiFactory.new 'PullRequests', options
end
alias :pulls :pull_requests
def repos(options = {})
@repos ||= ApiFactory.new 'Repos', options
end
alias :repositories :repos
def octocat(options = {})
@octocat ||= ApiFactory.new 'Say', options
end
def scopes(options = {})
@scopes ||= ApiFactory.new 'Scopes', options
end
def search(options = {})
@search ||= ApiFactory.new 'Search', options
end
# Many of the resources on the users API provide a shortcut for getting
# information about the currently authenticated user.
#
def users(options = {})
@users ||= ApiFactory.new 'Users', options
end
end # Client
end # Github