kinja 0.0.12 → 0.0.13
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/lib/kinja/client.rb +8 -2
- data/lib/kinja/helpers.rb +3 -2
- data/lib/kinja/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/api-token-test.yml +83 -28
- data/spec/fixtures/vcr_cassettes/get_author_default_blog_id.yml +13 -25
- data/spec/fixtures/vcr_cassettes/get_author_profile.yml +12 -24
- data/spec/fixtures/vcr_cassettes/get_post.yml +218 -210
- data/spec/fixtures/vcr_cassettes/login.yml +30 -40
- data/spec/fixtures/vcr_cassettes/update-post.yml +54 -56
- data/spec/fixtures/vcr_cassettes/write-post.yml +83 -102
- data/spec/lib/kinja/post_spec.rb +1 -1
- data/spec/lib/kinja_spec.rb +2 -2
- metadata +2 -4
- data/spec/fixtures/vcr_cassettes/author-path-er.yml +0 -66
@@ -1,12 +1,14 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
|
-
method:
|
5
|
-
uri: http://kinja.com/api/profile/
|
4
|
+
method: post
|
5
|
+
uri: http://kinja.com/api/profile/session/burnerLogin
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string: ''
|
9
|
-
headers:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"screenName":"gemtest","token":"mzjjk judly bjysk ujnbv"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
10
12
|
response:
|
11
13
|
status:
|
12
14
|
code: 200
|
@@ -20,14 +22,14 @@ http_interactions:
|
|
20
22
|
- CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
|
21
23
|
Set-Cookie:
|
22
24
|
- KinjaBurner="d41d8cd98f00b204e9800998ecf8427e|mzjjk judly bjysk ujnbv"; Expires=Mon,
|
23
|
-
|
24
|
-
- KinjaRememberMe=5876237249235511023|
|
25
|
-
Expires=Mon,
|
26
|
-
- KinjaSession=
|
27
|
-
|
25
|
+
21 Jul 2025 16:06:41 GMT; Path=/; HTTPOnly
|
26
|
+
- KinjaRememberMe=5876237249235511023|bb8479ff-1bab-418e-8352-7f2a211eebde;
|
27
|
+
Expires=Mon, 21 Jul 2025 16:06:41 GMT; Path=/; HTTPOnly
|
28
|
+
- KinjaSession=bb8479ff-1bab-418e-8352-7f2a211eebde; Expires=Fri, 31 Jul 2015
|
29
|
+
16:06:41 GMT; Path=/; HTTPOnly
|
28
30
|
- geocc=US;path=/;
|
29
31
|
X-Kinja:
|
30
|
-
- '
|
32
|
+
- 'app19.bfc.kinja-ops.com #1445'
|
31
33
|
X-Kinja-Version:
|
32
34
|
- '20141118'
|
33
35
|
X-Robots-Tag:
|
@@ -39,37 +41,35 @@ http_interactions:
|
|
39
41
|
Accept-Ranges:
|
40
42
|
- bytes
|
41
43
|
Date:
|
42
|
-
- Fri,
|
44
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
43
45
|
Via:
|
44
46
|
- 1.1 varnish
|
45
|
-
Age:
|
46
|
-
- '0'
|
47
47
|
Connection:
|
48
48
|
- keep-alive
|
49
49
|
X-Served-By:
|
50
|
-
- cache-
|
50
|
+
- cache-jfk1030-JFK
|
51
51
|
X-Cache:
|
52
52
|
- MISS
|
53
53
|
X-Cache-Hits:
|
54
54
|
- '0'
|
55
55
|
X-Timer:
|
56
|
-
-
|
56
|
+
- S1437754001.636579,VS0,VE44
|
57
57
|
Vary:
|
58
58
|
- X-Feature-Hash
|
59
59
|
body:
|
60
60
|
encoding: UTF-8
|
61
|
-
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","authType":4,"authName":"burner","createdMillis":1424733492000,"updatedMillis":
|
61
|
+
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","authType":4,"authName":"burner","createdMillis":1424733492000,"updatedMillis":1437754001674,"lastLoginMillis":1437754001674,"status":"enabled","avatar":{"id":"17jcxk0ml1k8qpng","format":"png"},"superUser":false}}'
|
62
62
|
http_version:
|
63
|
-
recorded_at: Fri,
|
63
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
64
64
|
- request:
|
65
|
-
method:
|
66
|
-
uri: http://kinja.com/api/profile/token
|
65
|
+
method: post
|
66
|
+
uri: http://kinja.com/api/profile/token/create
|
67
67
|
body:
|
68
|
-
encoding:
|
68
|
+
encoding: UTF-8
|
69
69
|
string: ''
|
70
70
|
headers:
|
71
71
|
Cookie:
|
72
|
-
- KinjaSession=
|
72
|
+
- KinjaSession=bb8479ff-1bab-418e-8352-7f2a211eebde
|
73
73
|
response:
|
74
74
|
status:
|
75
75
|
code: 200
|
@@ -82,11 +82,11 @@ http_interactions:
|
|
82
82
|
P3p:
|
83
83
|
- CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
|
84
84
|
Set-Cookie:
|
85
|
-
- KinjaSession=
|
86
|
-
|
85
|
+
- KinjaSession=bb8479ff-1bab-418e-8352-7f2a211eebde; Expires=Fri, 31 Jul 2015
|
86
|
+
16:06:41 GMT; Path=/; HTTPOnly
|
87
87
|
- geocc=US;path=/;
|
88
88
|
X-Kinja:
|
89
|
-
- 'app11.
|
89
|
+
- 'app11.bfc.kinja-ops.com #1445'
|
90
90
|
X-Kinja-Version:
|
91
91
|
- '20141118'
|
92
92
|
X-Robots-Tag:
|
@@ -94,32 +94,30 @@ http_interactions:
|
|
94
94
|
X-Cdn-Fetch:
|
95
95
|
- mantle-setcookie
|
96
96
|
Content-Length:
|
97
|
-
- '
|
97
|
+
- '181'
|
98
98
|
Accept-Ranges:
|
99
99
|
- bytes
|
100
100
|
Date:
|
101
|
-
- Fri,
|
101
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
102
102
|
Via:
|
103
103
|
- 1.1 varnish
|
104
|
-
Age:
|
105
|
-
- '0'
|
106
104
|
Connection:
|
107
105
|
- keep-alive
|
108
106
|
X-Served-By:
|
109
|
-
- cache-
|
107
|
+
- cache-jfk1023-JFK
|
110
108
|
X-Cache:
|
111
109
|
- MISS
|
112
110
|
X-Cache-Hits:
|
113
111
|
- '0'
|
114
112
|
X-Timer:
|
115
|
-
-
|
113
|
+
- S1437754001.723059,VS0,VE51
|
116
114
|
Vary:
|
117
115
|
- X-Feature-Hash
|
118
116
|
body:
|
119
117
|
encoding: UTF-8
|
120
|
-
string: '{"meta":{"error":null,"warnings":[]},"data":{"token":"
|
118
|
+
string: '{"meta":{"error":null,"warnings":[]},"data":{"token":"ffc16536-2966-4af9-a21a-09370ed3a67b-0-f4fc81de731d2f2098ca87a11d91d788ecd996d6","secure":false,"createdMillis":1437754001763}}'
|
121
119
|
http_version:
|
122
|
-
recorded_at: Fri,
|
120
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
123
121
|
- request:
|
124
122
|
method: get
|
125
123
|
uri: http://kinja.com/api/profile/user/views/asAuthor?ids=5876237249235511023
|
@@ -135,7 +133,7 @@ http_interactions:
|
|
135
133
|
Content-Type:
|
136
134
|
- application/json; charset=utf-8
|
137
135
|
X-Kinja:
|
138
|
-
- '
|
136
|
+
- 'app06.bfc.kinja-ops.com #1445'
|
139
137
|
X-Kinja-Version:
|
140
138
|
- '20141118'
|
141
139
|
X-Robots-Tag:
|
@@ -147,7 +145,7 @@ http_interactions:
|
|
147
145
|
Accept-Ranges:
|
148
146
|
- bytes
|
149
147
|
Date:
|
150
|
-
- Fri,
|
148
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
151
149
|
Via:
|
152
150
|
- 1.1 varnish
|
153
151
|
Age:
|
@@ -155,13 +153,13 @@ http_interactions:
|
|
155
153
|
Connection:
|
156
154
|
- keep-alive
|
157
155
|
X-Served-By:
|
158
|
-
- cache-
|
156
|
+
- cache-jfk1022-JFK
|
159
157
|
X-Cache:
|
160
|
-
-
|
158
|
+
- HIT
|
161
159
|
X-Cache-Hits:
|
162
|
-
- '
|
160
|
+
- '1'
|
163
161
|
X-Timer:
|
164
|
-
-
|
162
|
+
- S1437754001.806497,VS0,VE0
|
165
163
|
Vary:
|
166
164
|
- X-Feature-Hash
|
167
165
|
Set-Cookie:
|
@@ -170,13 +168,13 @@ http_interactions:
|
|
170
168
|
encoding: UTF-8
|
171
169
|
string: '{"meta":{"error":null,"warnings":[]},"data":[{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","superUser":false,"defaultBlogId":1634457255,"avatar":{"id":"17jcxk0ml1k8qpng","format":"png"}}]}'
|
172
170
|
http_version:
|
173
|
-
recorded_at: Fri,
|
171
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
174
172
|
- request:
|
175
173
|
method: post
|
176
|
-
uri: http://kinja.com/api/core/post/1710983044/update?token=
|
174
|
+
uri: http://kinja.com/api/core/post/1710983044/update?token=ffc16536-2966-4af9-a21a-09370ed3a67b-0-f4fc81de731d2f2098ca87a11d91d788ecd996d6
|
177
175
|
body:
|
178
176
|
encoding: UTF-8
|
179
|
-
string: '{"publishTimeMillis":
|
177
|
+
string: '{"publishTimeMillis":1437754001616,"defaultBlogId":1634457255}'
|
180
178
|
headers:
|
181
179
|
Content-Type:
|
182
180
|
- application/json
|
@@ -185,44 +183,44 @@ http_interactions:
|
|
185
183
|
code: 200
|
186
184
|
message: OK
|
187
185
|
headers:
|
188
|
-
Access-Control-Allow-Origin:
|
189
|
-
- "*"
|
190
186
|
Access-Control-Allow-Headers:
|
191
187
|
- Content-Type
|
192
188
|
Access-Control-Allow-Methods:
|
193
189
|
- POST, GET, OPTIONS, PUT, DELETE
|
190
|
+
Access-Control-Allow-Origin:
|
191
|
+
- "*"
|
194
192
|
Cache-Control:
|
195
193
|
- stale-if-error=86400
|
196
194
|
Content-Type:
|
197
195
|
- application/json; charset=utf-8
|
198
196
|
X-Kinja:
|
199
|
-
- '
|
197
|
+
- 'app16.bfc.kinja-ops.com #6703'
|
200
198
|
X-Cdn-Fetch:
|
201
199
|
- mantle-default
|
202
200
|
Content-Length:
|
203
|
-
- '
|
201
|
+
- '2832'
|
204
202
|
Accept-Ranges:
|
205
203
|
- bytes
|
206
204
|
Date:
|
207
|
-
- Fri,
|
205
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
208
206
|
Via:
|
209
207
|
- 1.1 varnish
|
210
208
|
Connection:
|
211
209
|
- keep-alive
|
212
210
|
X-Served-By:
|
213
|
-
- cache-
|
211
|
+
- cache-jfk1035-JFK
|
214
212
|
X-Cache:
|
215
213
|
- MISS
|
216
214
|
X-Cache-Hits:
|
217
215
|
- '0'
|
218
216
|
X-Timer:
|
219
|
-
-
|
217
|
+
- S1437754001.847161,VS0,VE67
|
220
218
|
Set-Cookie:
|
221
219
|
- geocc=US;path=/;
|
222
220
|
body:
|
223
221
|
encoding: UTF-8
|
224
|
-
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":1710983044,"parentId":null,"parentAuthorId":null,"starterId":1710983044,"publishTimeMillis":
|
225
|
-
data-attr=\"http://gawker.com/no-playlist-1685415865\" href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a>]</p>","source":"wysiwyg","images":[],"videos":[],"videoThumbs":[],"author":{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","defaultBlogId":1634457255,"defaultBlog":null,"avatar":{"id":"17jcxk0ml1k8qpng","format":"png"}},"tags":[],"blogs":[{"id":1634457255,"name":"gemtest","displayName":"gemtest","canonicalHost":"gemtest.kinja.com","hosts":[],"status":"ENABLED","timezone":"America/New_York","timezoneOffset":-14400000,"timezoneShortname":"EDT","
|
222
|
+
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":1710983044,"parentId":null,"parentAuthorId":null,"starterId":1710983044,"publishTimeMillis":1437754001616,"lastUpdateTimeMillis":1437754001892,"timezone":"America/New_York","shareBlogId":null,"sharedPostId":null,"sharedUrl":null,"salesAvatar":null,"sponsored":false,"status":"PUBLISHED","authorId":"5876237249235511023","allowReplies":true,"byline":"","showByline":true,"properties":"","xmliId":null,"blogId":[1634457255],"defaultBlogId":1634457255,"authorBlogId":1634457255,"liveBlog":false,"approved":true,"headline":"","original":"<p>[<a
|
223
|
+
data-attr=\"http://gawker.com/no-playlist-1685415865\" href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a>]</p>","source":"wysiwyg","images":[],"videos":[],"videoThumbs":[],"author":{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","defaultBlogId":1634457255,"defaultBlog":null,"avatar":{"id":"17jcxk0ml1k8qpng","format":"png"}},"tags":[],"blogs":[{"id":1634457255,"name":"gemtest","displayName":"gemtest","canonicalHost":"gemtest.kinja.com","hosts":[],"status":"ENABLED","timezone":"America/New_York","timezoneOffset":-14400000,"timezoneShortname":"EDT","properties":null,"avatar":null}],"annotation":null,"viewstats":null,"promotions":[],"replyMeta":null,"replyCount":null,"parent":null,"starter":null,"blogPostAction":null,"score":null,"insets":[],"referencedBy":[],"likes":null,"sharedPost":null,"reframes":[],"noindex":null,"isRecommended":null,"permalink":"http://gemtest.kinja.com/gawker-1710983044","permalinkHost":"http://gemtest.kinja.com","permalinkPath":"/gawker-1710983044","display":"<p
|
226
224
|
class=\"first-text\">[<a href=\"http://gawker.com/no-playlist-1685415865\"
|
227
225
|
target=\"_blank\">Gawker</a><inset id=\"1685415865\" />]</p><!-- core-decorated
|
228
226
|
-->","excerpt":"<p class=\"first-text\">[<a href=\"http://gawker.com/no-playlist-1685415865\"
|
@@ -230,10 +228,10 @@ http_interactions:
|
|
230
228
|
class=\"first-text\">[<a href=\"http://gawker.com/no-playlist-1685415865\"
|
231
229
|
target=\"_blank\">Gawker</a>]</p>","excerptWithAssets":"<p class=\"first-text\">[<a
|
232
230
|
href=\"http://gawker.com/no-playlist-1685415865\" target=\"_blank\">Gawker</a>\n
|
233
|
-
<inset id=\"1685415865\" />]</p>","aboveHeadline":null,"leftOfHeadline":null,"firstAsset":"","length":8,"postId":1710983044,"isBlip":true,"sharingMainImage":null,"facebookImage":null,"firstSentence":"[Gawker]","hasReadMore":false,"publishTime":{"timestamp":
|
234
|
-
|
235
|
-
GMT","yMdHmsZ":"2015-
|
236
|
-
|
231
|
+
<inset id=\"1685415865\" />]</p>","aboveHeadline":null,"leftOfHeadline":null,"firstAsset":"","length":8,"postId":1710983044,"isBlip":true,"sharingMainImage":null,"facebookImage":null,"firstSentence":"[Gawker]","hasReadMore":false,"publishTime":{"timestamp":1437754001616,"timezone":"America/New_York","MdyHm":"07/24/2015
|
232
|
+
12:06","MdyatHm":"07/24/2015 at 12:06","rfc822":"Fri, 24 Jul 2015 16:06:41
|
233
|
+
GMT","yMdHmsZ":"2015-07-24T12:06:41-04:00","hmma":"12:06pm","day":"Friday","Mddyyhmma":"7/24/15
|
234
|
+
12:06pm","fullDate":"July 24, 2015","relative":{"amount":null,"type":"now"}},"authorBlogName":"gemtest"}}'
|
237
235
|
http_version:
|
238
|
-
recorded_at: Fri,
|
236
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
239
237
|
recorded_with: VCR 2.9.3
|
@@ -1,133 +1,123 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
|
-
method:
|
5
|
-
uri: http://kinja.com/api/profile/
|
4
|
+
method: post
|
5
|
+
uri: http://kinja.com/api/profile/session/burnerLogin
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string: ''
|
9
|
-
headers:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"screenName":"gemtest","token":"mzjjk judly bjysk ujnbv"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
10
12
|
response:
|
11
13
|
status:
|
12
14
|
code: 200
|
13
15
|
message: OK
|
14
16
|
headers:
|
15
|
-
Access-Control-Allow-Origin:
|
16
|
-
- "*"
|
17
|
-
Access-Control-Allow-Headers:
|
18
|
-
- Content-Type
|
19
|
-
X-Kinja-Version:
|
20
|
-
- '20141118'
|
21
|
-
Access-Control-Allow-Methods:
|
22
|
-
- POST, GET, OPTIONS, PUT, DELETE
|
23
17
|
Cache-Control:
|
24
18
|
- no-cache, no-store, private
|
25
|
-
P3p:
|
26
|
-
- CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
|
27
19
|
Content-Type:
|
28
20
|
- application/json; charset=utf-8
|
29
|
-
|
30
|
-
-
|
21
|
+
P3p:
|
22
|
+
- CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
|
31
23
|
Set-Cookie:
|
32
|
-
- KinjaBurner="d41d8cd98f00b204e9800998ecf8427e|mzjjk judly bjysk ujnbv"; Expires=
|
33
|
-
|
34
|
-
- KinjaRememberMe=5876237249235511023|
|
35
|
-
Expires=
|
36
|
-
- KinjaSession=
|
37
|
-
|
24
|
+
- KinjaBurner="d41d8cd98f00b204e9800998ecf8427e|mzjjk judly bjysk ujnbv"; Expires=Mon,
|
25
|
+
21 Jul 2025 16:06:41 GMT; Path=/; HTTPOnly
|
26
|
+
- KinjaRememberMe=5876237249235511023|6a603d47-2dbe-403c-b52e-00ed3de919f8;
|
27
|
+
Expires=Mon, 21 Jul 2025 16:06:41 GMT; Path=/; HTTPOnly
|
28
|
+
- KinjaSession=6a603d47-2dbe-403c-b52e-00ed3de919f8; Expires=Fri, 31 Jul 2015
|
29
|
+
16:06:41 GMT; Path=/; HTTPOnly
|
38
30
|
- geocc=US;path=/;
|
39
31
|
X-Kinja:
|
40
|
-
- '
|
32
|
+
- 'app16.bfc.kinja-ops.com #1445'
|
33
|
+
X-Kinja-Version:
|
34
|
+
- '20141118'
|
35
|
+
X-Robots-Tag:
|
36
|
+
- noindex
|
37
|
+
X-Cdn-Fetch:
|
38
|
+
- mantle-setcookie
|
41
39
|
Content-Length:
|
42
|
-
- '
|
40
|
+
- '332'
|
43
41
|
Accept-Ranges:
|
44
|
-
-
|
42
|
+
- bytes
|
45
43
|
Date:
|
46
|
-
-
|
44
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
47
45
|
Via:
|
48
46
|
- 1.1 varnish
|
49
|
-
Age:
|
50
|
-
- '0'
|
51
47
|
Connection:
|
52
48
|
- keep-alive
|
53
49
|
X-Served-By:
|
54
|
-
- cache-
|
50
|
+
- cache-jfk1023-JFK
|
55
51
|
X-Cache:
|
56
52
|
- MISS
|
57
53
|
X-Cache-Hits:
|
58
54
|
- '0'
|
59
55
|
X-Timer:
|
60
|
-
-
|
56
|
+
- S1437754001.287935,VS0,VE46
|
61
57
|
Vary:
|
62
58
|
- X-Feature-Hash
|
63
59
|
body:
|
64
60
|
encoding: UTF-8
|
65
|
-
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","authType":4,"authName":"burner","createdMillis":1424733492000,"updatedMillis":
|
61
|
+
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","authType":4,"authName":"burner","createdMillis":1424733492000,"updatedMillis":1437754001325,"lastLoginMillis":1437754001325,"status":"enabled","avatar":{"id":"17jcxk0ml1k8qpng","format":"png"},"superUser":false}}'
|
66
62
|
http_version:
|
67
|
-
recorded_at:
|
63
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
68
64
|
- request:
|
69
|
-
method:
|
70
|
-
uri: http://kinja.com/api/profile/token
|
65
|
+
method: post
|
66
|
+
uri: http://kinja.com/api/profile/token/create
|
71
67
|
body:
|
72
|
-
encoding:
|
68
|
+
encoding: UTF-8
|
73
69
|
string: ''
|
74
70
|
headers:
|
75
71
|
Cookie:
|
76
|
-
- KinjaSession=
|
72
|
+
- KinjaSession=6a603d47-2dbe-403c-b52e-00ed3de919f8
|
77
73
|
response:
|
78
74
|
status:
|
79
75
|
code: 200
|
80
76
|
message: OK
|
81
77
|
headers:
|
82
|
-
Access-Control-Allow-Origin:
|
83
|
-
- "*"
|
84
|
-
Access-Control-Allow-Headers:
|
85
|
-
- Content-Type
|
86
|
-
X-Kinja-Version:
|
87
|
-
- '20141118'
|
88
|
-
Access-Control-Allow-Methods:
|
89
|
-
- POST, GET, OPTIONS, PUT, DELETE
|
90
78
|
Cache-Control:
|
91
79
|
- no-cache, no-store, private
|
92
|
-
P3p:
|
93
|
-
- CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
|
94
80
|
Content-Type:
|
95
81
|
- application/json; charset=utf-8
|
96
|
-
|
97
|
-
-
|
82
|
+
P3p:
|
83
|
+
- CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
|
98
84
|
Set-Cookie:
|
99
|
-
- KinjaSession=
|
100
|
-
|
85
|
+
- KinjaSession=6a603d47-2dbe-403c-b52e-00ed3de919f8; Expires=Fri, 31 Jul 2015
|
86
|
+
16:06:41 GMT; Path=/; HTTPOnly
|
101
87
|
- geocc=US;path=/;
|
102
88
|
X-Kinja:
|
103
|
-
- '
|
89
|
+
- 'app04.bfc.kinja-ops.com #1445'
|
90
|
+
X-Kinja-Version:
|
91
|
+
- '20141118'
|
92
|
+
X-Robots-Tag:
|
93
|
+
- noindex
|
94
|
+
X-Cdn-Fetch:
|
95
|
+
- mantle-setcookie
|
104
96
|
Content-Length:
|
105
|
-
- '
|
97
|
+
- '181'
|
106
98
|
Accept-Ranges:
|
107
|
-
-
|
99
|
+
- bytes
|
108
100
|
Date:
|
109
|
-
-
|
101
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
110
102
|
Via:
|
111
103
|
- 1.1 varnish
|
112
|
-
Age:
|
113
|
-
- '0'
|
114
104
|
Connection:
|
115
105
|
- keep-alive
|
116
106
|
X-Served-By:
|
117
|
-
- cache-
|
107
|
+
- cache-jfk1025-JFK
|
118
108
|
X-Cache:
|
119
109
|
- MISS
|
120
110
|
X-Cache-Hits:
|
121
111
|
- '0'
|
122
112
|
X-Timer:
|
123
|
-
-
|
113
|
+
- S1437754001.374869,VS0,VE36
|
124
114
|
Vary:
|
125
115
|
- X-Feature-Hash
|
126
116
|
body:
|
127
117
|
encoding: UTF-8
|
128
|
-
string: '{"meta":{"error":null,"warnings":[]},"data":{"token":"
|
118
|
+
string: '{"meta":{"error":null,"warnings":[]},"data":{"token":"70e5c2cf-33ba-4bde-b2ec-afec8e11b53a-0-73235965eb552baa5e2ddbece97f77ed2416e7e5","secure":false,"createdMillis":1437754001401}}'
|
129
119
|
http_version:
|
130
|
-
recorded_at:
|
120
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
131
121
|
- request:
|
132
122
|
method: get
|
133
123
|
uri: http://kinja.com/api/profile/user/views/asAuthor?ids=5876237249235511023
|
@@ -140,28 +130,22 @@ http_interactions:
|
|
140
130
|
code: 200
|
141
131
|
message: OK
|
142
132
|
headers:
|
143
|
-
Access-Control-Allow-Origin:
|
144
|
-
- "*"
|
145
|
-
Access-Control-Allow-Headers:
|
146
|
-
- Content-Type
|
147
|
-
X-Kinja-Version:
|
148
|
-
- '20141118'
|
149
|
-
Access-Control-Allow-Methods:
|
150
|
-
- POST, GET, OPTIONS, PUT, DELETE
|
151
133
|
Content-Type:
|
152
134
|
- application/json; charset=utf-8
|
135
|
+
X-Kinja:
|
136
|
+
- 'app06.bfc.kinja-ops.com #1445'
|
137
|
+
X-Kinja-Version:
|
138
|
+
- '20141118'
|
153
139
|
X-Robots-Tag:
|
154
140
|
- noindex
|
155
|
-
X-Kinja:
|
156
|
-
- 'app16.bfc.kinja-ops.com #993'
|
157
141
|
X-Cdn-Fetch:
|
158
142
|
- mantle-origin-cache
|
159
143
|
Content-Length:
|
160
144
|
- '217'
|
161
145
|
Accept-Ranges:
|
162
|
-
-
|
146
|
+
- bytes
|
163
147
|
Date:
|
164
|
-
-
|
148
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
165
149
|
Via:
|
166
150
|
- 1.1 varnish
|
167
151
|
Age:
|
@@ -169,13 +153,13 @@ http_interactions:
|
|
169
153
|
Connection:
|
170
154
|
- keep-alive
|
171
155
|
X-Served-By:
|
172
|
-
- cache-
|
156
|
+
- cache-jfk1021-JFK
|
173
157
|
X-Cache:
|
174
158
|
- MISS
|
175
159
|
X-Cache-Hits:
|
176
160
|
- '0'
|
177
161
|
X-Timer:
|
178
|
-
-
|
162
|
+
- S1437754001.469234,VS0,VE2
|
179
163
|
Vary:
|
180
164
|
- X-Feature-Hash
|
181
165
|
Set-Cookie:
|
@@ -184,10 +168,10 @@ http_interactions:
|
|
184
168
|
encoding: UTF-8
|
185
169
|
string: '{"meta":{"error":null,"warnings":[]},"data":[{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","superUser":false,"defaultBlogId":1634457255,"avatar":{"id":"17jcxk0ml1k8qpng","format":"png"}}]}'
|
186
170
|
http_version:
|
187
|
-
recorded_at:
|
171
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
188
172
|
- request:
|
189
173
|
method: post
|
190
|
-
uri: http://kinja.com/api/core/post/add?token=
|
174
|
+
uri: http://kinja.com/api/core/post/add?token=70e5c2cf-33ba-4bde-b2ec-afec8e11b53a-0-73235965eb552baa5e2ddbece97f77ed2416e7e5
|
191
175
|
body:
|
192
176
|
encoding: UTF-8
|
193
177
|
string: '{"headline":"","original":"<p>[<a data-attr=\"http://gawker.com/no-playlist-1685415865\"
|
@@ -200,56 +184,53 @@ http_interactions:
|
|
200
184
|
code: 200
|
201
185
|
message: OK
|
202
186
|
headers:
|
203
|
-
Access-Control-Allow-Origin:
|
204
|
-
- "*"
|
205
187
|
Access-Control-Allow-Headers:
|
206
188
|
- Content-Type
|
207
189
|
Access-Control-Allow-Methods:
|
208
190
|
- POST, GET, OPTIONS, PUT, DELETE
|
191
|
+
Access-Control-Allow-Origin:
|
192
|
+
- "*"
|
193
|
+
Cache-Control:
|
194
|
+
- stale-if-error=86400
|
209
195
|
Content-Type:
|
210
196
|
- application/json; charset=utf-8
|
211
197
|
X-Kinja:
|
212
|
-
- '
|
198
|
+
- 'app11.xyz.kinja-ops.com #6703'
|
213
199
|
X-Cdn-Fetch:
|
214
200
|
- mantle-default
|
215
201
|
Content-Length:
|
216
|
-
- '
|
202
|
+
- '2712'
|
217
203
|
Accept-Ranges:
|
218
|
-
-
|
204
|
+
- bytes
|
219
205
|
Date:
|
220
|
-
-
|
206
|
+
- Fri, 24 Jul 2015 16:06:41 GMT
|
221
207
|
Via:
|
222
208
|
- 1.1 varnish
|
223
209
|
Connection:
|
224
210
|
- keep-alive
|
225
211
|
X-Served-By:
|
226
|
-
- cache-
|
212
|
+
- cache-jfk1021-JFK
|
227
213
|
X-Cache:
|
228
214
|
- MISS
|
229
215
|
X-Cache-Hits:
|
230
216
|
- '0'
|
231
217
|
X-Timer:
|
232
|
-
-
|
233
|
-
Vary:
|
234
|
-
- X-Feature-Hash
|
218
|
+
- S1437754001.508593,VS0,VE84
|
235
219
|
Set-Cookie:
|
236
220
|
- geocc=US;path=/;
|
237
221
|
body:
|
238
222
|
encoding: UTF-8
|
239
|
-
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":
|
240
|
-
data-attr=\"http://gawker.com/no-playlist-1685415865\" href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a>]</p>","display":"<
|
241
|
-
href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a><inset
|
242
|
-
class=\"first-text\">[<a
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
18:19","MdyatHm":"02/23/2015 at 18:19","rfc822":"Mon, 23 Feb 2015 23:19:02
|
251
|
-
GMT","yMdHmsZ":"2015-02-23T18:19:02-05:00","hmma":"6:19pm","day":"Monday","Mddyyhmma":"2/23/15
|
252
|
-
6:19pm","fullDate":"February 23, 2015","relative":{"amount":null,"type":"now"}},"authorBlogName":"gemtest"}}'
|
223
|
+
string: '{"meta":{"error":null,"warnings":[]},"data":{"id":1719978861,"parentId":null,"parentAuthorId":null,"starterId":1719978861,"publishTimeMillis":1437754001557,"lastUpdateTimeMillis":1437754001557,"timezone":"America/New_York","shareBlogId":null,"sharedPostId":null,"sharedUrl":null,"salesAvatar":null,"sponsored":false,"status":"PUBLISHED","authorId":"5876237249235511023","allowReplies":true,"byline":"","showByline":true,"properties":"","xmliId":null,"blogId":[1634457255],"defaultBlogId":1634457255,"authorBlogId":1634457255,"liveBlog":false,"approved":true,"headline":"","original":"<p>[<a
|
224
|
+
data-attr=\"http://gawker.com/no-playlist-1685415865\" href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a>]</p>","source":"wysiwyg","images":[],"videos":[],"videoThumbs":[],"author":{"id":"5876237249235511023","screenName":"gemtest","displayName":"gemtest","defaultBlogId":1634457255,"defaultBlog":null,"avatar":{"id":"17jcxk0ml1k8qpng","format":"png"}},"tags":[],"blogs":[{"id":1634457255,"name":"gemtest","displayName":"gemtest","canonicalHost":"gemtest.kinja.com","hosts":[],"status":"ENABLED","timezone":"America/New_York","timezoneOffset":-14400000,"timezoneShortname":"EDT","properties":null,"avatar":null}],"annotation":null,"viewstats":null,"promotions":[],"replyMeta":null,"replyCount":null,"parent":null,"starter":null,"blogPostAction":null,"score":null,"insets":[],"referencedBy":[],"likes":null,"sharedPost":null,"reframes":[],"noindex":null,"isRecommended":null,"permalink":"/gawker-1719978861","permalinkHost":"","permalinkPath":"/gawker-1719978861","display":"<p
|
225
|
+
class=\"first-text\">[<a href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a><inset
|
226
|
+
id=\"1685415865\" />]</p><!-- core-decorated -->","excerpt":"<p class=\"first-text\">[<a
|
227
|
+
href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a>]</p>","compact":"[Gawker]...","plaintext":"[Gawker]","shortHeadline":"","shortExcerpt":"<p
|
228
|
+
class=\"first-text\">[<a href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a>]</p>","excerptWithAssets":"<p
|
229
|
+
class=\"first-text\">[<a href=\"http://gawker.com/no-playlist-1685415865\">Gawker</a>\n
|
230
|
+
<inset id=\"1685415865\" />]</p>","aboveHeadline":null,"leftOfHeadline":null,"firstAsset":"","length":8,"postId":1719978861,"isBlip":true,"sharingMainImage":null,"facebookImage":null,"firstSentence":"[Gawker]","hasReadMore":false,"publishTime":{"timestamp":1437754001557,"timezone":"America/New_York","MdyHm":"07/24/2015
|
231
|
+
12:06","MdyatHm":"07/24/2015 at 12:06","rfc822":"Fri, 24 Jul 2015 16:06:41
|
232
|
+
GMT","yMdHmsZ":"2015-07-24T12:06:41-04:00","hmma":"12:06pm","day":"Friday","Mddyyhmma":"7/24/15
|
233
|
+
12:06pm","fullDate":"July 24, 2015","relative":{"amount":null,"type":"now"}},"authorBlogName":"gemtest"}}'
|
253
234
|
http_version:
|
254
|
-
recorded_at:
|
235
|
+
recorded_at: Fri, 24 Jul 2015 16:06:41 GMT
|
255
236
|
recorded_with: VCR 2.9.3
|
data/spec/lib/kinja/post_spec.rb
CHANGED
data/spec/lib/kinja_spec.rb
CHANGED
@@ -19,12 +19,12 @@ describe Kinja do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it "gets session token from login data" do
|
22
|
-
expect(kinja.session_token response).to eq '
|
22
|
+
expect(kinja.session_token response).to eq 'cdcca983-a1a7-4765-8e37-6624198b1699'
|
23
23
|
end
|
24
24
|
|
25
25
|
it "gets an API token" do
|
26
26
|
VCR.use_cassette('api-token-test') do
|
27
|
-
expect(kinja.get_api_token response).to eq '
|
27
|
+
expect(kinja.get_api_token response).to eq 'd4e084be-77ed-4bc6-ab0d-248a5f047df8-0-d367eb4abb79931841acb749fe64012f9a4f0d1d'
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|