locomotivecms_coal 1.0.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.rspec +2 -0
- data/.travis.yml +8 -0
- data/Gemfile +23 -0
- data/Gemfile.lock +104 -0
- data/LICENSE +20 -0
- data/README.md +92 -0
- data/Rakefile +24 -0
- data/lib/locomotive/coal/client.rb +53 -0
- data/lib/locomotive/coal/error.rb +27 -0
- data/lib/locomotive/coal/paginated_resources.rb +20 -0
- data/lib/locomotive/coal/request.rb +63 -0
- data/lib/locomotive/coal/resource.rb +21 -0
- data/lib/locomotive/coal/resources/content_entries.rb +35 -0
- data/lib/locomotive/coal/resources/contents.rb +25 -0
- data/lib/locomotive/coal/resources/my_account.rb +15 -0
- data/lib/locomotive/coal/resources/sites.rb +31 -0
- data/lib/locomotive/coal/resources/token.rb +15 -0
- data/lib/locomotive/coal/version.rb +8 -0
- data/lib/locomotive/coal.rb +16 -0
- data/locomotivecms_coal.gemspec +26 -0
- data/spec/fixtures/coal_cassettes/client.yml +144 -0
- data/spec/fixtures/coal_cassettes/content_entries.yml +386 -0
- data/spec/fixtures/coal_cassettes/contents.yml +120 -0
- data/spec/fixtures/coal_cassettes/my_account.yml +97 -0
- data/spec/fixtures/coal_cassettes/sites.yml +204 -0
- data/spec/fixtures/coal_cassettes/token.yml +99 -0
- data/spec/integration/client_spec.rb +33 -0
- data/spec/integration/resources/content_entries_spec.rb +52 -0
- data/spec/integration/resources/contents_spec.rb +22 -0
- data/spec/integration/resources/my_account_spec.rb +17 -0
- data/spec/integration/resources/sites_spec.rb +43 -0
- data/spec/integration/resources/token_spec.rb +38 -0
- data/spec/spec_helper.rb +46 -0
- data/spec/support/api_settings.rb +6 -0
- data/spec/support/default_resources.rb +7 -0
- data/spec/support/pry.rb +4 -0
- data/spec/unit/client_spec.rb +25 -0
- data/spec/unit/paginated_resources_spec.rb +50 -0
- data/spec/unit/resource_spec.rb +18 -0
- metadata +159 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://sample.lvh.me:4000/locomotive/api/tokens.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: email=john%40doe.net&password=easyone
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip
|
14
|
+
User-Agent:
|
15
|
+
- unirest-ruby/1.1
|
16
|
+
Content-Length:
|
17
|
+
- '37'
|
18
|
+
Content-Type:
|
19
|
+
- application/x-www-form-urlencoded
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 26 Mar 2015 12:13:39 GMT
|
27
|
+
Status:
|
28
|
+
- 200 OK
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Location:
|
32
|
+
- http://sample.lvh.me:4000/locomotive/
|
33
|
+
Content-Type:
|
34
|
+
- application/json; charset=utf-8
|
35
|
+
X-Ua-Compatible:
|
36
|
+
- IE=Edge
|
37
|
+
Etag:
|
38
|
+
- '"557f8d72cf11ab5399621eddec942c29"'
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0, private, must-revalidate
|
41
|
+
Set-Cookie:
|
42
|
+
- _locomotive_session=7XFF9yj2WvX-fANMtQgTDPqqDQY; domain=.sample.lvh.me; path=/;
|
43
|
+
HttpOnly
|
44
|
+
X-Request-Id:
|
45
|
+
- 1121f7bd92f96f2df4bcbf0e28b1a6b8
|
46
|
+
X-Runtime:
|
47
|
+
- '0.025562'
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '{"token":"9GLRWwc2MGTCF7SHiZSg"}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Thu, 26 Mar 2015 12:13:39 GMT
|
53
|
+
- request:
|
54
|
+
method: get
|
55
|
+
uri: http://sample.lvh.me:4000/locomotive/api/sites.json?auth_token=9GLRWwc2MGTCF7SHiZSg
|
56
|
+
body:
|
57
|
+
encoding: US-ASCII
|
58
|
+
string: ''
|
59
|
+
headers:
|
60
|
+
Accept:
|
61
|
+
- application/json
|
62
|
+
Accept-Encoding:
|
63
|
+
- gzip
|
64
|
+
User-Agent:
|
65
|
+
- unirest-ruby/1.1
|
66
|
+
response:
|
67
|
+
status:
|
68
|
+
code: 200
|
69
|
+
message: OK
|
70
|
+
headers:
|
71
|
+
Date:
|
72
|
+
- Thu, 26 Mar 2015 12:13:39 GMT
|
73
|
+
Status:
|
74
|
+
- 200 OK
|
75
|
+
Connection:
|
76
|
+
- close
|
77
|
+
Content-Type:
|
78
|
+
- application/json; charset=utf-8
|
79
|
+
X-Ua-Compatible:
|
80
|
+
- IE=Edge
|
81
|
+
Etag:
|
82
|
+
- '"81f71ce948be7560bc720c4e05d4c8d8"'
|
83
|
+
Cache-Control:
|
84
|
+
- max-age=0, private, must-revalidate
|
85
|
+
Set-Cookie:
|
86
|
+
- _locomotive_session=r30pUG0LUjkbzPNo_VqKzr0J98g; domain=.sample.lvh.me; path=/;
|
87
|
+
HttpOnly
|
88
|
+
X-Request-Id:
|
89
|
+
- 59d10d2c8ef81e01e10d0d030a7d8b93
|
90
|
+
X-Runtime:
|
91
|
+
- '0.036919'
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '[{"id":"54eb49c12475804b2b000002","_id":"54eb49c12475804b2b000002","created_at":"2015-02-23T15:39:45Z","updated_at":"2015-02-23T15:46:46Z","name":"Sample
|
95
|
+
website","locales":["en","fr","nb"],"timezone":"UTC","subdomain":"sample","domains":["example.org","sample.example.com","sample.lvh.me"],"domains_without_subdomain":["example.org","sample.example.com"],"domain_name":"lvh.me","memberships":[{"id":"54eb49c12475804b2b000003","_id":"54eb49c12475804b2b000003","role":"admin","role_name":"Administrator","can_update":false,"grant_admin":true,"account_id":"54eb49b22475804b2b000001","name":"John","email":"john@doe.net"}],"seo_title":"A
|
96
|
+
simple LocomotiveCMS website","meta_keywords":"some meta keywords","meta_description":"some
|
97
|
+
meta description"}]'
|
98
|
+
http_version:
|
99
|
+
recorded_at: Thu, 26 Mar 2015 12:13:39 GMT
|
100
|
+
- request:
|
101
|
+
method: get
|
102
|
+
uri: http://sample.lvh.me:4000/locomotive/api/my_account.json?auth_token=9GLRWwc2MGTCF7SHiZSg
|
103
|
+
body:
|
104
|
+
encoding: US-ASCII
|
105
|
+
string: ''
|
106
|
+
headers:
|
107
|
+
Accept:
|
108
|
+
- application/json
|
109
|
+
Accept-Encoding:
|
110
|
+
- gzip
|
111
|
+
User-Agent:
|
112
|
+
- unirest-ruby/1.1
|
113
|
+
response:
|
114
|
+
status:
|
115
|
+
code: 200
|
116
|
+
message: OK
|
117
|
+
headers:
|
118
|
+
Date:
|
119
|
+
- Thu, 26 Mar 2015 12:13:39 GMT
|
120
|
+
Status:
|
121
|
+
- 200 OK
|
122
|
+
Connection:
|
123
|
+
- close
|
124
|
+
Content-Type:
|
125
|
+
- application/json; charset=utf-8
|
126
|
+
X-Ua-Compatible:
|
127
|
+
- IE=Edge
|
128
|
+
Etag:
|
129
|
+
- '"5286c0fcb45b4f01085a8ad3b0271bca"'
|
130
|
+
Cache-Control:
|
131
|
+
- max-age=0, private, must-revalidate
|
132
|
+
Set-Cookie:
|
133
|
+
- _locomotive_session=nu6AWiHpGDmXtQfgkDrWtGkC0oY; domain=.sample.lvh.me; path=/;
|
134
|
+
HttpOnly
|
135
|
+
X-Request-Id:
|
136
|
+
- c0df7acaba5ebd7296e50e39568070dd
|
137
|
+
X-Runtime:
|
138
|
+
- '0.060951'
|
139
|
+
body:
|
140
|
+
encoding: UTF-8
|
141
|
+
string: '{"id":"54eb49b22475804b2b000001","_id":"54eb49b22475804b2b000001","created_at":"2015-02-23T15:39:30Z","updated_at":"2015-03-26T12:13:39Z","name":"John","email":"john@doe.net","locale":"en","encrypted_password":"fc2fa5bc736ba0f4ab04c4e427660f7a4fd7a360","password_salt":"ccEcFveptwhvSoRoExkX","api_key":"a9ac1e08c2c22c1b6f3da6db77a70cac4a615bd7","admin":true}'
|
142
|
+
http_version:
|
143
|
+
recorded_at: Thu, 26 Mar 2015 12:13:39 GMT
|
144
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,386 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://sample.lvh.me:4000/locomotive/api/tokens.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: email=john%40doe.net&password=easyone
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip
|
14
|
+
User-Agent:
|
15
|
+
- unirest-ruby/1.1
|
16
|
+
Content-Length:
|
17
|
+
- '37'
|
18
|
+
Content-Type:
|
19
|
+
- application/x-www-form-urlencoded
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 26 Mar 2015 11:42:07 GMT
|
27
|
+
Status:
|
28
|
+
- 200 OK
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Location:
|
32
|
+
- http://sample.lvh.me:4000/locomotive/
|
33
|
+
Content-Type:
|
34
|
+
- application/json; charset=utf-8
|
35
|
+
X-Ua-Compatible:
|
36
|
+
- IE=Edge
|
37
|
+
Etag:
|
38
|
+
- '"557f8d72cf11ab5399621eddec942c29"'
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0, private, must-revalidate
|
41
|
+
Set-Cookie:
|
42
|
+
- _locomotive_session=Mr3RL9aUNxSU2N6ew4hRngyeMyo; domain=.sample.lvh.me; path=/;
|
43
|
+
HttpOnly
|
44
|
+
X-Request-Id:
|
45
|
+
- c148b081fc84bae8af1fc2dc4f415a5a
|
46
|
+
X-Runtime:
|
47
|
+
- '0.705651'
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '{"token":"9GLRWwc2MGTCF7SHiZSg"}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Thu, 26 Mar 2015 11:42:07 GMT
|
53
|
+
- request:
|
54
|
+
method: get
|
55
|
+
uri: http://sample.lvh.me:4000/locomotive/api/content_types.json?auth_token=9GLRWwc2MGTCF7SHiZSg
|
56
|
+
body:
|
57
|
+
encoding: US-ASCII
|
58
|
+
string: ''
|
59
|
+
headers:
|
60
|
+
Accept:
|
61
|
+
- application/json
|
62
|
+
Accept-Encoding:
|
63
|
+
- gzip
|
64
|
+
User-Agent:
|
65
|
+
- unirest-ruby/1.1
|
66
|
+
response:
|
67
|
+
status:
|
68
|
+
code: 200
|
69
|
+
message: OK
|
70
|
+
headers:
|
71
|
+
Date:
|
72
|
+
- Thu, 26 Mar 2015 11:42:07 GMT
|
73
|
+
Status:
|
74
|
+
- 200 OK
|
75
|
+
Connection:
|
76
|
+
- close
|
77
|
+
Content-Type:
|
78
|
+
- application/json; charset=utf-8
|
79
|
+
X-Ua-Compatible:
|
80
|
+
- IE=Edge
|
81
|
+
Etag:
|
82
|
+
- '"7dbb8592219d2f208083b29864ef8522"'
|
83
|
+
Cache-Control:
|
84
|
+
- max-age=0, private, must-revalidate
|
85
|
+
Set-Cookie:
|
86
|
+
- _locomotive_session=pxKxImEpxvFPudAIdRaje5_KXg0; domain=.sample.lvh.me; path=/;
|
87
|
+
HttpOnly
|
88
|
+
X-Request-Id:
|
89
|
+
- f947cf728c3abd3969b4be4996a0c928
|
90
|
+
X-Runtime:
|
91
|
+
- '0.134199'
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '[{"id":"54eb4b662475804b2b00000a","_id":"54eb4b662475804b2b00000a","created_at":"2015-02-23T15:46:46Z","updated_at":"2015-02-23T15:46:47Z","name":"Bands","slug":"bands","entries_custom_fields":[{"id":"54eb4b662475804b2b00000b","_id":"54eb4b662475804b2b00000b","name":"name","label":"Name","type":"string","required":true,"localized":false,"unique":false,"hint":"Name
|
95
|
+
of the band","position":0},{"id":"54eb4b662475804b2b00000c","_id":"54eb4b662475804b2b00000c","name":"leader","label":"Fullname
|
96
|
+
of the leader","type":"string","required":false,"localized":false,"unique":false,"position":1},{"id":"54eb4b662475804b2b00000d","_id":"54eb4b662475804b2b00000d","name":"kind","label":"Music
|
97
|
+
kind (grunge, rock, pop, country)","type":"select","required":false,"localized":false,"unique":false,"position":2,"select_options":[{"_id":"54eb4b662475804b2b00000f","name":"grunge","position":0,"id":"54eb4b662475804b2b00000f"},{"_id":"54eb4b662475804b2b000010","name":"rock","position":1,"id":"54eb4b662475804b2b000010"},{"_id":"54eb4b662475804b2b000011","name":"country","position":2,"id":"54eb4b662475804b2b000011"}],"raw_select_options":[{"id":"54eb4b662475804b2b00000f","name":{"en":"grunge"},"position":2},{"id":"54eb4b662475804b2b000010","name":{"en":"rock"},"position":2},{"id":"54eb4b662475804b2b000011","name":{"en":"country"},"position":2}]},{"id":"54eb4b662475804b2b00002d","_id":"54eb4b662475804b2b00002d","name":"songs","label":"Songs","type":"has_many","required":false,"localized":false,"unique":false,"position":3,"class_name":"Locomotive::ContentEntry54eb4b662475804b2b00001e","inverse_of":"band","ui_enabled":true,"class_slug":"songs"},{"id":"54eb4b662475804b2b00000e","_id":"54eb4b662475804b2b00000e","name":"featured","label":"Featured","type":"boolean","required":false,"localized":false,"unique":false,"position":4}],"description":"List
|
98
|
+
of bands","label_field_name":"name","order_by":"54eb4b662475804b2b00000b","order_direction":"asc","order_by_field_name":"name","public_submission_enabled":false,"public_submission_account_emails":[]},{"id":"54eb4bb52475804b2b000037","_id":"54eb4bb52475804b2b000037","created_at":"2015-02-23T15:48:05Z","updated_at":"2015-02-23T15:48:05Z","name":"Events","slug":"events","entries_custom_fields":[{"id":"54eb4bb52475804b2b000038","_id":"54eb4bb52475804b2b000038","name":"place","label":"Place","type":"string","required":true,"localized":false,"unique":false,"hint":"Name
|
99
|
+
of the place","position":0},{"id":"54eb4bb52475804b2b000039","_id":"54eb4bb52475804b2b000039","name":"date","label":"Date","type":"date","required":false,"localized":false,"unique":false,"hint":"Date
|
100
|
+
of the event","position":1},{"id":"54eb4bb52475804b2b00003a","_id":"54eb4bb52475804b2b00003a","name":"city","label":"City
|
101
|
+
of the event","type":"string","required":false,"localized":false,"unique":false,"position":2},{"id":"54eb4bb52475804b2b00003b","_id":"54eb4bb52475804b2b00003b","name":"state","label":"State
|
102
|
+
of the event","type":"string","required":false,"localized":false,"unique":false,"position":3},{"id":"54eb4bb52475804b2b00003c","_id":"54eb4bb52475804b2b00003c","name":"notes","label":"Notes","type":"text","required":false,"localized":false,"unique":false,"position":4,"text_formatting":""},{"id":"54eb4bb52475804b2b00003d","_id":"54eb4bb52475804b2b00003d","name":"tags","label":"List
|
103
|
+
of tags","type":"tags","required":false,"localized":false,"unique":false,"position":5},{"id":"54eb4bb52475804b2b00003e","_id":"54eb4bb52475804b2b00003e","name":"price","label":"Price
|
104
|
+
of the event","type":"float","required":false,"localized":false,"unique":false,"position":6}],"description":"List
|
105
|
+
of upcoming events","label_field_name":"place","order_by":"created_at","order_direction":"asc","order_by_field_name":"created_at","public_submission_enabled":false,"public_submission_account_emails":[]},{"id":"54eb4b662475804b2b00001a","_id":"54eb4b662475804b2b00001a","created_at":"2015-02-23T15:46:46Z","updated_at":"2015-02-23T15:46:46Z","name":"Messages","slug":"messages","entries_custom_fields":[{"id":"54eb4b662475804b2b00001b","_id":"54eb4b662475804b2b00001b","name":"name","label":"Name","type":"string","required":true,"localized":false,"unique":false,"hint":"Full
|
106
|
+
name","position":0},{"id":"54eb4b662475804b2b00001c","_id":"54eb4b662475804b2b00001c","name":"email","label":"Email","type":"string","required":true,"localized":false,"unique":false,"hint":"Email","position":1},{"id":"54eb4b662475804b2b00001d","_id":"54eb4b662475804b2b00001d","name":"message","label":"Message","type":"text","required":true,"localized":false,"unique":false,"hint":"Customer
|
107
|
+
message","position":2,"text_formatting":""}],"description":"Messages posted
|
108
|
+
by new potential customers","label_field_name":"name","order_by":"created_at","order_direction":"asc","order_by_field_name":"created_at","public_submission_enabled":true,"public_submission_account_emails":[]},{"id":"54eb4b662475804b2b00001e","_id":"54eb4b662475804b2b00001e","created_at":"2015-02-23T15:46:46Z","updated_at":"2015-02-23T15:46:47Z","name":"Songs","slug":"songs","entries_custom_fields":[{"id":"54eb4b662475804b2b00001f","_id":"54eb4b662475804b2b00001f","name":"title","label":"Title","type":"string","required":true,"localized":false,"unique":false,"hint":"Title
|
109
|
+
of your song","position":0},{"id":"54eb4b672475804b2b00002e","_id":"54eb4b672475804b2b00002e","name":"band","label":"Band","type":"belongs_to","required":false,"localized":false,"unique":false,"position":1,"class_name":"Locomotive::ContentEntry54eb4b662475804b2b00000a","ui_enabled":true,"class_slug":"bands"},{"id":"54eb4b662475804b2b000020","_id":"54eb4b662475804b2b000020","name":"cover","label":"Cover","type":"file","required":true,"localized":false,"unique":false,"position":2},{"id":"54eb4b662475804b2b000021","_id":"54eb4b662475804b2b000021","name":"short_description","label":"Short
|
110
|
+
description","type":"text","required":false,"localized":false,"unique":false,"position":3,"text_formatting":"html"},{"id":"54eb4b662475804b2b000022","_id":"54eb4b662475804b2b000022","name":"audio_url","label":"Audio
|
111
|
+
url","type":"string","required":false,"localized":false,"unique":false,"hint":"Url
|
112
|
+
to a service like Blip for instance","position":4},{"id":"54eb4b662475804b2b000023","_id":"54eb4b662475804b2b000023","name":"duration","label":"Duration","type":"string","required":false,"localized":false,"unique":false,"hint":"format
|
113
|
+
like: mm:ss","position":5}],"label_field_name":"title","order_by":"_position","order_direction":"asc","order_by_field_name":"_position","public_submission_enabled":false,"public_submission_account_emails":[]},{"id":"54eb4b662475804b2b000024","_id":"54eb4b662475804b2b000024","created_at":"2015-02-23T15:46:46Z","updated_at":"2015-02-23T15:46:46Z","name":"Updates","slug":"updates","entries_custom_fields":[{"id":"54eb4b662475804b2b000025","_id":"54eb4b662475804b2b000025","name":"title","label":"Title","type":"string","required":true,"localized":true,"unique":false,"hint":"Not
|
114
|
+
displayed in the website","position":0},{"id":"54eb4b662475804b2b000026","_id":"54eb4b662475804b2b000026","name":"text","label":"Text","type":"text","required":false,"localized":true,"unique":false,"hint":"Text
|
115
|
+
displayed in the home page","position":1,"text_formatting":"html"},{"id":"54eb4b662475804b2b000027","_id":"54eb4b662475804b2b000027","name":"category","label":"Category","type":"select","required":false,"localized":true,"unique":false,"hint":"Pick
|
116
|
+
a category","position":2,"select_options":[{"_id":"54eb4b662475804b2b000029","name":"General","position":0,"id":"54eb4b662475804b2b000029"},{"_id":"54eb4b662475804b2b00002a","name":"Gigs","position":1,"id":"54eb4b662475804b2b00002a"},{"_id":"54eb4b662475804b2b00002b","name":"Bands","position":2,"id":"54eb4b662475804b2b00002b"},{"_id":"54eb4b662475804b2b00002c","name":"Albums","position":3,"id":"54eb4b662475804b2b00002c"}],"raw_select_options":[{"id":"54eb4b662475804b2b000029","name":{"en":"General","fr":"G\u00e9n\u00e9ral"},"position":2},{"id":"54eb4b662475804b2b00002a","name":{"en":"Gigs","fr":"Concerts"},"position":2},{"id":"54eb4b662475804b2b00002b","name":{"en":"Bands","fr":"Groupes"},"position":2},{"id":"54eb4b662475804b2b00002c","name":{"en":"Albums"},"position":2}]},{"id":"54eb4b662475804b2b000028","_id":"54eb4b662475804b2b000028","name":"date","label":"Date","type":"date","required":false,"localized":false,"unique":false,"hint":"Date
|
117
|
+
of the update","position":3}],"description":"List of updates","label_field_name":"title","order_by":"54eb4b662475804b2b000028","order_direction":"asc","order_by_field_name":"date","public_submission_enabled":false,"public_submission_account_emails":[]}]'
|
118
|
+
http_version:
|
119
|
+
recorded_at: Thu, 26 Mar 2015 11:42:07 GMT
|
120
|
+
- request:
|
121
|
+
method: get
|
122
|
+
uri: http://sample.lvh.me:4000/locomotive/api/content_types/bands/entries.json?auth_token=9GLRWwc2MGTCF7SHiZSg&where=%7B%7D
|
123
|
+
body:
|
124
|
+
encoding: US-ASCII
|
125
|
+
string: ''
|
126
|
+
headers:
|
127
|
+
Accept:
|
128
|
+
- application/json
|
129
|
+
Accept-Encoding:
|
130
|
+
- gzip
|
131
|
+
User-Agent:
|
132
|
+
- unirest-ruby/1.1
|
133
|
+
response:
|
134
|
+
status:
|
135
|
+
code: 200
|
136
|
+
message: OK
|
137
|
+
headers:
|
138
|
+
Date:
|
139
|
+
- Thu, 26 Mar 2015 11:42:07 GMT
|
140
|
+
Status:
|
141
|
+
- 200 OK
|
142
|
+
Connection:
|
143
|
+
- close
|
144
|
+
X-Total-Pages:
|
145
|
+
- '1'
|
146
|
+
X-Per-Page:
|
147
|
+
- '10'
|
148
|
+
X-Total-Entries:
|
149
|
+
- '3'
|
150
|
+
Content-Type:
|
151
|
+
- application/json; charset=utf-8
|
152
|
+
X-Ua-Compatible:
|
153
|
+
- IE=Edge
|
154
|
+
Etag:
|
155
|
+
- '"91c1194717bc84d6d2704913a58b5d0b"'
|
156
|
+
Cache-Control:
|
157
|
+
- max-age=0, private, must-revalidate
|
158
|
+
Set-Cookie:
|
159
|
+
- _locomotive_session=uFUrpZan-EA2AzmSsY-9cFje0sA; domain=.sample.lvh.me; path=/;
|
160
|
+
HttpOnly
|
161
|
+
X-Request-Id:
|
162
|
+
- 8033ea5edff41d69d608268af677821b
|
163
|
+
X-Runtime:
|
164
|
+
- '0.088316'
|
165
|
+
body:
|
166
|
+
encoding: UTF-8
|
167
|
+
string: '[{"id":"54eb4bbc2475804b2b000040","_id":"54eb4bbc2475804b2b000040","created_at":"2015-02-23T15:48:12Z","updated_at":"2015-02-23T15:48:12Z","_label":"Alice
|
168
|
+
in Chains","_slug":"alice-in-chains","_position":1,"_visible":true,"content_type_slug":"bands","name":"Alice
|
169
|
+
in Chains","leader":"Layne","kind":"grunge","kind_id":"54eb4b662475804b2b00000f","featured":false,"songs":[]},{"id":"54eb4bbc2475804b2b00003f","_id":"54eb4bbc2475804b2b00003f","created_at":"2015-02-23T15:48:12Z","updated_at":"2015-02-23T15:48:12Z","_label":"Pearl
|
170
|
+
Jam","_slug":"pearl-jam","_position":0,"_visible":true,"content_type_slug":"bands","name":"Pearl
|
171
|
+
Jam","leader":"Eddie","kind":"grunge","kind_id":"54eb4b662475804b2b00000f","featured":false,"songs":["song-number-1","song-number-2","song-number-3","song-number-4"]},{"id":"54eb4bbc2475804b2b000041","_id":"54eb4bbc2475804b2b000041","created_at":"2015-02-23T15:48:12Z","updated_at":"2015-02-23T15:48:12Z","_label":"The
|
172
|
+
who","_slug":"the-who","_position":2,"_visible":true,"content_type_slug":"bands","name":"The
|
173
|
+
who","leader":"Peter","kind":"rock","kind_id":"54eb4b662475804b2b000010","featured":true,"songs":["song-number-5","song-number-6"]}]'
|
174
|
+
http_version:
|
175
|
+
recorded_at: Thu, 26 Mar 2015 11:42:07 GMT
|
176
|
+
- request:
|
177
|
+
method: get
|
178
|
+
uri: http://sample.lvh.me:4000/locomotive/api/content_types/bands/entries.json?auth_token=9GLRWwc2MGTCF7SHiZSg&page=2&where=%7B%7D
|
179
|
+
body:
|
180
|
+
encoding: US-ASCII
|
181
|
+
string: ''
|
182
|
+
headers:
|
183
|
+
Accept:
|
184
|
+
- application/json
|
185
|
+
Accept-Encoding:
|
186
|
+
- gzip
|
187
|
+
User-Agent:
|
188
|
+
- unirest-ruby/1.1
|
189
|
+
response:
|
190
|
+
status:
|
191
|
+
code: 200
|
192
|
+
message: OK
|
193
|
+
headers:
|
194
|
+
Date:
|
195
|
+
- Thu, 26 Mar 2015 11:42:47 GMT
|
196
|
+
Status:
|
197
|
+
- 200 OK
|
198
|
+
Connection:
|
199
|
+
- close
|
200
|
+
X-Total-Pages:
|
201
|
+
- '1'
|
202
|
+
X-Per-Page:
|
203
|
+
- '10'
|
204
|
+
X-Total-Entries:
|
205
|
+
- '3'
|
206
|
+
Content-Type:
|
207
|
+
- application/json; charset=utf-8
|
208
|
+
X-Ua-Compatible:
|
209
|
+
- IE=Edge
|
210
|
+
Etag:
|
211
|
+
- '"d751713988987e9331980363e24189ce"'
|
212
|
+
Cache-Control:
|
213
|
+
- max-age=0, private, must-revalidate
|
214
|
+
Set-Cookie:
|
215
|
+
- _locomotive_session=MCwnvao2L1V4f6_hrHaj8EG6Xnk; domain=.sample.lvh.me; path=/;
|
216
|
+
HttpOnly
|
217
|
+
X-Request-Id:
|
218
|
+
- b6c46c8e51af9298038b5039e964cc07
|
219
|
+
X-Runtime:
|
220
|
+
- '0.038975'
|
221
|
+
body:
|
222
|
+
encoding: UTF-8
|
223
|
+
string: "[]"
|
224
|
+
http_version:
|
225
|
+
recorded_at: Thu, 26 Mar 2015 11:42:47 GMT
|
226
|
+
- request:
|
227
|
+
method: get
|
228
|
+
uri: http://sample.lvh.me:4000/locomotive/api/content_types/bands/entries.json?auth_token=9GLRWwc2MGTCF7SHiZSg&page=2&per_page=2&where=%7B%7D
|
229
|
+
body:
|
230
|
+
encoding: US-ASCII
|
231
|
+
string: ''
|
232
|
+
headers:
|
233
|
+
Accept:
|
234
|
+
- application/json
|
235
|
+
Accept-Encoding:
|
236
|
+
- gzip
|
237
|
+
User-Agent:
|
238
|
+
- unirest-ruby/1.1
|
239
|
+
response:
|
240
|
+
status:
|
241
|
+
code: 200
|
242
|
+
message: OK
|
243
|
+
headers:
|
244
|
+
Date:
|
245
|
+
- Thu, 26 Mar 2015 11:43:54 GMT
|
246
|
+
Status:
|
247
|
+
- 200 OK
|
248
|
+
Connection:
|
249
|
+
- close
|
250
|
+
X-Total-Pages:
|
251
|
+
- '2'
|
252
|
+
X-Per-Page:
|
253
|
+
- '2'
|
254
|
+
X-Total-Entries:
|
255
|
+
- '3'
|
256
|
+
Content-Type:
|
257
|
+
- application/json; charset=utf-8
|
258
|
+
X-Ua-Compatible:
|
259
|
+
- IE=Edge
|
260
|
+
Etag:
|
261
|
+
- '"77cec12cfd3fa8312a6ebfe37146b5b3"'
|
262
|
+
Cache-Control:
|
263
|
+
- max-age=0, private, must-revalidate
|
264
|
+
Set-Cookie:
|
265
|
+
- _locomotive_session=MrAzKiNGfNlKnrgF1ZUdLEcJpm8; domain=.sample.lvh.me; path=/;
|
266
|
+
HttpOnly
|
267
|
+
X-Request-Id:
|
268
|
+
- 133e08d818134e7ed3771af680a81a36
|
269
|
+
X-Runtime:
|
270
|
+
- '0.046230'
|
271
|
+
body:
|
272
|
+
encoding: UTF-8
|
273
|
+
string: '[{"id":"54eb4bbc2475804b2b000041","_id":"54eb4bbc2475804b2b000041","created_at":"2015-02-23T15:48:12Z","updated_at":"2015-02-23T15:48:12Z","_label":"The
|
274
|
+
who","_slug":"the-who","_position":2,"_visible":true,"content_type_slug":"bands","name":"The
|
275
|
+
who","leader":"Peter","kind":"rock","kind_id":"54eb4b662475804b2b000010","featured":true,"songs":["song-number-5","song-number-6"]}]'
|
276
|
+
http_version:
|
277
|
+
recorded_at: Thu, 26 Mar 2015 11:43:54 GMT
|
278
|
+
- request:
|
279
|
+
method: get
|
280
|
+
uri: http://sample.lvh.me:4000/locomotive/api/content_types/bands/entries.json?auth_token=9GLRWwc2MGTCF7SHiZSg&where=%7B%22_visible%22:true,%22name%22:%22Pearl%20Jam%22%7D
|
281
|
+
body:
|
282
|
+
encoding: US-ASCII
|
283
|
+
string: ''
|
284
|
+
headers:
|
285
|
+
Accept:
|
286
|
+
- application/json
|
287
|
+
Accept-Encoding:
|
288
|
+
- gzip
|
289
|
+
User-Agent:
|
290
|
+
- unirest-ruby/1.1
|
291
|
+
response:
|
292
|
+
status:
|
293
|
+
code: 200
|
294
|
+
message: OK
|
295
|
+
headers:
|
296
|
+
Date:
|
297
|
+
- Thu, 26 Mar 2015 11:46:05 GMT
|
298
|
+
Status:
|
299
|
+
- 200 OK
|
300
|
+
Connection:
|
301
|
+
- close
|
302
|
+
X-Total-Pages:
|
303
|
+
- '1'
|
304
|
+
X-Per-Page:
|
305
|
+
- '10'
|
306
|
+
X-Total-Entries:
|
307
|
+
- '1'
|
308
|
+
Content-Type:
|
309
|
+
- application/json; charset=utf-8
|
310
|
+
X-Ua-Compatible:
|
311
|
+
- IE=Edge
|
312
|
+
Etag:
|
313
|
+
- '"f8ee5f52f06bb626aa8998c399bdd303"'
|
314
|
+
Cache-Control:
|
315
|
+
- max-age=0, private, must-revalidate
|
316
|
+
Set-Cookie:
|
317
|
+
- _locomotive_session=JEUQBJGbGbEkga1EmhwA4en9kbo; domain=.sample.lvh.me; path=/;
|
318
|
+
HttpOnly
|
319
|
+
X-Request-Id:
|
320
|
+
- 152e785ab085c083f15a8b5e9b8652da
|
321
|
+
X-Runtime:
|
322
|
+
- '0.043661'
|
323
|
+
body:
|
324
|
+
encoding: UTF-8
|
325
|
+
string: '[{"id":"54eb4bbc2475804b2b00003f","_id":"54eb4bbc2475804b2b00003f","created_at":"2015-02-23T15:48:12Z","updated_at":"2015-02-23T15:48:12Z","_label":"Pearl
|
326
|
+
Jam","_slug":"pearl-jam","_position":0,"_visible":true,"content_type_slug":"bands","name":"Pearl
|
327
|
+
Jam","leader":"Eddie","kind":"grunge","kind_id":"54eb4b662475804b2b00000f","featured":false,"songs":["song-number-1","song-number-2","song-number-3","song-number-4"]}]'
|
328
|
+
http_version:
|
329
|
+
recorded_at: Thu, 26 Mar 2015 11:46:05 GMT
|
330
|
+
- request:
|
331
|
+
method: put
|
332
|
+
uri: http://sample.lvh.me:4000/locomotive/api/content_types/bands/entries/54eb4bbc2475804b2b000040.json
|
333
|
+
body:
|
334
|
+
encoding: US-ASCII
|
335
|
+
string: content_entry[name]=Pearl%20Jam&auth_token=9GLRWwc2MGTCF7SHiZSg
|
336
|
+
headers:
|
337
|
+
Accept:
|
338
|
+
- application/json
|
339
|
+
Accept-Encoding:
|
340
|
+
- gzip
|
341
|
+
User-Agent:
|
342
|
+
- unirest-ruby/1.1
|
343
|
+
Content-Length:
|
344
|
+
- '63'
|
345
|
+
Content-Type:
|
346
|
+
- application/x-www-form-urlencoded
|
347
|
+
response:
|
348
|
+
status:
|
349
|
+
code: 200
|
350
|
+
message: OK
|
351
|
+
headers:
|
352
|
+
Date:
|
353
|
+
- Thu, 26 Mar 2015 11:55:30 GMT
|
354
|
+
Status:
|
355
|
+
- 200 OK
|
356
|
+
Connection:
|
357
|
+
- close
|
358
|
+
X-Message:
|
359
|
+
- '"Content%20entry%20was%20successfully%20updated."'
|
360
|
+
X-Message-Type:
|
361
|
+
- notice
|
362
|
+
Location:
|
363
|
+
- http://sample.lvh.me:4000/locomotive/api/content_types/bands/entries
|
364
|
+
Content-Type:
|
365
|
+
- application/json; charset=utf-8
|
366
|
+
X-Ua-Compatible:
|
367
|
+
- IE=Edge
|
368
|
+
Etag:
|
369
|
+
- '"84c5c68cba09d1589e78a8827644a958"'
|
370
|
+
Cache-Control:
|
371
|
+
- max-age=0, private, must-revalidate
|
372
|
+
Set-Cookie:
|
373
|
+
- _locomotive_session=0Nu-IUIFMFrUHygtzzQCMPzNa6k; domain=.sample.lvh.me; path=/;
|
374
|
+
HttpOnly
|
375
|
+
X-Request-Id:
|
376
|
+
- 6650fc80d6ae5f691cc38a1cc868d8c2
|
377
|
+
X-Runtime:
|
378
|
+
- '0.060579'
|
379
|
+
body:
|
380
|
+
encoding: UTF-8
|
381
|
+
string: '{"id":"54eb4bbc2475804b2b000040","_id":"54eb4bbc2475804b2b000040","created_at":"2015-02-23T15:48:12Z","updated_at":"2015-03-26T11:55:30Z","_label":"Pearl
|
382
|
+
Jam","_slug":"alice-in-chains","_position":1,"_visible":true,"content_type_slug":"bands","name":"Pearl
|
383
|
+
Jam","leader":"Layne","kind":"grunge","kind_id":"54eb4b662475804b2b00000f","featured":false,"songs":[]}'
|
384
|
+
http_version:
|
385
|
+
recorded_at: Thu, 26 Mar 2015 11:55:30 GMT
|
386
|
+
recorded_with: VCR 2.9.3
|