-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathresource_mapping.py
More file actions
129 lines (128 loc) · 5.02 KB
/
resource_mapping.py
File metadata and controls
129 lines (128 loc) · 5.02 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# -*- coding: utf-8 -*-
# flake8: noqa
RESOURCE_MAPPING = {
'gists_user': {
'resource': 'users/{username}/gists',
'doc': 'https://developer.github.com/v3/gists/#list-gists'
},
'gists': {
'resource': 'gists',
'doc': 'https://developer.github.com/v3/gists/#list-gists'
},
'gists_public': {
'resource': 'gists/public',
'doc': 'https://developer.github.com/v3/gists/#list-gists'
},
'gists_starred': {
'resource': 'gists/starred',
'doc': 'https://developer.github.com/v3/gists/#list-gists'
},
'gists_single': {
'resource': 'gists/{id}',
'doc': 'https://developer.github.com/v3/gists/#get-a-single-gist'
},
'gists_single_revision': {
'resource': 'gists/{id}/{sha}',
'doc': 'https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist'
},
'gists_single_commits': {
'resource': 'gists/{id}/commits',
'doc': 'https://developer.github.com/v3/gists/#list-gist-commits'
},
'gists_star': {
'resource': 'gists/{id}/star',
'doc': 'https://developer.github.com/v3/gists/#star-a-gist'
},
'gists_forks': {
'resource': 'gists/{id}/forks',
'doc': 'https://developer.github.com/v3/gists/#fork-a-gist'
},
'events_public': {
'resource': 'events',
'doc': 'https://developer.github.com/v3/activity/events/#list-public-events',
},
'events_repository': {
'resource': 'repos/{owner}/{repo}/events',
'doc': 'https://developer.github.com/v3/activity/events/#list-repository-events'
},
'events_issues': {
'resource': 'repos/{owner}/{repo}/issues/events',
'doc': 'https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository'
},
'events_network': {
'resource': 'networks/{owner}/{repo}/events',
'doc': 'https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories'
},
'events_organization': {
'resource': 'orgs/{org}/events',
'doc': 'https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization'
},
'events_user_received': {
'resource': 'users/{username}/received_events',
'doc': 'https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received'
},
'events_user_received_public': {
'resource': 'users/{username}/received_events/public',
'doc': 'https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received'
},
'events_user': {
'resource': 'users/{username}/events',
'doc': 'https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user'
},
'events_user_public': {
'resource': 'users/{username}/events/public',
'doc': 'https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user'
},
'events_user_organization': {
'resource': 'users/{username}/events/orgs/{org}',
'doc': 'https://developer.github.com/v3/activity/events/#list-events-for-an-organization'
},
'repo_single': {
'resource': 'repos/{owner}/{repo}',
'doc': 'https://developer.github.com/v3/repos/#get'
},
'repo_issues': {
'resource': 'repos/{owner}/{repo}/issues',
'doc': 'https://developer.github.com/v3/issues/#list-issues-for-a-repository'
},
'issue_single': {
'resource': 'repos/{owner}/{repo}/issues/{number}',
'doc': 'https://developer.github.com/v3/issues/#get-a-single-issue'
},
'issue_comments': {
'resource': 'repos/{owner}/{repo}/issues/{number}/comments',
'doc': 'https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue'
},
'issue_comment_single': {
'resource': 'repos/{owner}/{repo}/issues/comments/{id}',
'doc': 'https://developer.github.com/v3/issues/comments/#get-a-single-comment'
},
'user_repos': {
'resource': 'user/repos',
'doc': 'https://developer.github.com/v3/repos/#list-your-repositories'
},
'webhooks': {
'resource': 'repos/{owner}/{repo}/hooks',
'doc': 'https://developer.github.com/v3/repos/hooks/#list-hooks'
},
'is_collaborator': {
'resource': 'repos/{owner}/{repo}/collaborators/{username}',
'doc': 'https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator'
},
'commits_repository': {
'resource': 'repos/{owner}/{repo}/commits',
'doc': 'https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository'
},
'commit_repository': {
'resource': 'repos/{owner}/{repo}/commits/{sha}',
'doc': 'https://developer.github.com/v3/repos/commits/#get-a-single-commit'
},
'users': {
'resource': 'users/{username}',
'doc': 'https://developer.github.com/v3/users/#get-a-single-user'
},
'user': {
'resource': 'user',
'doc': 'https://developer.github.com/v3/users/#get-the-authenticated-user'
}
}