gather_content-api 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.travis.yml +4 -0
- data/Gemfile +13 -0
- data/README.md +395 -0
- data/Rakefile +14 -0
- data/gather_content-api.gemspec +25 -0
- data/lib/gather_content/api/account.rb +25 -0
- data/lib/gather_content/api/accounts.rb +23 -0
- data/lib/gather_content/api/base.rb +67 -0
- data/lib/gather_content/api/config.rb +35 -0
- data/lib/gather_content/api/file.rb +19 -0
- data/lib/gather_content/api/files.rb +27 -0
- data/lib/gather_content/api/item.rb +53 -0
- data/lib/gather_content/api/items.rb +50 -0
- data/lib/gather_content/api/me.rb +19 -0
- data/lib/gather_content/api/project.rb +25 -0
- data/lib/gather_content/api/projects.rb +51 -0
- data/lib/gather_content/api/status.rb +26 -0
- data/lib/gather_content/api/statuses.rb +27 -0
- data/lib/gather_content/api/template.rb +25 -0
- data/lib/gather_content/api/templates.rb +35 -0
- data/lib/gather_content/api.rb +19 -0
- data/lib/gather_content/error/request_error.rb +33 -0
- data/lib/gather_content/error.rb +5 -0
- data/lib/gather_content/version.rb +3 -0
- data/lib/gather_content.rb +5 -0
- data/spec/gather_content/api/account_spec.rb +28 -0
- data/spec/gather_content/api/accounts_spec.rb +24 -0
- data/spec/gather_content/api/base_spec.rb +5 -0
- data/spec/gather_content/api/config_spec.rb +98 -0
- data/spec/gather_content/api/files_spec.rb +39 -0
- data/spec/gather_content/api/item_spec.rb +158 -0
- data/spec/gather_content/api/items_spec.rb +127 -0
- data/spec/gather_content/api/me_spec.rb +26 -0
- data/spec/gather_content/api/project_spec.rb +32 -0
- data/spec/gather_content/api/projects_spec.rb +96 -0
- data/spec/gather_content/api/status_spec.rb +44 -0
- data/spec/gather_content/api/statuses_spec.rb +39 -0
- data/spec/gather_content/api/template_spec.rb +36 -0
- data/spec/gather_content/api/templates_spec.rb +23 -0
- data/spec/spec_helper.rb +26 -0
- data/spec/vcr_cassettes/GatherContent_Api_Account/_/returns_the_data_related_to_the_supplied_key.yml +39 -0
- data/spec/vcr_cassettes/GatherContent_Api_Account/_fetch/1_2_1.yml +39 -0
- data/spec/vcr_cassettes/GatherContent_Api_Account/_fetch/1_3_1.yml +39 -0
- data/spec/vcr_cassettes/GatherContent_Api_Account/_get_account/1_3_1.yml +39 -0
- data/spec/vcr_cassettes/GatherContent_Api_Accounts/_each/should_contain_Account_objects.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Accounts/_each/should_have_memoized_data.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Files/_each/should_contain_File_objects.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Files/_each/should_have_memoized_data.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/_/returns_the_data_related_to_the_supplied_key.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/_fetch/1_2_1.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/_get_item/1_3_1.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/apply_template/successful/returns_true.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/apply_template/unsuccessful/parses_the_message.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/apply_template/unsuccessful/raises_an_RequestError.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/apply_template/unsuccessful/sets_the_RequestError_status.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/choose_status/successful/returns_true.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/choose_status/unsuccessful/parses_the_message.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/choose_status/unsuccessful/raises_an_RequestError.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/choose_status/unsuccessful/sets_the_RequestError_status.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/save/successful/returns_true.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/save/unsuccessful/parses_the_message.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/save/unsuccessful/raises_an_RequestError.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Item/save/unsuccessful/sets_the_RequestError_status.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/on_non-202_response/raises_an_RequestError.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/on_non-202_response/sets_the_RequestError_message.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/on_non-202_response/sets_the_RequestError_status.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/with_config/created_an_item.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/with_config/set_the_item_id.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/with_config/sets_the_content.yml +88 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/with_name/created_an_item.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_create/with_name/set_the_item_id.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_each/should_contain_Item_objects.yml +43 -0
- data/spec/vcr_cassettes/GatherContent_Api_Items/_each/should_have_memoized_data.yml +43 -0
- data/spec/vcr_cassettes/GatherContent_Api_Me/_/returns_the_data_related_to_the_supplied_key.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Me/_fetch/1_2_1.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Me/_get_me/1_2_1.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Project/_/returns_the_data_related_to_the_supplied_key.yml +41 -0
- data/spec/vcr_cassettes/GatherContent_Api_Project/_fetch/1_3_1.yml +41 -0
- data/spec/vcr_cassettes/GatherContent_Api_Project/_get_project/1_3_1.yml +41 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_create/on_non-202_response/raises_an_RequestError.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_create/on_non-202_response/sets_the_RequestError_message.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_create/on_non-202_response/sets_the_RequestError_status.yml +42 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_create/with_empty_type/created_a_project.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_create/with_name_and_valid_type/created_a_project.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_create/with_name_and_valid_type/set_the_project_id.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_create/with_no_type/created_a_project.yml +44 -0
- data/spec/vcr_cassettes/GatherContent_Api_Projects/_each/should_contain_Project_objects.yml +41 -0
- data/spec/vcr_cassettes/GatherContent_Api_Status/_/returns_the_data_related_to_the_supplied_key.yml +39 -0
- data/spec/vcr_cassettes/GatherContent_Api_Status/_fetch/1_2_1.yml +39 -0
- data/spec/vcr_cassettes/GatherContent_Api_Statuses/_each/should_contain_Status_objects.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Statuses/_each/should_have_memoized_data.yml +41 -0
- data/spec/vcr_cassettes/GatherContent_Api_Template/_/returns_the_data_related_to_the_supplied_key.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Template/_fetch/1_2_1.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Templates/_each/should_contain_Template_objects.yml +40 -0
- data/spec/vcr_cassettes/GatherContent_Api_Templates/_each/should_have_memoized_data.yml +40 -0
- metadata +254 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/accounts/123456
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Mon, 26 Feb 2018 04:08:03 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '75'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":{"id":"123456","name":"Example","slug":"example","timezone":"UTC"}}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Mon, 26 Feb 2018 04:08:03 GMT
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/accounts/123456
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Mon, 26 Feb 2018 04:08:03 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '75'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":{"id":"123456","name":"Example","slug":"example","timezone":"UTC"}}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Mon, 26 Feb 2018 04:08:03 GMT
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/accounts
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Fri, 23 Feb 2018 03:05:00 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '85'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":[{"id":"123456","name":"Example","slug":"example","timezone":"UTC"}]}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 23 Feb 2018 03:05:00 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/accounts
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Fri, 23 Feb 2018 03:05:00 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '85'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":[{"id":"123456","name":"Example","slug":"example","timezone":"UTC"}]}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 23 Feb 2018 03:05:00 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/items/123456/files
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Wed, 28 Feb 2018 02:36:24 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '493'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":[{"id":1,"user_id":1,"item_id":123456,"field":"abc123","type":"1","url":"http://link.to/filename.png","filename":"original.png","size":123456,"created_at":"2015-12-10 18:49:17","updated_at":"2015-12-10 18:49:17"}]}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Wed, 28 Feb 2018 02:36:24 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/items/123456/files
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Wed, 28 Feb 2018 02:36:24 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '493'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":[{"id":1,"user_id":1,"item_id":123456,"field":"abc123","type":"1","url":"http://link.to/filename.png","filename":"original.png","size":123456,"created_at":"2015-12-10 18:49:17","updated_at":"2015-12-10 18:49:17"}]}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Wed, 28 Feb 2018 02:36:24 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
data/spec/vcr_cassettes/GatherContent_Api_Item/_/returns_the_data_related_to_the_supplied_key.yml
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/items/123456
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.13.1
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Fri, 17 Nov 2017 18:19:07 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '2373'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":{"id":123456,"project_id":123456,"parent_id":0,"template_id":null,"position":"11","name":"Home","config":[{"label":"Content","hidden":false,"elements":[{"type":"text","name":"el1429200091126","required":false,"label":"Page header","value":"<p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus leo tortor, vulputate eu leo vel, pharetra mattis sem. Nunc et nisl in ligula elementum rutrum a non mauris.\n</p>\n<p>\n In venenatis, ante eget vestibulum maximus, eros sapien maximus ipsum, nec malesuada massa ante finibus diam. Sed rutrum diam sit amet ligula tempor, non vulputate mauris facilisis. Sed varius lectus mauris, sit amet pulvinar justo condimentum ut. In blandit ipsum lorem, quis tincidunt erat sodales ut.\n</p>\n<p>\n Nunc congue tellus magna, eget hendrerit enim malesuada a. Proin diam lacus, suscipit ut nisl sed, suscipit vulputate ante. Suspendisse sit amet ex sollicitudin, iaculis urna eu, auctor ligula. Fusce consectetur, leo eu tempus fermentum, metus risus fringilla augue, et maximus arcu quam sit amet odio. Nam at commodo ex\n</p>","microcopy":"","limit_type":"words","limit":"0","plain_text":false},{"type":"choice_radio","name":"Multiple-choice","required":false,"label":"Multiple choice","microcopy":"","other_option":true,"options":[{"label":"Second Choice","selected":false,"name":"Multiple-choice-op1"},{"label":"Third Choice","selected":true,"name":"Multiple-choice-op2"},{"label":"Red","selected":false,"name":"Multiple-choice-op3"},{"label":"Blue","selected":false,"name":"Multiple-choice-op4"},{"label":"Other","selected":false,"value":"","name":"Multiple-choice-op5"}]},{"type":"files","name":"File-attachment","required":false,"label":"File attachment","microcopy":""}],"name":"tab1"}],"notes":"","type":"item","overdue":true,"updated_at":{"date":"2015-08-26 15:16:02.000000","timezone_type":3,"timezone":"UTC"},"created_at":{"date":"2015-08-26 15:16:02.000000","timezone_type":3,"timezone":"UTC"},"status":{"data":{"id":"123456","is_default":true,"position":"1","color":"#C5C5C5","name":"Draft","description":"","can_edit":true}},"due_dates":{"data":[{"status_id":123456,"overdue":true,"due_date":{"date":"2015-07-02 12:00:00.000000","timezone_type":3,"timezone":"UTC"}},{"status_id":123457,"overdue":true,"due_date":{"date":"2015-07-03 16:00:00.000000","timezone_type":3,"timezone":"UTC"}}]}}}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 17 Nov 2017 18:19:07 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/items/123456
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.13.1
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Fri, 17 Nov 2017 18:19:07 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '2373'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":{"id":123456,"project_id":123456,"parent_id":0,"template_id":null,"position":"11","name":"Home","config":[{"label":"Content","hidden":false,"elements":[{"type":"text","name":"el1429200091126","required":false,"label":"Page header","value":"<p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus leo tortor, vulputate eu leo vel, pharetra mattis sem. Nunc et nisl in ligula elementum rutrum a non mauris.\n</p>\n<p>\n In venenatis, ante eget vestibulum maximus, eros sapien maximus ipsum, nec malesuada massa ante finibus diam. Sed rutrum diam sit amet ligula tempor, non vulputate mauris facilisis. Sed varius lectus mauris, sit amet pulvinar justo condimentum ut. In blandit ipsum lorem, quis tincidunt erat sodales ut.\n</p>\n<p>\n Nunc congue tellus magna, eget hendrerit enim malesuada a. Proin diam lacus, suscipit ut nisl sed, suscipit vulputate ante. Suspendisse sit amet ex sollicitudin, iaculis urna eu, auctor ligula. Fusce consectetur, leo eu tempus fermentum, metus risus fringilla augue, et maximus arcu quam sit amet odio. Nam at commodo ex\n</p>","microcopy":"","limit_type":"words","limit":"0","plain_text":false},{"type":"choice_radio","name":"Multiple-choice","required":false,"label":"Multiple choice","microcopy":"","other_option":true,"options":[{"label":"Second Choice","selected":false,"name":"Multiple-choice-op1"},{"label":"Third Choice","selected":true,"name":"Multiple-choice-op2"},{"label":"Red","selected":false,"name":"Multiple-choice-op3"},{"label":"Blue","selected":false,"name":"Multiple-choice-op4"},{"label":"Other","selected":false,"value":"","name":"Multiple-choice-op5"}]},{"type":"files","name":"File-attachment","required":false,"label":"File attachment","microcopy":""}],"name":"tab1"}],"notes":"","type":"item","overdue":true,"updated_at":{"date":"2015-08-26 15:16:02.000000","timezone_type":3,"timezone":"UTC"},"created_at":{"date":"2015-08-26 15:16:02.000000","timezone_type":3,"timezone":"UTC"},"status":{"data":{"id":"123456","is_default":true,"position":"1","color":"#C5C5C5","name":"Draft","description":"","can_edit":true}},"due_dates":{"data":[{"status_id":123456,"overdue":true,"due_date":{"date":"2015-07-02 12:00:00.000000","timezone_type":3,"timezone":"UTC"}},{"status_id":123457,"overdue":true,"due_date":{"date":"2015-07-03 16:00:00.000000","timezone_type":3,"timezone":"UTC"}}]}}}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 17 Nov 2017 18:19:07 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.gathercontent.com/items/123456
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.13.1
|
12
|
+
Accept:
|
13
|
+
- application/vnd.gathercontent.v0.5+json
|
14
|
+
Authorization:
|
15
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Fri, 17 Nov 2017 18:19:07 GMT
|
29
|
+
Server:
|
30
|
+
- nginx
|
31
|
+
Content-Length:
|
32
|
+
- '2373'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"data":{"id":123456,"project_id":123456,"parent_id":0,"template_id":null,"position":"11","name":"Home","config":[{"label":"Content","hidden":false,"elements":[{"type":"text","name":"el1429200091126","required":false,"label":"Page header","value":"<p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus leo tortor, vulputate eu leo vel, pharetra mattis sem. Nunc et nisl in ligula elementum rutrum a non mauris.\n</p>\n<p>\n In venenatis, ante eget vestibulum maximus, eros sapien maximus ipsum, nec malesuada massa ante finibus diam. Sed rutrum diam sit amet ligula tempor, non vulputate mauris facilisis. Sed varius lectus mauris, sit amet pulvinar justo condimentum ut. In blandit ipsum lorem, quis tincidunt erat sodales ut.\n</p>\n<p>\n Nunc congue tellus magna, eget hendrerit enim malesuada a. Proin diam lacus, suscipit ut nisl sed, suscipit vulputate ante. Suspendisse sit amet ex sollicitudin, iaculis urna eu, auctor ligula. Fusce consectetur, leo eu tempus fermentum, metus risus fringilla augue, et maximus arcu quam sit amet odio. Nam at commodo ex\n</p>","microcopy":"","limit_type":"words","limit":"0","plain_text":false},{"type":"choice_radio","name":"Multiple-choice","required":false,"label":"Multiple choice","microcopy":"","other_option":true,"options":[{"label":"Second Choice","selected":false,"name":"Multiple-choice-op1"},{"label":"Third Choice","selected":true,"name":"Multiple-choice-op2"},{"label":"Red","selected":false,"name":"Multiple-choice-op3"},{"label":"Blue","selected":false,"name":"Multiple-choice-op4"},{"label":"Other","selected":false,"value":"","name":"Multiple-choice-op5"}]},{"type":"files","name":"File-attachment","required":false,"label":"File attachment","microcopy":""}],"name":"tab1"}],"notes":"","type":"item","overdue":true,"updated_at":{"date":"2015-08-26 15:16:02.000000","timezone_type":3,"timezone":"UTC"},"created_at":{"date":"2015-08-26 15:16:02.000000","timezone_type":3,"timezone":"UTC"},"status":{"data":{"id":"123456","is_default":true,"position":"1","color":"#C5C5C5","name":"Draft","description":"","can_edit":true}},"due_dates":{"data":[{"status_id":123456,"overdue":true,"due_date":{"date":"2015-07-02 12:00:00.000000","timezone_type":3,"timezone":"UTC"}},{"status_id":123457,"overdue":true,"due_date":{"date":"2015-07-03 16:00:00.000000","timezone_type":3,"timezone":"UTC"}}]}}}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 17 Nov 2017 18:19:07 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.gathercontent.com/items/123456/apply_template
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"template_id":1085780}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/vnd.gathercontent.v0.5+json
|
16
|
+
Authorization:
|
17
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 202
|
23
|
+
message: Accepted
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- text/html; charset=UTF-8
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Feb 2018 06:28:12 GMT
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Content-Length:
|
34
|
+
- '0'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: ''
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 28 Feb 2018 06:28:12 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
data/spec/vcr_cassettes/GatherContent_Api_Item/apply_template/unsuccessful/parses_the_message.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.gathercontent.com/items/123456/apply_template
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"template_id":1085779}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/vnd.gathercontent.v0.5+json
|
16
|
+
Authorization:
|
17
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 500
|
23
|
+
message: Internal Server Error
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Feb 2018 06:28:16 GMT
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Content-Length:
|
34
|
+
- '25'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"error":"unknown error"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 28 Feb 2018 06:28:16 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.gathercontent.com/items/123456/apply_template
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"template_id":1085779}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/vnd.gathercontent.v0.5+json
|
16
|
+
Authorization:
|
17
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 500
|
23
|
+
message: Internal Server Error
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Feb 2018 06:28:13 GMT
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Content-Length:
|
34
|
+
- '25'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"error":"unknown error"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 28 Feb 2018 06:28:13 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.gathercontent.com/items/123456/apply_template
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"template_id":1085779}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/vnd.gathercontent.v0.5+json
|
16
|
+
Authorization:
|
17
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 500
|
23
|
+
message: Internal Server Error
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Feb 2018 06:28:15 GMT
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Content-Length:
|
34
|
+
- '25'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"error":"unknown error"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 28 Feb 2018 06:28:15 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.gathercontent.com/items/123456/choose_status
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"status_id":991221}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/vnd.gathercontent.v0.5+json
|
16
|
+
Authorization:
|
17
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 202
|
23
|
+
message: Accepted
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- text/html; charset=UTF-8
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Feb 2018 06:28:17 GMT
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Content-Length:
|
34
|
+
- '0'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: ''
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 28 Feb 2018 06:28:18 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
data/spec/vcr_cassettes/GatherContent_Api_Item/choose_status/unsuccessful/parses_the_message.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.gathercontent.com/items/123456/choose_status
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"status_id":991219}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/vnd.gathercontent.v0.5+json
|
16
|
+
Authorization:
|
17
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 500
|
23
|
+
message: Internal Server Error
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Feb 2018 06:28:21 GMT
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Content-Length:
|
34
|
+
- '25'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"error":"unknown error"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 28 Feb 2018 06:28:21 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
data/spec/vcr_cassettes/GatherContent_Api_Item/choose_status/unsuccessful/raises_an_RequestError.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.gathercontent.com/items/123456/choose_status
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"status_id":991219}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/vnd.gathercontent.v0.5+json
|
16
|
+
Authorization:
|
17
|
+
- Basic YW5kcmV3QGdhdGhlcmNvbnRlbnQuY29tOjJkMmE4YmY2LTA4YzAtNDllNi05NDYwLTI1MTM5ZmRiOGIyNA==
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 500
|
23
|
+
message: Internal Server Error
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Feb 2018 06:28:19 GMT
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Content-Length:
|
34
|
+
- '25'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"error":"unknown error"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 28 Feb 2018 06:28:19 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|