forked from dennisreimann/ioctocat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppConstants.h
91 lines (81 loc) · 4.47 KB
/
AppConstants.h
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
// Settings
#define kClearAvatarCacheDefaultsKey @"clearAvatarCache"
#define kLastReadingDateURLDefaultsKeyPrefix @"lastReadingDate:"
#define kLoginDefaultsKey @"username"
#define kTokenDefaultsKey @"token"
#define kPasswordDefaultsKey @"password"
// API
#define kISO8601TimeFormat @"yyyy-MM-dd'T'HH:mm:ssz"
#define kIssueTimeFormat @"yyyy/MM/dd HH:mm:ss z"
// tables
#define kRepositoryCellIdentifier @"RepositoryCell"
#define kFeedEntryCellIdentifier @"FeedEntryCell"
#define kIssueCellIdentifier @"IssueCell"
#define kUserCellIdentifier @"UserCell"
#define kNetworkCellIdentifier @"NetworkCell"
#define kBranchCellIdentifier @"BranchCell"
#define kCommentCellIdentifier @"CommentCell"
#define kOrganizationCellIdentifier @"OrganizationCell"
// User
#define kUserFeedFormat @"https://github.com/%@.atom" // non-API atom
#define kUserNewsFeedFormat @"https://github.com/%@.private.atom" // non-API atom
#define kUserActivityFeedFormat @"https://github.com/%@.private.actor.atom" // non-API atom
#define kUserGithubFormat @"https://github.com/%@"
#define kUserAuthenticatedFormat @"https://api.github.com/user" // v3
#define kUserFormat @"https://api.github.com/users/%@" // v3
#define kUserReposFormat @"https://github.com/api/v2/json/repos/show/%@"
#define kUserWatchedReposFormat @"https://github.com/api/v2/json/repos/watched/%@"
#define kUserSearchFormat @"https://github.com/api/v2/json/user/search/%@"
#define kUserFollowingFormat @"https://api.github.com/users/%@/following" // v3
#define kUserFollowersFormat @"https://api.github.com/users/%@/followers" // v3
#define kUserFollowFormat @"https://api.github.com/user/following/%@" // v3
// Repos
#define kRepoGithubFormat @"https://github.com/%@/%@"
#define kRepoFeedFormat @"https://github.com/feeds/%@/commits/%@/%@"
#define kRepoPrivateFeedFormat @"https://github.com/feeds/%@/commits/%@/%@"
#define kRepoFormat @"https://github.com/api/v2/json/repos/show/%@/%@"
#define kRepoSearchFormat @"https://github.com/api/v2/json/repos/search/%@"
#define kRepoWatchFormat @"https://github.com/api/v2/json/repos/%@/%@/%@"
#define kRepoBranchesFormat @"https://github.com/api/v2/json/repos/show/%@/%@/branches"
#define kRepoNetworkFormat @"https://github.com/api/v2/json/repos/show/%@/%@/network"
#define kRepoPublicCommitsFormat @"https://github.com/api/v2/json/commits/list/%@/%@/%@"
#define kRepoPublicCommitFormat @"https://github.com/api/v2/json/commits/show/%@/%@/%@"
#define kRepoPrivateCommitsFormat @"https://github.com/api/v2/json/commits/list/%@/%@/%@"
#define kRepoPrivateCommitFormat @"https://github.com/api/v2/json/commits/show/%@/%@/%@"
// Issues
#define kIssueFormat @"https://github.com/api/v2/json/issues/show/%@/%@/%d"
#define kIssueGithubFormat @"https://github.com/%@/%@/issues/%d"
#define kIssueOpenFormat @"https://github.com/api/v2/json/issues/open/%@/%@"
#define kIssueEditFormat @"https://github.com/api/v2/json/issues/edit/%@/%@/%d"
#define kIssueCommentsFormat @"https://github.com/api/v2/json/issues/comments/%@/%@/%d"
#define kIssueCommentFormat @"https://github.com/api/v2/json/issues/comment/%@/%@/%d"
#define kIssueToggleFormat @"https://github.com/api/v2/json/issues/%@/%@/%@/%d"
#define kIssuesFormat @"http://github.com/api/v2/json/issues/list/%@/%@/%@"
// Organizations
#define kOrganizationGithubFormat @"https://github.com/%@"
#define kOrganizationFormat @"https://api.github.com/orgs/%@" // v3
#define kOrganizationsFormat @"https://github.com/api/v2/json/user/show/%@/organizations"
#define kOrganizationsRepositoriesFormat @"https://github.com/api/v2/json/organizations/repositories"
#define kOrganizationFeedFormat @"https://github.com/organizations/%@/%@.private.atom?token=%@"
#define kOrganizationPublicRepositoriesFormat @"https://github.com/api/v2/json/organizations/%@/public_repositories"
#define kOrganizationPublicMembersFormat @"https://github.com/api/v2/json/organizations/%@/public_members"
// Issues
#define kIssueStateOpen @"open"
#define kIssueStateClosed @"closed"
#define kIssueToggleClose @"close"
#define kIssueToggleReopen @"reopen"
#define kIssueTitleParamName @"title"
#define kIssueBodyParamName @"body"
#define kIssueCommentCommentParamName @"comment"
// Images
#define kImageGravatarMaxLogicalSize 50
// Watching
#define kWatch @"watch"
#define kUnWatch @"unwatch"
// KVO
#define kResourceLoadingStatusKeyPath @"loadingStatus"
#define kResourceSavingStatusKeyPath @"savingStatus"
#define kUserLoginKeyPath @"login"
#define kUserGravatarKeyPath @"gravatar"
#define kOrganizationLoginKeyPath @"login"
#define kOrganizationGravatarKeyPath @"gravatar"