badgeapi 0.3.10 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rubocop.yml +147 -0
- data/README.md +44 -12
- data/Rakefile +24 -11
- data/badgeapi.gemspec +23 -22
- data/lib/badgeapi/badge.rb +24 -27
- data/lib/badgeapi/badgeapi_object.rb +160 -147
- data/lib/badgeapi/collection.rb +6 -9
- data/lib/badgeapi/errors/api_error.rb +3 -4
- data/lib/badgeapi/errors/badgeapi_error.rb +15 -15
- data/lib/badgeapi/errors/invalid_request_error.rb +3 -4
- data/lib/badgeapi/recipient.rb +13 -16
- data/lib/badgeapi/version.rb +1 -1
- data/lib/badgeapi.rb +13 -15
- data/test/badge/badge_test.rb +71 -150
- data/test/badgeapi_test.rb +4 -0
- data/test/collection/collection_test.rb +43 -77
- data/test/fixtures/badge_all.yml +113 -0
- data/test/fixtures/{bad_api_key.yml → badge_all_bad_user.yml} +14 -13
- data/test/fixtures/{all_badges_bad_user.yml → badge_all_badges_bad_user.yml} +16 -57
- data/test/fixtures/badge_all_expanded.yml +184 -0
- data/test/fixtures/badge_all_from_collection.yml +52 -0
- data/test/fixtures/badge_all_issued.yml +99 -0
- data/test/fixtures/{all_badges_limited.yml → badge_all_limited.yml} +10 -8
- data/test/fixtures/{create_badge.yml → badge_create.yml} +20 -16
- data/test/fixtures/{create_new_badge_failure.yml → badge_create_new.yml} +28 -22
- data/test/fixtures/badge_destroy.yml +147 -0
- data/test/fixtures/badge_destroy_error.yml +147 -0
- data/test/fixtures/badge_error.yml +54 -6
- data/test/fixtures/{issue_badge_to_bad_user.yml → badge_issue_to_bad_user.yml} +8 -6
- data/test/fixtures/badge_issue_to_user.yml +107 -0
- data/test/fixtures/{issue_badge_to_user_with_library_card.yml → badge_issue_to_user_with_library_card.yml} +21 -17
- data/test/fixtures/{one_badge.yml → badge_one.yml} +10 -8
- data/test/fixtures/{one_badge_expanded.yml → badge_one_expanded.yml} +11 -9
- data/test/fixtures/badge_requirements.yml +150 -105
- data/test/fixtures/badge_revoke_from_user.yml +107 -0
- data/test/fixtures/{update_badge_via_update.yml → badge_update_via_update.yml} +31 -25
- data/test/fixtures/{update_badge_via_update_slug_history.yml → badge_update_via_update_slug_history.yml} +41 -33
- data/test/fixtures/{all_collection.yml → collection_all.yml} +11 -9
- data/test/fixtures/collection_all_expanded.yml +123 -0
- data/test/fixtures/{all_collection_limit.yml → collection_all_limit.yml} +10 -8
- data/test/fixtures/{create_collection.yml → collection_create.yml} +20 -16
- data/test/fixtures/{create_new_collection_failure.yml → collection_create_new_failure.yml} +36 -28
- data/test/fixtures/{destroy_collection.yml → collection_destroy.yml} +36 -28
- data/test/fixtures/{destroy_collection_error.yml → collection_destroy_error.yml} +36 -28
- data/test/fixtures/collection_error.yml +108 -12
- data/test/fixtures/{one_collection.yml → collection_one.yml} +10 -8
- data/test/fixtures/collection_one_expanded.yml +106 -0
- data/test/fixtures/{update_collection.yml → collection_update.yml} +40 -32
- data/test/fixtures/{update_collection_via_update.yml → collection_update_via_update.yml} +30 -24
- data/test/fixtures/{bad_Recipietn_request.yml → recipient_bad_user_data.yml} +26 -22
- data/test/fixtures/recipient_with_badges.yml +20 -108
- data/test/fixtures/recipient_with_badges_unicard.yml +151 -8
- data/test/recipient/recipient_test.rb +11 -29
- metadata +69 -73
- data/test/fixtures/all_badges.yml +0 -121
- data/test/fixtures/all_badges_expanded.yml +0 -196
- data/test/fixtures/all_badges_from_collection.yml +0 -52
- data/test/fixtures/all_badges_issued.yml +0 -430
- data/test/fixtures/all_collection_expanded.yml +0 -131
- data/test/fixtures/bad_Recipient.yml +0 -183
- data/test/fixtures/destroy_badge.yml +0 -277
- data/test/fixtures/destroy_badge_error.yml +0 -231
- data/test/fixtures/issue_already_owned_badge.yml +0 -49
- data/test/fixtures/issue_badge_to_user.yml +0 -199
- data/test/fixtures/one_collection_expanded.yml +0 -104
- data/test/fixtures/revoke_badge_from_user.yml +0 -199
- data/test/fixtures/revoke_badge_not_issued.yml +0 -49
@@ -2,13 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri:
|
5
|
+
uri: https://gamification-api.dev/v1/collections?limit=1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.9.
|
11
|
+
- Faraday v0.9.2
|
12
12
|
Authorization:
|
13
13
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
14
14
|
Accept-Encoding:
|
@@ -20,6 +20,8 @@ http_interactions:
|
|
20
20
|
code: 200
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
|
+
Strict-Transport-Security:
|
24
|
+
- max-age=31536000
|
23
25
|
X-Frame-Options:
|
24
26
|
- SAMEORIGIN
|
25
27
|
X-Xss-Protection:
|
@@ -29,21 +31,21 @@ http_interactions:
|
|
29
31
|
Content-Type:
|
30
32
|
- application/json; charset=utf-8
|
31
33
|
Etag:
|
32
|
-
- '"
|
34
|
+
- '"af388ffdc2b2af6e9a65830b160d8586"'
|
33
35
|
Cache-Control:
|
34
36
|
- max-age=0, private, must-revalidate
|
35
37
|
X-Request-Id:
|
36
|
-
-
|
38
|
+
- 05fdb32c-d636-4931-a261-51382370a948
|
37
39
|
X-Runtime:
|
38
|
-
- '0.
|
40
|
+
- '0.009940'
|
39
41
|
Date:
|
40
|
-
- Thu,
|
42
|
+
- Thu, 19 Nov 2015 14:33:32 GMT
|
41
43
|
Connection:
|
42
44
|
- close
|
43
45
|
body:
|
44
46
|
encoding: UTF-8
|
45
47
|
string: '[{"id":"library","name":"Library","description":"Use your library and
|
46
|
-
earn badges","created_at":"2015-
|
48
|
+
earn badges","created_at":"2015-11-18T11:39:58.859Z","updated_at":"2015-11-18T11:39:58.859Z","total_points_available":125,"badge_count":4,"object":"collection"}]'
|
47
49
|
http_version:
|
48
|
-
recorded_at: Thu,
|
50
|
+
recorded_at: Thu, 19 Nov 2015 14:33:32 GMT
|
49
51
|
recorded_with: VCR 2.9.3
|
@@ -2,13 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri:
|
5
|
+
uri: https://gamification-api.dev/v1/collections
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: collection%5Bdescription%5D=This+is+a+new+collection&collection%5Bname%5D=Create+Collection+Test
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.9.
|
11
|
+
- Faraday v0.9.2
|
12
12
|
Authorization:
|
13
13
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
14
14
|
Content-Type:
|
@@ -22,6 +22,8 @@ http_interactions:
|
|
22
22
|
code: 201
|
23
23
|
message: Created
|
24
24
|
headers:
|
25
|
+
Strict-Transport-Security:
|
26
|
+
- max-age=31536000
|
25
27
|
X-Frame-Options:
|
26
28
|
- SAMEORIGIN
|
27
29
|
X-Xss-Protection:
|
@@ -31,32 +33,32 @@ http_interactions:
|
|
31
33
|
Content-Type:
|
32
34
|
- application/json; charset=utf-8
|
33
35
|
Etag:
|
34
|
-
- '"
|
36
|
+
- '"94419b3b1ecc7ed7a20a01f3df68e688"'
|
35
37
|
Cache-Control:
|
36
38
|
- max-age=0, private, must-revalidate
|
37
39
|
X-Request-Id:
|
38
|
-
-
|
40
|
+
- 239632a5-5a77-4547-85f0-a73221de61b7
|
39
41
|
X-Runtime:
|
40
|
-
- '0.
|
42
|
+
- '0.022556'
|
41
43
|
Date:
|
42
|
-
- Thu,
|
44
|
+
- Thu, 19 Nov 2015 14:33:33 GMT
|
43
45
|
Connection:
|
44
46
|
- close
|
45
47
|
body:
|
46
48
|
encoding: UTF-8
|
47
49
|
string: '{"id":"create-collection-test","name":"Create Collection Test","description":"This
|
48
|
-
is a new collection","created_at":"2015-
|
50
|
+
is a new collection","created_at":"2015-11-19T14:33:33.223Z","updated_at":"2015-11-19T14:33:33.223Z","total_points_available":0,"badge_count":0,"object":"collection"}'
|
49
51
|
http_version:
|
50
|
-
recorded_at: Thu,
|
52
|
+
recorded_at: Thu, 19 Nov 2015 14:33:33 GMT
|
51
53
|
- request:
|
52
54
|
method: delete
|
53
|
-
uri:
|
55
|
+
uri: https://gamification-api.dev/v1/collections/create-collection-test
|
54
56
|
body:
|
55
57
|
encoding: US-ASCII
|
56
58
|
string: ''
|
57
59
|
headers:
|
58
60
|
User-Agent:
|
59
|
-
- Faraday v0.9.
|
61
|
+
- Faraday v0.9.2
|
60
62
|
Authorization:
|
61
63
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
62
64
|
Accept-Encoding:
|
@@ -68,6 +70,8 @@ http_interactions:
|
|
68
70
|
code: 200
|
69
71
|
message: OK
|
70
72
|
headers:
|
73
|
+
Strict-Transport-Security:
|
74
|
+
- max-age=31536000
|
71
75
|
X-Frame-Options:
|
72
76
|
- SAMEORIGIN
|
73
77
|
X-Xss-Protection:
|
@@ -77,21 +81,21 @@ http_interactions:
|
|
77
81
|
Content-Type:
|
78
82
|
- application/json; charset=utf-8
|
79
83
|
Etag:
|
80
|
-
- '"
|
84
|
+
- '"94419b3b1ecc7ed7a20a01f3df68e688"'
|
81
85
|
Cache-Control:
|
82
86
|
- max-age=0, private, must-revalidate
|
83
87
|
X-Request-Id:
|
84
|
-
-
|
88
|
+
- 6eac98e4-7d0b-4161-a3b1-65ebd9078f8a
|
85
89
|
X-Runtime:
|
86
|
-
- '0.
|
90
|
+
- '0.013809'
|
87
91
|
Date:
|
88
|
-
- Thu,
|
92
|
+
- Thu, 19 Nov 2015 14:33:33 GMT
|
89
93
|
Connection:
|
90
94
|
- close
|
91
95
|
body:
|
92
96
|
encoding: UTF-8
|
93
97
|
string: '{"id":"create-collection-test","name":"Create Collection Test","description":"This
|
94
|
-
is a new collection","created_at":"2015-
|
98
|
+
is a new collection","created_at":"2015-11-19T14:33:33.223Z","updated_at":"2015-11-19T14:33:33.223Z","total_points_available":0,"badge_count":0,"object":"collection"}'
|
95
99
|
http_version:
|
96
|
-
recorded_at: Thu,
|
100
|
+
recorded_at: Thu, 19 Nov 2015 14:33:33 GMT
|
97
101
|
recorded_with: VCR 2.9.3
|
@@ -2,13 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri:
|
5
|
+
uri: https://gamification-api.dev/v1/collections
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: collection%5Bdescription%5D=This+is+a+new+badge&collection%5Bname%5D=Create+Collection+Test+Destroy
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.9.
|
11
|
+
- Faraday v0.9.2
|
12
12
|
Authorization:
|
13
13
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
14
14
|
Content-Type:
|
@@ -22,6 +22,8 @@ http_interactions:
|
|
22
22
|
code: 201
|
23
23
|
message: Created
|
24
24
|
headers:
|
25
|
+
Strict-Transport-Security:
|
26
|
+
- max-age=31536000
|
25
27
|
X-Frame-Options:
|
26
28
|
- SAMEORIGIN
|
27
29
|
X-Xss-Protection:
|
@@ -31,32 +33,32 @@ http_interactions:
|
|
31
33
|
Content-Type:
|
32
34
|
- application/json; charset=utf-8
|
33
35
|
Etag:
|
34
|
-
- '"
|
36
|
+
- '"ca1b7ccf7436b3c6d336484ca64b7fd5"'
|
35
37
|
Cache-Control:
|
36
38
|
- max-age=0, private, must-revalidate
|
37
39
|
X-Request-Id:
|
38
|
-
-
|
40
|
+
- b40fd4f6-53d1-4952-9f2d-8a364baa37fe
|
39
41
|
X-Runtime:
|
40
|
-
- '0.
|
42
|
+
- '0.021404'
|
41
43
|
Date:
|
42
|
-
- Thu,
|
44
|
+
- Thu, 19 Nov 2015 14:33:33 GMT
|
43
45
|
Connection:
|
44
46
|
- close
|
45
47
|
body:
|
46
48
|
encoding: UTF-8
|
47
49
|
string: '{"id":"create-collection-test-destroy","name":"Create Collection Test
|
48
|
-
Destroy","description":"This is a new badge","created_at":"2015-
|
50
|
+
Destroy","description":"This is a new badge","created_at":"2015-11-19T14:33:33.368Z","updated_at":"2015-11-19T14:33:33.368Z","total_points_available":0,"badge_count":0,"object":"collection"}'
|
49
51
|
http_version:
|
50
|
-
recorded_at: Thu,
|
52
|
+
recorded_at: Thu, 19 Nov 2015 14:33:33 GMT
|
51
53
|
- request:
|
52
54
|
method: post
|
53
|
-
uri:
|
55
|
+
uri: https://gamification-api.dev/v1/collections
|
54
56
|
body:
|
55
57
|
encoding: UTF-8
|
56
58
|
string: collection%5Bdescription%5D=This+is+a+new+badge&collection%5Bname%5D=Create+Collection+Test+Destroy
|
57
59
|
headers:
|
58
60
|
User-Agent:
|
59
|
-
- Faraday v0.9.
|
61
|
+
- Faraday v0.9.2
|
60
62
|
Authorization:
|
61
63
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
62
64
|
Content-Type:
|
@@ -70,6 +72,8 @@ http_interactions:
|
|
70
72
|
code: 422
|
71
73
|
message: Unprocessable Entity
|
72
74
|
headers:
|
75
|
+
Strict-Transport-Security:
|
76
|
+
- max-age=31536000
|
73
77
|
X-Frame-Options:
|
74
78
|
- SAMEORIGIN
|
75
79
|
X-Xss-Protection:
|
@@ -81,11 +85,11 @@ http_interactions:
|
|
81
85
|
Cache-Control:
|
82
86
|
- no-cache
|
83
87
|
X-Request-Id:
|
84
|
-
-
|
88
|
+
- 63282e5b-49d9-4f13-80a8-593b33abacfc
|
85
89
|
X-Runtime:
|
86
|
-
- '0.
|
90
|
+
- '0.011691'
|
87
91
|
Date:
|
88
|
-
- Thu,
|
92
|
+
- Thu, 19 Nov 2015 14:33:33 GMT
|
89
93
|
Connection:
|
90
94
|
- close
|
91
95
|
body:
|
@@ -93,16 +97,16 @@ http_interactions:
|
|
93
97
|
string: '{"error":{"type":"invalid_request_error","message":{"name":["has already
|
94
98
|
been taken"]},"status":422}}'
|
95
99
|
http_version:
|
96
|
-
recorded_at: Thu,
|
100
|
+
recorded_at: Thu, 19 Nov 2015 14:33:33 GMT
|
97
101
|
- request:
|
98
102
|
method: post
|
99
|
-
uri:
|
103
|
+
uri: https://gamification-api.dev/v1/collections
|
100
104
|
body:
|
101
105
|
encoding: UTF-8
|
102
106
|
string: collection%5Bdescription%5D=This+is+a+new+badge&collection%5Bname%5D=Create+Collection+Test+Destroy
|
103
107
|
headers:
|
104
108
|
User-Agent:
|
105
|
-
- Faraday v0.9.
|
109
|
+
- Faraday v0.9.2
|
106
110
|
Authorization:
|
107
111
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
108
112
|
Content-Type:
|
@@ -116,6 +120,8 @@ http_interactions:
|
|
116
120
|
code: 422
|
117
121
|
message: Unprocessable Entity
|
118
122
|
headers:
|
123
|
+
Strict-Transport-Security:
|
124
|
+
- max-age=31536000
|
119
125
|
X-Frame-Options:
|
120
126
|
- SAMEORIGIN
|
121
127
|
X-Xss-Protection:
|
@@ -127,11 +133,11 @@ http_interactions:
|
|
127
133
|
Cache-Control:
|
128
134
|
- no-cache
|
129
135
|
X-Request-Id:
|
130
|
-
-
|
136
|
+
- 34d2605f-4a36-479f-a49d-a605d26de088
|
131
137
|
X-Runtime:
|
132
|
-
- '0.
|
138
|
+
- '0.011255'
|
133
139
|
Date:
|
134
|
-
- Thu,
|
140
|
+
- Thu, 19 Nov 2015 14:33:33 GMT
|
135
141
|
Connection:
|
136
142
|
- close
|
137
143
|
body:
|
@@ -139,16 +145,16 @@ http_interactions:
|
|
139
145
|
string: '{"error":{"type":"invalid_request_error","message":{"name":["has already
|
140
146
|
been taken"]},"status":422}}'
|
141
147
|
http_version:
|
142
|
-
recorded_at: Thu,
|
148
|
+
recorded_at: Thu, 19 Nov 2015 14:33:33 GMT
|
143
149
|
- request:
|
144
150
|
method: delete
|
145
|
-
uri:
|
151
|
+
uri: https://gamification-api.dev/v1/collections/create-collection-test-destroy
|
146
152
|
body:
|
147
153
|
encoding: US-ASCII
|
148
154
|
string: ''
|
149
155
|
headers:
|
150
156
|
User-Agent:
|
151
|
-
- Faraday v0.9.
|
157
|
+
- Faraday v0.9.2
|
152
158
|
Authorization:
|
153
159
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
154
160
|
Accept-Encoding:
|
@@ -160,6 +166,8 @@ http_interactions:
|
|
160
166
|
code: 200
|
161
167
|
message: OK
|
162
168
|
headers:
|
169
|
+
Strict-Transport-Security:
|
170
|
+
- max-age=31536000
|
163
171
|
X-Frame-Options:
|
164
172
|
- SAMEORIGIN
|
165
173
|
X-Xss-Protection:
|
@@ -169,21 +177,21 @@ http_interactions:
|
|
169
177
|
Content-Type:
|
170
178
|
- application/json; charset=utf-8
|
171
179
|
Etag:
|
172
|
-
- '"
|
180
|
+
- '"ca1b7ccf7436b3c6d336484ca64b7fd5"'
|
173
181
|
Cache-Control:
|
174
182
|
- max-age=0, private, must-revalidate
|
175
183
|
X-Request-Id:
|
176
|
-
-
|
184
|
+
- 0592d5db-dc8d-447f-bc11-257a9e7d6018
|
177
185
|
X-Runtime:
|
178
|
-
- '0.
|
186
|
+
- '0.015172'
|
179
187
|
Date:
|
180
|
-
- Thu,
|
188
|
+
- Thu, 19 Nov 2015 14:33:33 GMT
|
181
189
|
Connection:
|
182
190
|
- close
|
183
191
|
body:
|
184
192
|
encoding: UTF-8
|
185
193
|
string: '{"id":"create-collection-test-destroy","name":"Create Collection Test
|
186
|
-
Destroy","description":"This is a new badge","created_at":"2015-
|
194
|
+
Destroy","description":"This is a new badge","created_at":"2015-11-19T14:33:33.368Z","updated_at":"2015-11-19T14:33:33.368Z","total_points_available":0,"badge_count":0,"object":"collection"}'
|
187
195
|
http_version:
|
188
|
-
recorded_at: Thu,
|
196
|
+
recorded_at: Thu, 19 Nov 2015 14:33:33 GMT
|
189
197
|
recorded_with: VCR 2.9.3
|
@@ -2,13 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri:
|
5
|
+
uri: https://gamification-api.dev/v1/collections
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: collection%5Bdescription%5D=This+is+a+new+badge&collection%5Bname%5D=Create+Collection+for+Destroy
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.9.
|
11
|
+
- Faraday v0.9.2
|
12
12
|
Authorization:
|
13
13
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
14
14
|
Content-Type:
|
@@ -22,6 +22,8 @@ http_interactions:
|
|
22
22
|
code: 201
|
23
23
|
message: Created
|
24
24
|
headers:
|
25
|
+
Strict-Transport-Security:
|
26
|
+
- max-age=31536000
|
25
27
|
X-Frame-Options:
|
26
28
|
- SAMEORIGIN
|
27
29
|
X-Xss-Protection:
|
@@ -31,32 +33,32 @@ http_interactions:
|
|
31
33
|
Content-Type:
|
32
34
|
- application/json; charset=utf-8
|
33
35
|
Etag:
|
34
|
-
- '"
|
36
|
+
- '"58584173dbd0fa224d02f1e50a35aa1a"'
|
35
37
|
Cache-Control:
|
36
38
|
- max-age=0, private, must-revalidate
|
37
39
|
X-Request-Id:
|
38
|
-
-
|
40
|
+
- 0f7a4f0f-919f-4e86-8b35-950b2124be46
|
39
41
|
X-Runtime:
|
40
|
-
- '0.
|
42
|
+
- '0.017810'
|
41
43
|
Date:
|
42
|
-
- Thu,
|
44
|
+
- Thu, 19 Nov 2015 14:34:14 GMT
|
43
45
|
Connection:
|
44
46
|
- close
|
45
47
|
body:
|
46
48
|
encoding: UTF-8
|
47
49
|
string: '{"id":"create-collection-for-destroy","name":"Create Collection for
|
48
|
-
Destroy","description":"This is a new badge","created_at":"2015-
|
50
|
+
Destroy","description":"This is a new badge","created_at":"2015-11-19T14:34:14.289Z","updated_at":"2015-11-19T14:34:14.289Z","total_points_available":0,"badge_count":0,"object":"collection"}'
|
49
51
|
http_version:
|
50
|
-
recorded_at: Thu,
|
52
|
+
recorded_at: Thu, 19 Nov 2015 14:34:14 GMT
|
51
53
|
- request:
|
52
54
|
method: delete
|
53
|
-
uri:
|
55
|
+
uri: https://gamification-api.dev/v1/collections/create-collection-for-destroy
|
54
56
|
body:
|
55
57
|
encoding: US-ASCII
|
56
58
|
string: ''
|
57
59
|
headers:
|
58
60
|
User-Agent:
|
59
|
-
- Faraday v0.9.
|
61
|
+
- Faraday v0.9.2
|
60
62
|
Authorization:
|
61
63
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
62
64
|
Accept-Encoding:
|
@@ -68,6 +70,8 @@ http_interactions:
|
|
68
70
|
code: 200
|
69
71
|
message: OK
|
70
72
|
headers:
|
73
|
+
Strict-Transport-Security:
|
74
|
+
- max-age=31536000
|
71
75
|
X-Frame-Options:
|
72
76
|
- SAMEORIGIN
|
73
77
|
X-Xss-Protection:
|
@@ -77,32 +81,32 @@ http_interactions:
|
|
77
81
|
Content-Type:
|
78
82
|
- application/json; charset=utf-8
|
79
83
|
Etag:
|
80
|
-
- '"
|
84
|
+
- '"58584173dbd0fa224d02f1e50a35aa1a"'
|
81
85
|
Cache-Control:
|
82
86
|
- max-age=0, private, must-revalidate
|
83
87
|
X-Request-Id:
|
84
|
-
-
|
88
|
+
- e9e30cbe-eb06-4b40-8e7a-a87ffd2caec9
|
85
89
|
X-Runtime:
|
86
|
-
- '0.
|
90
|
+
- '0.014294'
|
87
91
|
Date:
|
88
|
-
- Thu,
|
92
|
+
- Thu, 19 Nov 2015 14:34:14 GMT
|
89
93
|
Connection:
|
90
94
|
- close
|
91
95
|
body:
|
92
96
|
encoding: UTF-8
|
93
97
|
string: '{"id":"create-collection-for-destroy","name":"Create Collection for
|
94
|
-
Destroy","description":"This is a new badge","created_at":"2015-
|
98
|
+
Destroy","description":"This is a new badge","created_at":"2015-11-19T14:34:14.289Z","updated_at":"2015-11-19T14:34:14.289Z","total_points_available":0,"badge_count":0,"object":"collection"}'
|
95
99
|
http_version:
|
96
|
-
recorded_at: Thu,
|
100
|
+
recorded_at: Thu, 19 Nov 2015 14:34:14 GMT
|
97
101
|
- request:
|
98
102
|
method: get
|
99
|
-
uri:
|
103
|
+
uri: https://gamification-api.dev/v1/collections/create-collection-for-destroy
|
100
104
|
body:
|
101
105
|
encoding: US-ASCII
|
102
106
|
string: ''
|
103
107
|
headers:
|
104
108
|
User-Agent:
|
105
|
-
- Faraday v0.9.
|
109
|
+
- Faraday v0.9.2
|
106
110
|
Authorization:
|
107
111
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
108
112
|
Accept-Encoding:
|
@@ -114,6 +118,8 @@ http_interactions:
|
|
114
118
|
code: 404
|
115
119
|
message: Not Found
|
116
120
|
headers:
|
121
|
+
Strict-Transport-Security:
|
122
|
+
- max-age=31536000
|
117
123
|
X-Frame-Options:
|
118
124
|
- SAMEORIGIN
|
119
125
|
X-Xss-Protection:
|
@@ -125,11 +131,11 @@ http_interactions:
|
|
125
131
|
Cache-Control:
|
126
132
|
- no-cache
|
127
133
|
X-Request-Id:
|
128
|
-
-
|
134
|
+
- c533afd0-7e04-4b39-98b5-ef169d864b34
|
129
135
|
X-Runtime:
|
130
|
-
- '0.
|
136
|
+
- '0.007994'
|
131
137
|
Date:
|
132
|
-
- Thu,
|
138
|
+
- Thu, 19 Nov 2015 14:34:14 GMT
|
133
139
|
Connection:
|
134
140
|
- close
|
135
141
|
body:
|
@@ -137,16 +143,16 @@ http_interactions:
|
|
137
143
|
string: '{"error":{"type":"invalid_request_error","message":"No collection exists
|
138
144
|
with id: create-collection-for-destroy","status":404}}'
|
139
145
|
http_version:
|
140
|
-
recorded_at: Thu,
|
146
|
+
recorded_at: Thu, 19 Nov 2015 14:34:14 GMT
|
141
147
|
- request:
|
142
148
|
method: get
|
143
|
-
uri:
|
149
|
+
uri: https://gamification-api.dev/v1/collections/create-collection-for-destroy
|
144
150
|
body:
|
145
151
|
encoding: US-ASCII
|
146
152
|
string: ''
|
147
153
|
headers:
|
148
154
|
User-Agent:
|
149
|
-
- Faraday v0.9.
|
155
|
+
- Faraday v0.9.2
|
150
156
|
Authorization:
|
151
157
|
- Token token="c9cde524238644fa93393159e5e9ad87"
|
152
158
|
Accept-Encoding:
|
@@ -158,6 +164,8 @@ http_interactions:
|
|
158
164
|
code: 404
|
159
165
|
message: Not Found
|
160
166
|
headers:
|
167
|
+
Strict-Transport-Security:
|
168
|
+
- max-age=31536000
|
161
169
|
X-Frame-Options:
|
162
170
|
- SAMEORIGIN
|
163
171
|
X-Xss-Protection:
|
@@ -169,11 +177,11 @@ http_interactions:
|
|
169
177
|
Cache-Control:
|
170
178
|
- no-cache
|
171
179
|
X-Request-Id:
|
172
|
-
-
|
180
|
+
- 6f937c1b-6e18-4d85-9df1-03c9b2b77891
|
173
181
|
X-Runtime:
|
174
|
-
- '0.
|
182
|
+
- '0.007071'
|
175
183
|
Date:
|
176
|
-
- Thu,
|
184
|
+
- Thu, 19 Nov 2015 14:34:14 GMT
|
177
185
|
Connection:
|
178
186
|
- close
|
179
187
|
body:
|
@@ -181,5 +189,5 @@ http_interactions:
|
|
181
189
|
string: '{"error":{"type":"invalid_request_error","message":"No collection exists
|
182
190
|
with id: create-collection-for-destroy","status":404}}'
|
183
191
|
http_version:
|
184
|
-
recorded_at: Thu,
|
192
|
+
recorded_at: Thu, 19 Nov 2015 14:34:14 GMT
|
185
193
|
recorded_with: VCR 2.9.3
|