vhx-ruby 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -1
  3. data/lib/vhx.rb +4 -3
  4. data/lib/vhx/client.rb +6 -3
  5. data/lib/vhx/objects/analytics.rb +9 -0
  6. data/lib/vhx/utilities/vhx_object.rb +2 -2
  7. data/lib/vhx/version.rb +2 -2
  8. data/spec/client_spec.rb +44 -9
  9. data/spec/fixtures/sample_authorization_response.json +19 -0
  10. data/spec/fixtures/sample_collection_response.json +20 -0
  11. data/spec/fixtures/sample_collections_response.json +14 -0
  12. data/spec/fixtures/sample_create_video_response.json +33 -0
  13. data/spec/fixtures/sample_customer_response.json +16 -0
  14. data/spec/fixtures/sample_customers_response.json +28 -0
  15. data/spec/fixtures/sample_files_response.json +16 -0
  16. data/spec/fixtures/sample_product_response.json +30 -0
  17. data/spec/fixtures/sample_products_response.json +14 -0
  18. data/spec/fixtures/sample_video_response.json +47 -31
  19. data/spec/fixtures/sample_videos_response.json +14 -0
  20. data/spec/middleware/error_response_spec.rb +3 -7
  21. data/spec/middleware/oauth2_spec.rb +3 -7
  22. data/spec/objects/analytics_spec.rb +41 -0
  23. data/spec/objects/authorization_spec.rb +58 -0
  24. data/spec/objects/collection_item_spec.rb +53 -0
  25. data/spec/objects/collection_spec.rb +66 -0
  26. data/spec/objects/customer_spec.rb +82 -0
  27. data/spec/objects/product_spec.rb +65 -0
  28. data/spec/objects/site_spec.rb +36 -27
  29. data/spec/objects/user_spec.rb +40 -32
  30. data/spec/objects/video_file_spec.rb +52 -0
  31. data/spec/objects/video_spec.rb +67 -23
  32. data/spec/spec_helper.rb +2 -11
  33. data/spec/utilities/vhx_helper_spec.rb +11 -7
  34. data/spec/utilities/vhx_list_object_spec.rb +27 -0
  35. data/spec/utilities/vhx_object_spec.rb +69 -26
  36. data/vhx.gemspec +4 -4
  37. metadata +59 -66
  38. data/spec/fixtures/sample_package_response.json +0 -185
  39. data/spec/objects/file_spec.rb +0 -29
  40. data/spec/objects/package_spec.rb +0 -74
  41. data/spec/test_data.rb +0 -55
  42. data/spec/utilities/vhx_collection_spec.rb +0 -27
  43. data/spec/vcr/Vhx_Client/application_user/_refresh_access_token/access_token_changed.yml +0 -57
  44. data/spec/vcr/Vhx_Client/application_user/_refresh_access_token/oauth_token_refreshed.yml +0 -57
  45. data/spec/vcr/Vhx_File/associations/are_present.yml +0 -409
  46. data/spec/vcr/Vhx_Middleware_ErrorResponse/unauthorized_user_credentials.yml +0 -122
  47. data/spec/vcr/Vhx_Middleware_OAuth2/access_token_refresh.yml +0 -797
  48. data/spec/vcr/Vhx_Package/_add_video/with_hypermedia/returns_package_object.yml +0 -51
  49. data/spec/vcr/Vhx_Package/_add_video/with_id/returns_package_object.yml +0 -51
  50. data/spec/vcr/Vhx_Package/_create/returns_package_object.yml +0 -140
  51. data/spec/vcr/Vhx_Package/_find/with_hypermedia.yml +0 -243
  52. data/spec/vcr/Vhx_Package/_find/with_id.yml +0 -243
  53. data/spec/vcr/Vhx_Package/_remove_video/with_hypermedia/returns_success.yml +0 -51
  54. data/spec/vcr/Vhx_Package/_remove_video/with_id/returns_success.yml +0 -51
  55. data/spec/vcr/Vhx_Package/associations/are_present.yml +0 -195
  56. data/spec/vcr/Vhx_Site/_create/returns_site_object.yml +0 -91
  57. data/spec/vcr/Vhx_Site/_find/with_hypermedia.yml +0 -195
  58. data/spec/vcr/Vhx_Site/_find/with_id.yml +0 -195
  59. data/spec/vcr/Vhx_User/_find/with_hypermedia.yml +0 -81
  60. data/spec/vcr/Vhx_User/_find/with_id.yml +0 -81
  61. data/spec/vcr/Vhx_User/_me/returns_user_object.yml +0 -720
  62. data/spec/vcr/Vhx_User/_update/returns_user_object.yml +0 -212
  63. data/spec/vcr/Vhx_VhxObject/associations/cache/retreive_if_available.yml +0 -195
  64. data/spec/vcr/Vhx_VhxObject/associations/falls_back_to_links.yml +0 -310
  65. data/spec/vcr/Vhx_Video/_create/returns_video_object.yml +0 -125
  66. data/spec/vcr/Vhx_Video/associations/are_present.yml +0 -294
data/spec/test_data.rb DELETED
@@ -1,55 +0,0 @@
1
- module TestData
2
- def test_credentials
3
- {
4
- client_id: "34ac1dec21fc20afd5099a2e6e0e62745dead7acd20c7b87320d8e5a7c5a33cc",
5
- client_secret: "6a04e2cf039db7ff57850f677fe0e419cdc132b3cc04aac9f3c2cd1c193a326d",
6
- oauth_token: {
7
- access_token: "cc7d6c93bde201968f077b73acd5ee11a2768cbcb9b43122eb294004bf5b4480",
8
- refresh_token: "3b9aacbeb03d05e7b901c35580bcc45e6e714cd4921d8bc8699342632f68bd63",
9
- expires_in: 7200
10
- }
11
- }
12
- end
13
-
14
- def application_only_credentials
15
- {api_key: "-HyMMMvuWsXSezKvYFJ1N_1xRe9dymeh"}
16
- end
17
-
18
- def application_user_credentials
19
- {
20
- client_id: '7ed37300580e27f1acb5f16112e91aba43931d1e8e8c9829cc0fc36358f2cd44',
21
- client_secret: 'ce0fc20cad4cb74b4e5c30803446066b6d8556f413217a6a102aaab03372ac77',
22
- oauth_token: {
23
- access_token: "5eb4f0d3f9e6ef8a3afdf7f3d8288d5067d626f1904b73b5695e4f65104be1c2",
24
- refresh_token: "132916e95bacc977a7890b31bf608e3d641d8a5c19b4ff4ffcf50e5b4273ed99",
25
- expires_at: 1430330123,
26
- expires_in: 7200
27
- }
28
- }
29
- end
30
-
31
- def unauthorized_user_credentials
32
- {
33
- client_id: 'unauthorized',
34
- client_secret: 'unauthorized',
35
- oauth_token: {
36
- access_token: "unauthorized",
37
- refresh_token: "unauthorized",
38
- expires_at: 1430330123,
39
- expires_in: 1
40
- }
41
- }
42
- end
43
-
44
- def expired_credentials
45
- {
46
- client_id: "34ac1dec21fc20afd5099a2e6e0e62745dead7acd20c7b87320d8e5a7c5a33cc",
47
- client_secret: "6a04e2cf039db7ff57850f677fe0e419cdc132b3cc04aac9f3c2cd1c193a326d",
48
- oauth_token: {
49
- access_token: "cc7d6c93bde201968f077b73acd5ee11a2768cbcb9b43122eb294004bf5b4480",
50
- refresh_token: "3b9aacbeb03d05e7b901c35580bcc45e6e714cd4921d8bc8699342632f68bd63",
51
- expires_in: 1
52
- }
53
- }
54
- end
55
- end
@@ -1,27 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Vhx::VhxListObject do
4
- let(:sample_hash_list){ JSON.parse(File.read("spec/fixtures/sample_hash_list.json")) }
5
- let(:sample_array_list){ JSON.parse(File.read("spec/fixtures/sample_array_list.json")) }
6
-
7
- context 'hash list' do
8
- it 'has #previous, #next methods based on _links' do
9
- expect(Vhx::VhxListObject.new(sample_hash_list, 'files').next).to eq 'pending'
10
- expect(Vhx::VhxListObject.new(sample_hash_list, 'files').previous).to eq 'pending'
11
- end
12
-
13
- it 'makes call to url in #previous, #next' do
14
- pending
15
- end
16
-
17
- it 'builds array from _embedded' do
18
- expect(Vhx::VhxListObject.new(sample_hash_list, 'files').kind_of?(Array)).to eq true
19
- end
20
- end
21
-
22
- context 'array list' do
23
- it 'builds array from parameter' do
24
- expect(Vhx::VhxListObject.new(sample_array_list, 'files').kind_of?(Array)).to eq true
25
- end
26
- end
27
- end
@@ -1,57 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://api.crystal.dev/oauth/token
6
- body:
7
- encoding: UTF-8
8
- string: client_id=7ed37300580e27f1acb5f16112e91aba43931d1e8e8c9829cc0fc36358f2cd44&client_secret=ce0fc20cad4cb74b4e5c30803446066b6d8556f413217a6a102aaab03372ac77&grant_type=refresh_token&refresh_token=132916e95bacc977a7890b31bf608e3d641d8a5c19b4ff4ffcf50e5b4273ed99
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.1
12
- Content-Type:
13
- - application/x-www-form-urlencoded
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Date:
24
- - Wed, 29 Apr 2015 16:56:24 GMT
25
- Status:
26
- - 200 OK
27
- Connection:
28
- - close
29
- Cache-Control:
30
- - no-store
31
- Pragma:
32
- - no-cache
33
- Content-Type:
34
- - application/json; charset=utf-8
35
- Vary:
36
- - Accept-Encoding
37
- X-Ua-Compatible:
38
- - IE=Edge
39
- Etag:
40
- - '"2c27333be5b32867ad2568f15bc55d38"'
41
- Set-Cookie:
42
- - _session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTVlZjE4MDVkZTU2YTA2N2UxMGY2MTBmNDYyYzdmZGM5BjsAVA%3D%3D--fce39509de4c52685c9dde3a238ac4f4c77ca18f;
43
- domain=.crystal.dev; path=/; expires=Fri, 29-Apr-2016 16:56:24 GMT; HttpOnly
44
- X-Meta-Request-Version:
45
- - 0.3.4
46
- X-Request-Id:
47
- - 608f6c9df5cbf6c4191aa0dd1ba3eb17
48
- X-Runtime:
49
- - '0.331092'
50
- Transfer-Encoding:
51
- - chunked
52
- body:
53
- encoding: UTF-8
54
- string: '{"access_token":"a4ca40067efd7e31535accdc2ac32010dc06b152f1981df938cc7afa14fc9ee9","token_type":"bearer","expires_in":7200,"refresh_token":"dd7204af2df5fe5d961c9d91cba67a14dca226022d1d7caa4da2b4a2b23fa08e","scope":"public"}'
55
- http_version:
56
- recorded_at: Wed, 29 Apr 2015 16:56:24 GMT
57
- recorded_with: VCR 2.9.3
@@ -1,57 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://api.crystal.dev/oauth/token
6
- body:
7
- encoding: UTF-8
8
- string: client_id=7ed37300580e27f1acb5f16112e91aba43931d1e8e8c9829cc0fc36358f2cd44&client_secret=ce0fc20cad4cb74b4e5c30803446066b6d8556f413217a6a102aaab03372ac77&grant_type=refresh_token&refresh_token=132916e95bacc977a7890b31bf608e3d641d8a5c19b4ff4ffcf50e5b4273ed99
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.1
12
- Content-Type:
13
- - application/x-www-form-urlencoded
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Date:
24
- - Wed, 29 Apr 2015 16:56:24 GMT
25
- Status:
26
- - 200 OK
27
- Connection:
28
- - close
29
- Cache-Control:
30
- - no-store
31
- Pragma:
32
- - no-cache
33
- Content-Type:
34
- - application/json; charset=utf-8
35
- Vary:
36
- - Accept-Encoding
37
- X-Ua-Compatible:
38
- - IE=Edge
39
- Etag:
40
- - '"2c27333be5b32867ad2568f15bc55d38"'
41
- Set-Cookie:
42
- - _session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTVlZjE4MDVkZTU2YTA2N2UxMGY2MTBmNDYyYzdmZGM5BjsAVA%3D%3D--fce39509de4c52685c9dde3a238ac4f4c77ca18f;
43
- domain=.crystal.dev; path=/; expires=Fri, 29-Apr-2016 16:56:24 GMT; HttpOnly
44
- X-Meta-Request-Version:
45
- - 0.3.4
46
- X-Request-Id:
47
- - 608f6c9df5cbf6c4191aa0dd1ba3eb17
48
- X-Runtime:
49
- - '0.331092'
50
- Transfer-Encoding:
51
- - chunked
52
- body:
53
- encoding: UTF-8
54
- string: '{"access_token":"a4ca40067efd7e31535accdc2ac32010dc06b152f1981df938cc7afa14fc9ee9","token_type":"bearer","expires_in":7200,"refresh_token":"dd7204af2df5fe5d961c9d91cba67a14dca226022d1d7caa4da2b4a2b23fa08e","scope":"public"}'
55
- http_version:
56
- recorded_at: Wed, 29 Apr 2015 16:56:24 GMT
57
- recorded_with: VCR 2.9.3
@@ -1,409 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api.crystal.dev/videos/3008
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Authorization:
11
- - Bearer 41d2ed8ead125347d38cf13dd7da8df0a32e9c9e839a9ea1b39c0d4f8b9caa92
12
- User-Agent:
13
- - Faraday v0.9.1
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Date:
24
- - Mon, 04 May 2015 19:08:07 GMT
25
- Status:
26
- - 200 OK
27
- Connection:
28
- - close
29
- Cache-Control:
30
- - public, no-cache, must-revalidate
31
- Surrogate-Control:
32
- - max-age=3600
33
- Surrogate-Key:
34
- - videos/3008 sites/1900
35
- Etag:
36
- - '"46aceb0e0092d7c2f0738be22c7ef992"'
37
- Last-Modified:
38
- - Wed, 18 Feb 2015 16:21:24 GMT
39
- Content-Type:
40
- - application/json; charset=utf-8
41
- Vary:
42
- - Accept-Encoding
43
- X-Ua-Compatible:
44
- - IE=Edge
45
- X-Meta-Request-Version:
46
- - 0.3.4
47
- X-Request-Id:
48
- - 0d42a5a9006bc9a715a91ed5f8d39103
49
- X-Runtime:
50
- - '0.866176'
51
- Transfer-Encoding:
52
- - chunked
53
- body:
54
- encoding: UTF-8
55
- string: |
56
- {
57
- "_links": {
58
- "self": {
59
- "href": "http://api.crystal.dev/videos/3008"
60
- },
61
- "site": {
62
- "href": "http://api.crystal.dev/sites/1900"
63
- },
64
- "files": {
65
- "href": "http://api.crystal.dev/videos/3008/files"
66
- }
67
- },
68
- "_embedded": {
69
- "site": {
70
- "_links": {
71
- "self": {
72
- "href": "http://api.crystal.dev/sites/1900"
73
- },
74
- "home_page": {
75
- "href": "http://sagartestmovie.crystal.dev"
76
- },
77
- "followers": {
78
- "href": "http://api.crystal.dev/sites/1900/followers"
79
- }
80
- },
81
- "id": 1900,
82
- "title": "SagarTestMovie",
83
- "description": "This is my test movie. ",
84
- "domain": "sagartestmovie.crystal.dev",
85
- "subdomain": "sagartestmovie",
86
- "key": "sagartestmovie",
87
- "color": "#28DBF7",
88
- "facebook_url": null,
89
- "twitter_name": null,
90
- "google_analytics_id": "",
91
- "packages_count": 1,
92
- "videos_count": 3,
93
- "followers_count": 30,
94
- "created_at": "2013-12-27T00:20:28Z",
95
- "updated_at": "2015-04-30T18:17:22Z"
96
- },
97
- "subtitles": [
98
- {
99
- "_links": {
100
- "self": {
101
- "href": "http://api.crystal.dev/videos/7726"
102
- },
103
- "video": {
104
- "href": "http://api.crystal.dev/videos/3008"
105
- },
106
- "site": {
107
- "href": "http://api.crystal.dev/sites/1900"
108
- }
109
- },
110
- "language": "Bengali",
111
- "type": "video"
112
- },
113
- {
114
- "_links": {
115
- "self": {
116
- "href": "http://api.crystal.dev/videos/5558"
117
- },
118
- "video": {
119
- "href": "http://api.crystal.dev/videos/3008"
120
- },
121
- "site": {
122
- "href": "http://api.crystal.dev/sites/1900"
123
- }
124
- },
125
- "language": "English",
126
- "type": "video"
127
- }
128
- ],
129
- "files": [
130
- {
131
- "_links": {
132
- "self": {
133
- "href": "http://api.crystal.dev/videos/3008/files?format=m3u8&quality=adaptive"
134
- },
135
- "video": {
136
- "href": "http://api.crystal.dev/videos/3008"
137
- },
138
- "site": {
139
- "href": "http://api.crystal.dev/sites/1900"
140
- }
141
- },
142
- "size": {
143
- "bytes": 443,
144
- "formatted": "443 Bytes"
145
- },
146
- "quality": "adaptive",
147
- "format": "m3u8",
148
- "method": "hls",
149
- "mime_type": "application/x-mpegURL",
150
- "created_at": "2014-02-06T05:30:51Z",
151
- "updated_at": "2014-02-06T05:32:32Z"
152
- },
153
- {
154
- "_links": {
155
- "self": {
156
- "href": "http://api.crystal.dev/videos/3008/files?format=mp4&quality=720p"
157
- },
158
- "video": {
159
- "href": "http://api.crystal.dev/videos/3008"
160
- },
161
- "site": {
162
- "href": "http://api.crystal.dev/sites/1900"
163
- }
164
- },
165
- "size": {
166
- "bytes": 643267,
167
- "formatted": "628 KB"
168
- },
169
- "quality": "720p",
170
- "format": "mp4",
171
- "method": "progressive",
172
- "mime_type": "video/mp4",
173
- "created_at": "2014-02-06T05:30:50Z",
174
- "updated_at": "2014-02-06T05:32:32Z"
175
- },
176
- {
177
- "_links": {
178
- "self": {
179
- "href": "http://api.crystal.dev/videos/3008/files?format=mp4&quality=540p"
180
- },
181
- "video": {
182
- "href": "http://api.crystal.dev/videos/3008"
183
- },
184
- "site": {
185
- "href": "http://api.crystal.dev/sites/1900"
186
- }
187
- },
188
- "size": {
189
- "bytes": 624384,
190
- "formatted": "610 KB"
191
- },
192
- "quality": "540p",
193
- "format": "mp4",
194
- "method": "progressive",
195
- "mime_type": "video/mp4",
196
- "created_at": "2014-02-06T05:30:50Z",
197
- "updated_at": "2014-02-06T05:32:32Z"
198
- },
199
- {
200
- "_links": {
201
- "self": {
202
- "href": "http://api.crystal.dev/videos/3008/files?format=flv&quality=720p"
203
- },
204
- "video": {
205
- "href": "http://api.crystal.dev/videos/3008"
206
- },
207
- "site": {
208
- "href": "http://api.crystal.dev/sites/1900"
209
- }
210
- },
211
- "size": {
212
- "bytes": 662809,
213
- "formatted": "647 KB"
214
- },
215
- "quality": "720p",
216
- "format": "flv",
217
- "method": null,
218
- "mime_type": null,
219
- "created_at": "2014-02-06T05:30:50Z",
220
- "updated_at": "2014-02-06T05:32:32Z"
221
- },
222
- {
223
- "_links": {
224
- "self": {
225
- "href": "http://api.crystal.dev/videos/3008/files?format=flv&quality=540p"
226
- },
227
- "video": {
228
- "href": "http://api.crystal.dev/videos/3008"
229
- },
230
- "site": {
231
- "href": "http://api.crystal.dev/sites/1900"
232
- }
233
- },
234
- "size": {
235
- "bytes": 643926,
236
- "formatted": "629 KB"
237
- },
238
- "quality": "540p",
239
- "format": "flv",
240
- "method": null,
241
- "mime_type": null,
242
- "created_at": "2014-02-06T05:30:51Z",
243
- "updated_at": "2014-02-06T05:32:32Z"
244
- }
245
- ],
246
- "transcode": null
247
- },
248
- "id": 3008,
249
- "title": "Test Movie",
250
- "description": "Testing",
251
- "status": "uploaded",
252
- "duration": {
253
- "seconds": 19,
254
- "formatted": "00:00:19"
255
- },
256
- "thumbnail": {
257
- "small": "https://dv6n47kh00ig2.cloudfront.net/sagartestmovie/assets/images/video-3008-1403716255-240x135.jpg",
258
- "medium": "https://dv6n47kh00ig2.cloudfront.net/sagartestmovie/assets/images/video-3008-1403716255-640x360.jpg",
259
- "large": "https://dv6n47kh00ig2.cloudfront.net/sagartestmovie/assets/images/video-3008-1403716255-1280x720.jpg"
260
- },
261
- "is_drm_enabled": false,
262
- "subtitles_count": 2,
263
- "files_count": 5,
264
- "created_at": "2014-02-06T05:30:18Z",
265
- "updated_at": "2015-02-18T16:21:24Z"
266
- }
267
- http_version:
268
- recorded_at: Mon, 04 May 2015 19:08:07 GMT
269
- - request:
270
- method: get
271
- uri: http://api.crystal.dev/sites/1900
272
- body:
273
- encoding: US-ASCII
274
- string: ''
275
- headers:
276
- Authorization:
277
- - Bearer 41d2ed8ead125347d38cf13dd7da8df0a32e9c9e839a9ea1b39c0d4f8b9caa92
278
- User-Agent:
279
- - Faraday v0.9.1
280
- Accept-Encoding:
281
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
282
- Accept:
283
- - "*/*"
284
- response:
285
- status:
286
- code: 200
287
- message: OK
288
- headers:
289
- Date:
290
- - Mon, 04 May 2015 19:08:08 GMT
291
- Status:
292
- - 200 OK
293
- Connection:
294
- - close
295
- Cache-Control:
296
- - public, no-cache, must-revalidate
297
- Surrogate-Control:
298
- - max-age=3600
299
- Surrogate-Key:
300
- - sites/1900
301
- Etag:
302
- - '"2be7fb00bf9ac7c2f2aa8e54bdf25b03"'
303
- Last-Modified:
304
- - Thu, 30 Apr 2015 18:17:22 GMT
305
- Content-Type:
306
- - application/json; charset=utf-8
307
- Vary:
308
- - Accept-Encoding
309
- X-Ua-Compatible:
310
- - IE=Edge
311
- X-Meta-Request-Version:
312
- - 0.3.4
313
- X-Request-Id:
314
- - 4bbd1daf14474ff58c6bc0e074682fce
315
- X-Runtime:
316
- - '0.589578'
317
- Transfer-Encoding:
318
- - chunked
319
- body:
320
- encoding: UTF-8
321
- string: |
322
- {
323
- "_links": {
324
- "self": {
325
- "href": "http://api.crystal.dev/sites/1900"
326
- },
327
- "home_page": {
328
- "href": "http://sagartestmovie.crystal.dev"
329
- },
330
- "followers": {
331
- "href": "http://api.crystal.dev/sites/1900/followers"
332
- }
333
- },
334
- "_embedded": {
335
- "subscription": null,
336
- "packages": [
337
- {
338
- "_links": {
339
- "self": {
340
- "href": "http://api.crystal.dev/packages/2780"
341
- },
342
- "site": {
343
- "href": "http://api.crystal.dev/sites/1900"
344
- },
345
- "videos": {
346
- "href": "http://api.crystal.dev/packages/2780/videos"
347
- },
348
- "buy_page": {
349
- "href": "http://sagartestmovie.crystal.dev/buy/pwyw-1"
350
- },
351
- "home_page": {
352
- "href": "http://sagartestmovie.crystal.dev/packages/pwyw-1"
353
- }
354
- },
355
- "_embedded": {
356
- "trailer": null
357
- },
358
- "id": 2780,
359
- "title": "pwyw",
360
- "description": "",
361
- "sku": "pwyw-1",
362
- "price": {
363
- "cents": 500,
364
- "currency": "USD",
365
- "formatted": "$5",
366
- "US": {
367
- "cents": 500,
368
- "currency": "USD",
369
- "formatted": "$5"
370
- }
371
- },
372
- "rental": null,
373
- "trailer_url": null,
374
- "trailer_embed_code": "<iframe src=\"http://embed.crystal.dev/packages/2780\" width=\"640\" height=\"360\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>",
375
- "thumbnail": {
376
- "small": "http://cdn.crystal.dev/assets/thumbnails/default-small.png",
377
- "medium": "http://cdn.crystal.dev/assets/thumbnails/default-medium.png",
378
- "large": "http://cdn.crystal.dev/assets/thumbnails/default-large.png",
379
- "blurred": null
380
- },
381
- "is_active": true,
382
- "is_preorder": false,
383
- "release_date": null,
384
- "videos_count": 0,
385
- "extras_count": 0,
386
- "created_at": "2014-07-15T18:15:36Z",
387
- "updated_at": "2014-08-26T14:48:52Z"
388
- }
389
- ]
390
- },
391
- "id": 1900,
392
- "title": "SagarTestMovie",
393
- "description": "This is my test movie. ",
394
- "domain": "sagartestmovie.crystal.dev",
395
- "subdomain": "sagartestmovie",
396
- "key": "sagartestmovie",
397
- "color": "#28DBF7",
398
- "facebook_url": null,
399
- "twitter_name": null,
400
- "google_analytics_id": "",
401
- "packages_count": 1,
402
- "videos_count": 3,
403
- "followers_count": 30,
404
- "created_at": "2013-12-27T00:20:28Z",
405
- "updated_at": "2015-04-30T18:17:22Z"
406
- }
407
- http_version:
408
- recorded_at: Mon, 04 May 2015 19:08:08 GMT
409
- recorded_with: VCR 2.9.3