tinybucket 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +35 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +44 -0
  6. data/.travis.yml +10 -0
  7. data/Gemfile +22 -0
  8. data/Guardfile +13 -0
  9. data/LICENSE +21 -0
  10. data/README.md +237 -0
  11. data/Rakefile +39 -0
  12. data/lib/faraday_middleware/follow_oauth_redirects.rb +67 -0
  13. data/lib/tinybucket.rb +61 -0
  14. data/lib/tinybucket/api.rb +20 -0
  15. data/lib/tinybucket/api/base_api.rb +31 -0
  16. data/lib/tinybucket/api/branch_restrictions_api.rb +26 -0
  17. data/lib/tinybucket/api/comments_api.rb +46 -0
  18. data/lib/tinybucket/api/commits_api.rb +26 -0
  19. data/lib/tinybucket/api/diff_api.rb +17 -0
  20. data/lib/tinybucket/api/helper.rb +22 -0
  21. data/lib/tinybucket/api/helper/api_helper.rb +48 -0
  22. data/lib/tinybucket/api/helper/branch_restrictions_helper.rb +27 -0
  23. data/lib/tinybucket/api/helper/comments_helper.rb +49 -0
  24. data/lib/tinybucket/api/helper/commits_helper.rb +27 -0
  25. data/lib/tinybucket/api/helper/diff_helper.rb +29 -0
  26. data/lib/tinybucket/api/helper/pull_requests_helper.rb +44 -0
  27. data/lib/tinybucket/api/helper/repo_helper.rb +29 -0
  28. data/lib/tinybucket/api/helper/repos_helper.rb +21 -0
  29. data/lib/tinybucket/api/helper/team_helper.rb +35 -0
  30. data/lib/tinybucket/api/helper/user_helper.rb +31 -0
  31. data/lib/tinybucket/api/pull_requests_api.rb +49 -0
  32. data/lib/tinybucket/api/repo_api.rb +35 -0
  33. data/lib/tinybucket/api/repos_api.rb +19 -0
  34. data/lib/tinybucket/api/team_api.rb +51 -0
  35. data/lib/tinybucket/api/user_api.rb +44 -0
  36. data/lib/tinybucket/api_factory.rb +21 -0
  37. data/lib/tinybucket/client.rb +95 -0
  38. data/lib/tinybucket/connection.rb +62 -0
  39. data/lib/tinybucket/constants.rb +4 -0
  40. data/lib/tinybucket/error.rb +8 -0
  41. data/lib/tinybucket/error/base_error.rb +12 -0
  42. data/lib/tinybucket/error/service_error.rb +20 -0
  43. data/lib/tinybucket/model.rb +20 -0
  44. data/lib/tinybucket/model/base.rb +54 -0
  45. data/lib/tinybucket/model/branch_restriction.rb +17 -0
  46. data/lib/tinybucket/model/comment.rb +39 -0
  47. data/lib/tinybucket/model/commit.rb +39 -0
  48. data/lib/tinybucket/model/concerns.rb +14 -0
  49. data/lib/tinybucket/model/concerns/reloadable.rb +45 -0
  50. data/lib/tinybucket/model/concerns/repository_keys.rb +43 -0
  51. data/lib/tinybucket/model/error_response.rb +7 -0
  52. data/lib/tinybucket/model/page.rb +65 -0
  53. data/lib/tinybucket/model/profile.rb +37 -0
  54. data/lib/tinybucket/model/pull_request.rb +64 -0
  55. data/lib/tinybucket/model/repository.rb +96 -0
  56. data/lib/tinybucket/model/team.rb +39 -0
  57. data/lib/tinybucket/parser.rb +25 -0
  58. data/lib/tinybucket/parser/base_parser.rb +17 -0
  59. data/lib/tinybucket/parser/branch_restriction_parser.rb +9 -0
  60. data/lib/tinybucket/parser/branch_restrictions_parser.rb +10 -0
  61. data/lib/tinybucket/parser/comment_parser.rb +9 -0
  62. data/lib/tinybucket/parser/comments_parser.rb +10 -0
  63. data/lib/tinybucket/parser/commit_parser.rb +9 -0
  64. data/lib/tinybucket/parser/commits_parser.rb +9 -0
  65. data/lib/tinybucket/parser/profile_parser.rb +9 -0
  66. data/lib/tinybucket/parser/profiles_parser.rb +9 -0
  67. data/lib/tinybucket/parser/pull_request_parser.rb +9 -0
  68. data/lib/tinybucket/parser/pull_requests_parser.rb +10 -0
  69. data/lib/tinybucket/parser/repo_parser.rb +9 -0
  70. data/lib/tinybucket/parser/repos_parser.rb +10 -0
  71. data/lib/tinybucket/parser/team_parser.rb +9 -0
  72. data/lib/tinybucket/parser/teams_parser.rb +9 -0
  73. data/lib/tinybucket/request.rb +55 -0
  74. data/lib/tinybucket/response.rb +7 -0
  75. data/lib/tinybucket/response/error_handler.rb +14 -0
  76. data/lib/tinybucket/version.rb +3 -0
  77. data/spec/fixtures/commit.json +83 -0
  78. data/spec/fixtures/profile.json +29 -0
  79. data/spec/fixtures/pull_request.json +106 -0
  80. data/spec/fixtures/repositories/get.json +78 -0
  81. data/spec/fixtures/repositories/test_owner/get.json +78 -0
  82. data/spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/1/get.json +17 -0
  83. data/spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/get.json +101 -0
  84. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/1/get.json +38 -0
  85. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/get.json +40 -0
  86. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/get.json +83 -0
  87. data/spec/fixtures/repositories/test_owner/test_repo/commits/get.json +73 -0
  88. data/spec/fixtures/repositories/test_owner/test_repo/diff/1/get.json +21 -0
  89. data/spec/fixtures/repositories/test_owner/test_repo/forks/get.json +78 -0
  90. data/spec/fixtures/repositories/test_owner/test_repo/get.json +71 -0
  91. data/spec/fixtures/repositories/test_owner/test_repo/patch/1/get.json +29 -0
  92. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/delete.json +3 -0
  93. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/post.json +3 -0
  94. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/1/get.json +30 -0
  95. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/get.json +44 -0
  96. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/commits/get.json +66 -0
  97. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/diff/get.txt +13 -0
  98. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/get.json +164 -0
  99. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get.json +112 -0
  100. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_declined.json +112 -0
  101. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_merged.json +112 -0
  102. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_open.json +112 -0
  103. data/spec/fixtures/repositories/test_owner/test_repo/watchers/get.json +32 -0
  104. data/spec/fixtures/repository.json +71 -0
  105. data/spec/fixtures/teams/test_team/followers/get.json +36 -0
  106. data/spec/fixtures/teams/test_team/following/get.json +39 -0
  107. data/spec/fixtures/teams/test_team/get.json +32 -0
  108. data/spec/fixtures/teams/test_team/members/get.json +36 -0
  109. data/spec/fixtures/teams/test_team/repositories/get.json +125 -0
  110. data/spec/fixtures/users/test_owner/followers/get.json +65 -0
  111. data/spec/fixtures/users/test_owner/following/get.json +100 -0
  112. data/spec/fixtures/users/test_owner/get.json +29 -0
  113. data/spec/lib/tinybucket/api/branch_restrictions_api_spec.rb +78 -0
  114. data/spec/lib/tinybucket/api/comments_api_spec.rb +133 -0
  115. data/spec/lib/tinybucket/api/commits_api_spec.rb +63 -0
  116. data/spec/lib/tinybucket/api/diff_api_spec.rb +5 -0
  117. data/spec/lib/tinybucket/api/pull_requests_api_spec.rb +229 -0
  118. data/spec/lib/tinybucket/api/repo_api_spec.rb +100 -0
  119. data/spec/lib/tinybucket/api/repos_api_spec.rb +28 -0
  120. data/spec/lib/tinybucket/api/team_api_spec.rb +87 -0
  121. data/spec/lib/tinybucket/api/user_api_spec.rb +60 -0
  122. data/spec/lib/tinybucket/api_factory_spec.rb +23 -0
  123. data/spec/lib/tinybucket/client_spec.rb +102 -0
  124. data/spec/lib/tinybucket/connection_spec.rb +30 -0
  125. data/spec/lib/tinybucket/model/branch_restriction_spec.rb +29 -0
  126. data/spec/lib/tinybucket/model/comment_spec.rb +31 -0
  127. data/spec/lib/tinybucket/model/commit_spec.rb +62 -0
  128. data/spec/lib/tinybucket/model/page_spec.rb +58 -0
  129. data/spec/lib/tinybucket/model/profile_spec.rb +47 -0
  130. data/spec/lib/tinybucket/model/pull_request_spec.rb +122 -0
  131. data/spec/lib/tinybucket/model/repository_spec.rb +131 -0
  132. data/spec/lib/tinybucket/model/team_spec.rb +53 -0
  133. data/spec/lib/tinybucket_spec.rb +32 -0
  134. data/spec/spec_helper.rb +42 -0
  135. data/spec/support/api_response_macros.rb +30 -0
  136. data/spec/support/model_macros.rb +61 -0
  137. data/tinybucket.gemspec +36 -0
  138. metadata +437 -0
@@ -0,0 +1,112 @@
1
+ {
2
+ "pagelen": 1,
3
+ "next": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests?pagelen=1&page=2",
4
+ "values": [{
5
+ "description": "![img](https://cloudup.com/c7ZJtChLw9J+)\r\n\r\n## Removing:\r\n\r\n* Notifications\r\n* Email\r\n* Change password\r\n* Sessions\r\n\r\n## Renaming: \r\n\r\n* Change username\r\n* Delete account (rename to delete team)\r\n\r\n",
6
+ "links": {
7
+ "decline": {
8
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/decline"
9
+ },
10
+ "commits": {
11
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/commits"
12
+ },
13
+ "self": {
14
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767"
15
+ },
16
+ "comments": {
17
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/comments"
18
+ },
19
+ "patch": {
20
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/patch"
21
+ },
22
+ "merge": {
23
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/merge"
24
+ },
25
+ "html": {
26
+ "href": "https://api.bitbucket.org/bitbucket/bitbucket/pull-request/3767"
27
+ },
28
+ "activity": {
29
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/activity"
30
+ },
31
+ "diff": {
32
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/diff"
33
+ },
34
+ "approve": {
35
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/approve"
36
+ }
37
+ },
38
+ "author": {
39
+ "username": "mfrauenholtz",
40
+ "display_name": "Michael Frauenholtz",
41
+ "links": {
42
+ "self": {
43
+ "href": "https://api.bitbucket.org/2.0/users/mfrauenholtz"
44
+ },
45
+ "avatar": {
46
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Aug/24/mfrauenholtz-avatar-1858533797-5_avatar.png"
47
+ }
48
+ }
49
+ },
50
+ "close_source_branch": true,
51
+ "title": "BB-9500: Remove certain admin links for Team accounts",
52
+ "destination": {
53
+ "commit": {
54
+ "hash": "e04099ba977c",
55
+ "links": {
56
+ "self": {
57
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/e04099ba977c"
58
+ }
59
+ }
60
+ },
61
+ "repository": {
62
+ "links": {
63
+ "self": {
64
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
65
+ },
66
+ "avatar": {
67
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
68
+ }
69
+ },
70
+ "full_name": "bitbucket/bitbucket",
71
+ "name": "bitbucket"
72
+ },
73
+ "branch": {
74
+ "name": "staging"
75
+ }
76
+ },
77
+ "reason": "",
78
+ "closed_by": null,
79
+ "source": {
80
+ "commit": {
81
+ "hash": "2a81a1edc0c2",
82
+ "links": {
83
+ "self": {
84
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/2a81a1edc0c2"
85
+ }
86
+ }
87
+ },
88
+ "repository": {
89
+ "links": {
90
+ "self": {
91
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
92
+ },
93
+ "avatar": {
94
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
95
+ }
96
+ },
97
+ "full_name": "bitbucket/bitbucket",
98
+ "name": "bitbucket"
99
+ },
100
+ "branch": {
101
+ "name": "mfrauenholtz/team-removal/admin-links"
102
+ }
103
+ },
104
+ "state": "OPEN",
105
+ "created_on": "2013-11-05T23:59:26.480984+00:00",
106
+ "updated_on": "2013-11-07T00:17:41.061613+00:00",
107
+ "merge_commit": null,
108
+ "id": 3767
109
+ }],
110
+ "page": 1,
111
+ "size": 12
112
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "pagelen": 1,
3
+ "next": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests?pagelen=1&page=2",
4
+ "values": [{
5
+ "description": "![img](https://cloudup.com/c7ZJtChLw9J+)\r\n\r\n## Removing:\r\n\r\n* Notifications\r\n* Email\r\n* Change password\r\n* Sessions\r\n\r\n## Renaming: \r\n\r\n* Change username\r\n* Delete account (rename to delete team)\r\n\r\n",
6
+ "links": {
7
+ "decline": {
8
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/decline"
9
+ },
10
+ "commits": {
11
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/commits"
12
+ },
13
+ "self": {
14
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767"
15
+ },
16
+ "comments": {
17
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/comments"
18
+ },
19
+ "patch": {
20
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/patch"
21
+ },
22
+ "merge": {
23
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/merge"
24
+ },
25
+ "html": {
26
+ "href": "https://api.bitbucket.org/bitbucket/bitbucket/pull-request/3767"
27
+ },
28
+ "activity": {
29
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/activity"
30
+ },
31
+ "diff": {
32
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/diff"
33
+ },
34
+ "approve": {
35
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/approve"
36
+ }
37
+ },
38
+ "author": {
39
+ "username": "mfrauenholtz",
40
+ "display_name": "Michael Frauenholtz",
41
+ "links": {
42
+ "self": {
43
+ "href": "https://api.bitbucket.org/2.0/users/mfrauenholtz"
44
+ },
45
+ "avatar": {
46
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Aug/24/mfrauenholtz-avatar-1858533797-5_avatar.png"
47
+ }
48
+ }
49
+ },
50
+ "close_source_branch": true,
51
+ "title": "BB-9500: Remove certain admin links for Team accounts",
52
+ "destination": {
53
+ "commit": {
54
+ "hash": "e04099ba977c",
55
+ "links": {
56
+ "self": {
57
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/e04099ba977c"
58
+ }
59
+ }
60
+ },
61
+ "repository": {
62
+ "links": {
63
+ "self": {
64
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
65
+ },
66
+ "avatar": {
67
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
68
+ }
69
+ },
70
+ "full_name": "bitbucket/bitbucket",
71
+ "name": "bitbucket"
72
+ },
73
+ "branch": {
74
+ "name": "staging"
75
+ }
76
+ },
77
+ "reason": "",
78
+ "closed_by": null,
79
+ "source": {
80
+ "commit": {
81
+ "hash": "2a81a1edc0c2",
82
+ "links": {
83
+ "self": {
84
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/2a81a1edc0c2"
85
+ }
86
+ }
87
+ },
88
+ "repository": {
89
+ "links": {
90
+ "self": {
91
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
92
+ },
93
+ "avatar": {
94
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
95
+ }
96
+ },
97
+ "full_name": "bitbucket/bitbucket",
98
+ "name": "bitbucket"
99
+ },
100
+ "branch": {
101
+ "name": "mfrauenholtz/team-removal/admin-links"
102
+ }
103
+ },
104
+ "state": "DECLINED",
105
+ "created_on": "2013-11-05T23:59:26.480984+00:00",
106
+ "updated_on": "2013-11-07T00:17:41.061613+00:00",
107
+ "merge_commit": null,
108
+ "id": 3767
109
+ }],
110
+ "page": 1,
111
+ "size": 12
112
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "pagelen": 1,
3
+ "next": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests?pagelen=1&page=2",
4
+ "values": [{
5
+ "description": "![img](https://cloudup.com/c7ZJtChLw9J+)\r\n\r\n## Removing:\r\n\r\n* Notifications\r\n* Email\r\n* Change password\r\n* Sessions\r\n\r\n## Renaming: \r\n\r\n* Change username\r\n* Delete account (rename to delete team)\r\n\r\n",
6
+ "links": {
7
+ "decline": {
8
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/decline"
9
+ },
10
+ "commits": {
11
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/commits"
12
+ },
13
+ "self": {
14
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767"
15
+ },
16
+ "comments": {
17
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/comments"
18
+ },
19
+ "patch": {
20
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/patch"
21
+ },
22
+ "merge": {
23
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/merge"
24
+ },
25
+ "html": {
26
+ "href": "https://api.bitbucket.org/bitbucket/bitbucket/pull-request/3767"
27
+ },
28
+ "activity": {
29
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/activity"
30
+ },
31
+ "diff": {
32
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/diff"
33
+ },
34
+ "approve": {
35
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/approve"
36
+ }
37
+ },
38
+ "author": {
39
+ "username": "mfrauenholtz",
40
+ "display_name": "Michael Frauenholtz",
41
+ "links": {
42
+ "self": {
43
+ "href": "https://api.bitbucket.org/2.0/users/mfrauenholtz"
44
+ },
45
+ "avatar": {
46
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Aug/24/mfrauenholtz-avatar-1858533797-5_avatar.png"
47
+ }
48
+ }
49
+ },
50
+ "close_source_branch": true,
51
+ "title": "BB-9500: Remove certain admin links for Team accounts",
52
+ "destination": {
53
+ "commit": {
54
+ "hash": "e04099ba977c",
55
+ "links": {
56
+ "self": {
57
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/e04099ba977c"
58
+ }
59
+ }
60
+ },
61
+ "repository": {
62
+ "links": {
63
+ "self": {
64
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
65
+ },
66
+ "avatar": {
67
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
68
+ }
69
+ },
70
+ "full_name": "bitbucket/bitbucket",
71
+ "name": "bitbucket"
72
+ },
73
+ "branch": {
74
+ "name": "staging"
75
+ }
76
+ },
77
+ "reason": "",
78
+ "closed_by": null,
79
+ "source": {
80
+ "commit": {
81
+ "hash": "2a81a1edc0c2",
82
+ "links": {
83
+ "self": {
84
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/2a81a1edc0c2"
85
+ }
86
+ }
87
+ },
88
+ "repository": {
89
+ "links": {
90
+ "self": {
91
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
92
+ },
93
+ "avatar": {
94
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
95
+ }
96
+ },
97
+ "full_name": "bitbucket/bitbucket",
98
+ "name": "bitbucket"
99
+ },
100
+ "branch": {
101
+ "name": "mfrauenholtz/team-removal/admin-links"
102
+ }
103
+ },
104
+ "state": "MERGED",
105
+ "created_on": "2013-11-05T23:59:26.480984+00:00",
106
+ "updated_on": "2013-11-07T00:17:41.061613+00:00",
107
+ "merge_commit": null,
108
+ "id": 3767
109
+ }],
110
+ "page": 1,
111
+ "size": 12
112
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "pagelen": 1,
3
+ "next": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests?pagelen=1&page=2",
4
+ "values": [{
5
+ "description": "![img](https://cloudup.com/c7ZJtChLw9J+)\r\n\r\n## Removing:\r\n\r\n* Notifications\r\n* Email\r\n* Change password\r\n* Sessions\r\n\r\n## Renaming: \r\n\r\n* Change username\r\n* Delete account (rename to delete team)\r\n\r\n",
6
+ "links": {
7
+ "decline": {
8
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/decline"
9
+ },
10
+ "commits": {
11
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/commits"
12
+ },
13
+ "self": {
14
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767"
15
+ },
16
+ "comments": {
17
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/comments"
18
+ },
19
+ "patch": {
20
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/patch"
21
+ },
22
+ "merge": {
23
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/merge"
24
+ },
25
+ "html": {
26
+ "href": "https://api.bitbucket.org/bitbucket/bitbucket/pull-request/3767"
27
+ },
28
+ "activity": {
29
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/activity"
30
+ },
31
+ "diff": {
32
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/diff"
33
+ },
34
+ "approve": {
35
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/pullrequests/3767/approve"
36
+ }
37
+ },
38
+ "author": {
39
+ "username": "mfrauenholtz",
40
+ "display_name": "Michael Frauenholtz",
41
+ "links": {
42
+ "self": {
43
+ "href": "https://api.bitbucket.org/2.0/users/mfrauenholtz"
44
+ },
45
+ "avatar": {
46
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Aug/24/mfrauenholtz-avatar-1858533797-5_avatar.png"
47
+ }
48
+ }
49
+ },
50
+ "close_source_branch": true,
51
+ "title": "BB-9500: Remove certain admin links for Team accounts",
52
+ "destination": {
53
+ "commit": {
54
+ "hash": "e04099ba977c",
55
+ "links": {
56
+ "self": {
57
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/e04099ba977c"
58
+ }
59
+ }
60
+ },
61
+ "repository": {
62
+ "links": {
63
+ "self": {
64
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
65
+ },
66
+ "avatar": {
67
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
68
+ }
69
+ },
70
+ "full_name": "bitbucket/bitbucket",
71
+ "name": "bitbucket"
72
+ },
73
+ "branch": {
74
+ "name": "staging"
75
+ }
76
+ },
77
+ "reason": "",
78
+ "closed_by": null,
79
+ "source": {
80
+ "commit": {
81
+ "hash": "2a81a1edc0c2",
82
+ "links": {
83
+ "self": {
84
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/2a81a1edc0c2"
85
+ }
86
+ }
87
+ },
88
+ "repository": {
89
+ "links": {
90
+ "self": {
91
+ "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket"
92
+ },
93
+ "avatar": {
94
+ "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Sep/27/bitbucket-logo-1832464563-7_avatar.png"
95
+ }
96
+ },
97
+ "full_name": "bitbucket/bitbucket",
98
+ "name": "bitbucket"
99
+ },
100
+ "branch": {
101
+ "name": "mfrauenholtz/team-removal/admin-links"
102
+ }
103
+ },
104
+ "state": "OPEN",
105
+ "created_on": "2013-11-05T23:59:26.480984+00:00",
106
+ "updated_on": "2013-11-07T00:17:41.061613+00:00",
107
+ "merge_commit": null,
108
+ "id": 3767
109
+ }],
110
+ "page": 1,
111
+ "size": 12
112
+ }