desk_api 0.1.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/Gemfile +0 -6
- data/README.md +38 -31
- data/desk_api.gemspec +1 -4
- data/lib/desk_api.rb +5 -7
- data/lib/desk_api/client.rb +44 -57
- data/lib/desk_api/configuration.rb +89 -95
- data/lib/desk_api/default.rb +51 -55
- data/lib/desk_api/error.rb +42 -44
- data/lib/desk_api/rate_limit.rb +20 -22
- data/lib/desk_api/resource.rb +142 -65
- data/lib/desk_api/version.rb +1 -1
- data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_delete/deletes_a_resource.yml +22 -22
- data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_get/fetches_resources.yml +26 -26
- data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_patch/updates_a_resource.yml +30 -30
- data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_post/creates_a_resource.yml +27 -27
- data/spec/cassettes/DeskApi_Client/using_OAuth/_delete/deletes_a_resource.yml +22 -22
- data/spec/cassettes/DeskApi_Client/using_OAuth/_get/fetches_resources.yml +31 -286
- data/spec/cassettes/DeskApi_Client/using_OAuth/_patch/updates_a_resource.yml +35 -35
- data/spec/cassettes/DeskApi_Client/using_OAuth/_post/creates_a_resource.yml +28 -28
- data/spec/cassettes/DeskApi_Error/_from_response/can_be_created_from_a_faraday_response.yml +22 -22
- data/spec/cassettes/DeskApi_Error/_from_response/uses_the_body_message_if_present.yml +22 -22
- data/spec/cassettes/DeskApi_Error/on_validation_error/allows_access_to_error_hash.yml +22 -22
- data/spec/cassettes/DeskApi_Resource/_by_url/finds_resources_by_url.yml +37 -286
- data/spec/cassettes/DeskApi_Resource/_create/creates_a_new_topic.yml +27 -27
- data/spec/cassettes/DeskApi_Resource/_create/throws_an_error_creating_a_user.yml +54 -0
- data/spec/cassettes/DeskApi_Resource/_delete/deletes_a_resource.yml +83 -79
- data/spec/cassettes/DeskApi_Resource/_delete/throws_an_error_deleting_a_non_deletalbe_resource.yml +78 -28
- data/spec/cassettes/DeskApi_Resource/_exec_/can_be_forced_to_reload.yml +34 -285
- data/spec/cassettes/DeskApi_Resource/_exec_/loads_the_current_resource.yml +34 -285
- data/spec/cassettes/DeskApi_Resource/_find/has_an_alias_by_id.yml +54 -0
- data/spec/cassettes/DeskApi_Resource/_find/loads_the_requested_resource.yml +54 -0
- data/spec/cassettes/DeskApi_Resource/_get_linked_resource/returns_linked_resources.yml +113 -0
- data/spec/cassettes/DeskApi_Resource/_get_linked_resource/returns_nil_if_link_is_nil.yml +62 -0
- data/spec/cassettes/DeskApi_Resource/_get_linked_resource/saves_the_linked_resource_instead_of_the_url.yml +113 -0
- data/spec/cassettes/DeskApi_Resource/_method_missing/loads_the_resource_to_find_a_suitable_method.yml +34 -285
- data/spec/cassettes/DeskApi_Resource/_method_missing/raises_an_error_if_method_does_not_exist.yml +34 -285
- data/spec/cassettes/DeskApi_Resource/_page/keeps_the_resource_as_loaded.yml +113 -0
- data/spec/cassettes/DeskApi_Resource/_page/returns_the_current_page_and_loads_if_page_not_defined.yml +62 -0
- data/spec/cassettes/DeskApi_Resource/_page/sets_the_resource_to_not_loaded.yml +113 -0
- data/spec/cassettes/DeskApi_Resource/_search/allows_searching_on_search_enabled_resources.yml +23 -23
- data/spec/cassettes/DeskApi_Resource/_search/throws_an_error_if_search_is_not_enabled.yml +52 -0
- data/spec/cassettes/DeskApi_Resource/_update/can_update_without_a_hash.yml +178 -58
- data/spec/cassettes/DeskApi_Resource/_update/throws_an_error_updating_a_user.yml +86 -28
- data/spec/cassettes/DeskApi_Resource/_update/updates_a_topic.yml +61 -57
- data/spec/desk_api/client_spec.rb +9 -16
- data/spec/desk_api/resource_spec.rb +118 -43
- data/spec/spec_helper.rb +1 -1
- metadata +24 -102
- data/lib/desk_api/action/create.rb +0 -15
- data/lib/desk_api/action/delete.rb +0 -9
- data/lib/desk_api/action/embeddable.rb +0 -47
- data/lib/desk_api/action/field.rb +0 -33
- data/lib/desk_api/action/link.rb +0 -29
- data/lib/desk_api/action/resource.rb +0 -14
- data/lib/desk_api/action/search.rb +0 -15
- data/lib/desk_api/action/update.rb +0 -17
- data/lib/desk_api/error/method_not_supported.rb +0 -9
- data/lib/desk_api/error/not_embeddable.rb +0 -8
- data/lib/desk_api/error/not_updateable.rb +0 -10
- data/lib/desk_api/error/parse_error.rb +0 -9
- data/lib/desk_api/resource/article.rb +0 -10
- data/lib/desk_api/resource/article_translation.rb +0 -8
- data/lib/desk_api/resource/attachment.rb +0 -8
- data/lib/desk_api/resource/case.rb +0 -11
- data/lib/desk_api/resource/company.rb +0 -8
- data/lib/desk_api/resource/customer.rb +0 -9
- data/lib/desk_api/resource/filter.rb +0 -7
- data/lib/desk_api/resource/inbound_mailbox.rb +0 -7
- data/lib/desk_api/resource/integration_url.rb +0 -9
- data/lib/desk_api/resource/job.rb +0 -9
- data/lib/desk_api/resource/label.rb +0 -9
- data/lib/desk_api/resource/macro.rb +0 -9
- data/lib/desk_api/resource/macro_action.rb +0 -7
- data/lib/desk_api/resource/note.rb +0 -7
- data/lib/desk_api/resource/page.rb +0 -64
- data/lib/desk_api/resource/reply.rb +0 -10
- data/lib/desk_api/resource/topic.rb +0 -9
- data/lib/desk_api/resource/topic_translation.rb +0 -9
- data/lib/desk_api/resource/user_preference.rb +0 -7
- data/lib/desk_api/resources.json +0 -76
- data/spec/cassettes/DeskApi_Client/_delete/deletes_a_resource.yml +0 -48
- data/spec/cassettes/DeskApi_Client/_get/fetches_resources.yml +0 -55
- data/spec/cassettes/DeskApi_Client/_patch/updates_a_resource.yml +0 -62
- data/spec/cassettes/DeskApi_Client/_post/creates_a_resource.yml +0 -58
- data/spec/cassettes/DeskApi_Resource_Case/once_closed/can_not_be_updated.yml +0 -124
- data/spec/cassettes/DeskApi_Resource_Page/_find/has_an_alias_by_id.yml +0 -54
- data/spec/cassettes/DeskApi_Resource_Page/_find/loads_the_requested_resource.yml +0 -54
- data/spec/cassettes/DeskApi_Resource_Page/_page/keeps_the_resource_as_loaded.yml +0 -113
- data/spec/cassettes/DeskApi_Resource_Page/_page/returns_the_current_page_and_loads_if_page_not_defined.yml +0 -313
- data/spec/cassettes/DeskApi_Resource_Page/_page/sets_the_resource_to_not_loaded.yml +0 -113
- data/spec/desk_api/resource/case_spec.rb +0 -28
- data/spec/desk_api/resource/page_spec.rb +0 -68
@@ -10,7 +10,7 @@ http_interactions:
|
|
10
10
|
Accept:
|
11
11
|
- application/json
|
12
12
|
User-Agent:
|
13
|
-
- desk.com Ruby Gem v0.1.
|
13
|
+
- desk.com Ruby Gem v0.1.3
|
14
14
|
Content-Type:
|
15
15
|
- application/json
|
16
16
|
response:
|
@@ -18,41 +18,41 @@ http_interactions:
|
|
18
18
|
code: 201
|
19
19
|
message:
|
20
20
|
headers:
|
21
|
-
|
21
|
+
accept-ranges:
|
22
22
|
- bytes
|
23
|
-
|
23
|
+
cache-control:
|
24
24
|
- max-age=0, private, must-revalidate
|
25
|
-
|
25
|
+
content-type:
|
26
26
|
- application/json; charset=utf-8
|
27
|
-
|
28
|
-
-
|
29
|
-
|
30
|
-
- '"
|
31
|
-
|
32
|
-
- https://devel.desk.com/api/v2/topics/
|
33
|
-
|
27
|
+
date:
|
28
|
+
- Thu, 12 Dec 2013 19:45:06 GMT
|
29
|
+
etag:
|
30
|
+
- '"26848664a35b2523eb6f170735e81932"'
|
31
|
+
location:
|
32
|
+
- https://devel.desk.com/api/v2/topics/601361
|
33
|
+
status:
|
34
34
|
- 201 Created
|
35
|
-
|
35
|
+
vary:
|
36
36
|
- X-AppVersion
|
37
|
-
|
38
|
-
- '
|
39
|
-
|
37
|
+
x-appversion:
|
38
|
+
- '15.6'
|
39
|
+
x-frame-options:
|
40
40
|
- SAMEORIGIN
|
41
|
-
|
41
|
+
x-rate-limit-limit:
|
42
42
|
- '60'
|
43
|
-
|
44
|
-
- '
|
45
|
-
|
46
|
-
- '
|
47
|
-
|
48
|
-
-
|
49
|
-
|
43
|
+
x-rate-limit-remaining:
|
44
|
+
- '59'
|
45
|
+
x-rate-limit-reset:
|
46
|
+
- '54'
|
47
|
+
x-request-id:
|
48
|
+
- 690d0a354312e9bff3a9f5b06e640dea
|
49
|
+
content-length:
|
50
50
|
- '402'
|
51
|
-
|
52
|
-
-
|
51
|
+
connection:
|
52
|
+
- Close
|
53
53
|
body:
|
54
54
|
encoding: UTF-8
|
55
|
-
string: '{"name":"My new topic","description":null,"position":
|
55
|
+
string: '{"name":"My new topic","description":null,"position":7,"allow_questions":true,"in_support_center":null,"created_at":"2013-12-12T19:45:06Z","updated_at":"2013-12-12T19:45:06Z","_links":{"self":{"href":"/api/v2/topics/601361","class":"topic"},"articles":{"href":"/api/v2/topics/601361/articles","class":"article"},"translations":{"href":"/api/v2/topics/601361/translations","class":"topic_translation"}}}'
|
56
56
|
http_version:
|
57
|
-
recorded_at:
|
57
|
+
recorded_at: Thu, 12 Dec 2013 19:45:06 GMT
|
58
58
|
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://devel.desk.com/api/v2/users
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Some User"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- desk.com Ruby Gem v0.1.3
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 405
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
accept-ranges:
|
22
|
+
- bytes
|
23
|
+
cache-control:
|
24
|
+
- no-cache
|
25
|
+
content-type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
date:
|
28
|
+
- Thu, 12 Dec 2013 19:45:25 GMT
|
29
|
+
status:
|
30
|
+
- 405 Method Not Allowed
|
31
|
+
vary:
|
32
|
+
- X-AppVersion
|
33
|
+
x-appversion:
|
34
|
+
- '15.6'
|
35
|
+
x-frame-options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
x-rate-limit-limit:
|
38
|
+
- '60'
|
39
|
+
x-rate-limit-remaining:
|
40
|
+
- '58'
|
41
|
+
x-rate-limit-reset:
|
42
|
+
- '35'
|
43
|
+
x-request-id:
|
44
|
+
- b5628738bab98ffa6426bc55e68bbda3
|
45
|
+
content-length:
|
46
|
+
- '32'
|
47
|
+
connection:
|
48
|
+
- Close
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"message":"Method Not Allowed"}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Thu, 12 Dec 2013 19:45:25 GMT
|
54
|
+
recorded_with: VCR 2.5.0
|
@@ -10,50 +10,54 @@ http_interactions:
|
|
10
10
|
Accept:
|
11
11
|
- application/json
|
12
12
|
User-Agent:
|
13
|
-
- desk.com Ruby Gem v0.1.
|
13
|
+
- desk.com Ruby Gem v0.1.3
|
14
14
|
response:
|
15
15
|
status:
|
16
16
|
code: 200
|
17
17
|
message:
|
18
18
|
headers:
|
19
|
-
|
19
|
+
accept-ranges:
|
20
20
|
- bytes
|
21
|
-
|
21
|
+
cache-control:
|
22
22
|
- must-revalidate, private, max-age=0
|
23
|
-
|
23
|
+
content-type:
|
24
24
|
- application/json; charset=utf-8
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
- '"
|
29
|
-
|
25
|
+
date:
|
26
|
+
- Thu, 12 Dec 2013 19:50:21 GMT
|
27
|
+
etag:
|
28
|
+
- '"bbeb448ce8982e712b1bca186a7941a1"'
|
29
|
+
status:
|
30
30
|
- 200 OK
|
31
|
-
|
31
|
+
vary:
|
32
32
|
- X-AppVersion
|
33
|
-
|
34
|
-
- '
|
35
|
-
|
33
|
+
x-appversion:
|
34
|
+
- '15.6'
|
35
|
+
x-frame-options:
|
36
36
|
- SAMEORIGIN
|
37
|
-
|
37
|
+
x-rate-limit-limit:
|
38
38
|
- '60'
|
39
|
-
|
40
|
-
- '
|
41
|
-
|
42
|
-
- '
|
43
|
-
|
44
|
-
-
|
45
|
-
|
46
|
-
- '
|
47
|
-
|
48
|
-
-
|
39
|
+
x-rate-limit-remaining:
|
40
|
+
- '59'
|
41
|
+
x-rate-limit-reset:
|
42
|
+
- '39'
|
43
|
+
x-request-id:
|
44
|
+
- 4361a6a1fa95de6cc882eca2740633b9
|
45
|
+
content-length:
|
46
|
+
- '3137'
|
47
|
+
connection:
|
48
|
+
- Close
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"total_entries":
|
52
|
-
English","description":"Another description update.","position":1,"allow_questions":true,"in_support_center":true,"created_at":"2013-04-22T23:46:42Z","updated_at":"2013-
|
53
|
-
Updated Topic","description":null,"position":2,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-14T19:37:08Z","updated_at":"2013-08-
|
54
|
-
new topic","description":null,"position":3,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-15T21:20:32Z","updated_at":"2013-08-
|
51
|
+
string: '{"total_entries":7,"_links":{"self":{"href":"/api/v2/topics?page=1&per_page=50","class":"page"},"first":{"href":"/api/v2/topics?page=1&per_page=50","class":"page"},"last":{"href":"/api/v2/topics?page=1&per_page=50","class":"page"},"previous":null,"next":null},"_embedded":{"entries":[{"name":"Testing
|
52
|
+
English","description":"Another description update.","position":1,"allow_questions":true,"in_support_center":true,"created_at":"2013-04-22T23:46:42Z","updated_at":"2013-12-12T19:48:11Z","_links":{"self":{"href":"/api/v2/topics/498301","class":"topic"},"articles":{"href":"/api/v2/topics/498301/articles","class":"article"},"translations":{"href":"/api/v2/topics/498301/translations","class":"topic_translation"}}},{"name":"Test
|
53
|
+
Updated Topic","description":null,"position":2,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-14T19:37:08Z","updated_at":"2013-08-19T23:53:31Z","_links":{"self":{"href":"/api/v2/topics/556402","class":"topic"},"articles":{"href":"/api/v2/topics/556402/articles","class":"article"},"translations":{"href":"/api/v2/topics/556402/translations","class":"topic_translation"}}},{"name":"My
|
54
|
+
new topic","description":null,"position":3,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-15T21:20:32Z","updated_at":"2013-08-19T23:53:31Z","_links":{"self":{"href":"/api/v2/topics/556908","class":"topic"},"articles":{"href":"/api/v2/topics/556908/articles","class":"article"},"translations":{"href":"/api/v2/topics/556908/translations","class":"topic_translation"}}},{"name":"My
|
55
|
+
new topic","description":null,"position":4,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-19T23:51:34Z","updated_at":"2013-08-19T23:53:31Z","_links":{"self":{"href":"/api/v2/topics/558244","class":"topic"},"articles":{"href":"/api/v2/topics/558244/articles","class":"article"},"translations":{"href":"/api/v2/topics/558244/translations","class":"topic_translation"}}},{"name":"Test
|
56
|
+
Topic","description":null,"position":5,"allow_questions":true,"in_support_center":null,"created_at":"2013-09-03T02:04:32Z","updated_at":"2013-09-03T02:04:32Z","_links":{"self":{"href":"/api/v2/topics/563658","class":"topic"},"articles":{"href":"/api/v2/topics/563658/articles","class":"article"},"translations":{"href":"/api/v2/topics/563658/translations","class":"topic_translation"}}},{"name":"Test
|
57
|
+
Topic","description":null,"position":6,"allow_questions":true,"in_support_center":null,"created_at":"2013-12-12T02:51:59Z","updated_at":"2013-12-12T02:51:59Z","_links":{"self":{"href":"/api/v2/topics/601116","class":"topic"},"articles":{"href":"/api/v2/topics/601116/articles","class":"article"},"translations":{"href":"/api/v2/topics/601116/translations","class":"topic_translation"}}},{"name":"My
|
58
|
+
new topic","description":null,"position":7,"allow_questions":true,"in_support_center":null,"created_at":"2013-12-12T19:45:06Z","updated_at":"2013-12-12T19:45:06Z","_links":{"self":{"href":"/api/v2/topics/601361","class":"topic"},"articles":{"href":"/api/v2/topics/601361/articles","class":"article"},"translations":{"href":"/api/v2/topics/601361/translations","class":"topic_translation"}}}]}}'
|
55
59
|
http_version:
|
56
|
-
recorded_at:
|
60
|
+
recorded_at: Thu, 12 Dec 2013 19:50:21 GMT
|
57
61
|
- request:
|
58
62
|
method: post
|
59
63
|
uri: https://devel.desk.com/api/v2/articles
|
@@ -64,7 +68,7 @@ http_interactions:
|
|
64
68
|
Accept:
|
65
69
|
- application/json
|
66
70
|
User-Agent:
|
67
|
-
- desk.com Ruby Gem v0.1.
|
71
|
+
- desk.com Ruby Gem v0.1.3
|
68
72
|
Content-Type:
|
69
73
|
- application/json
|
70
74
|
response:
|
@@ -72,38 +76,38 @@ http_interactions:
|
|
72
76
|
code: 201
|
73
77
|
message:
|
74
78
|
headers:
|
75
|
-
|
79
|
+
accept-ranges:
|
76
80
|
- bytes
|
77
|
-
|
81
|
+
cache-control:
|
78
82
|
- max-age=0, private, must-revalidate
|
79
|
-
|
83
|
+
content-type:
|
80
84
|
- application/json; charset=utf-8
|
81
|
-
|
82
|
-
-
|
83
|
-
|
84
|
-
- '"
|
85
|
-
|
86
|
-
- https://devel.desk.com/api/v2/articles/
|
87
|
-
|
85
|
+
date:
|
86
|
+
- Thu, 12 Dec 2013 19:50:22 GMT
|
87
|
+
etag:
|
88
|
+
- '"5853d90f7d870bc6e0095828432be0dd"'
|
89
|
+
location:
|
90
|
+
- https://devel.desk.com/api/v2/articles/1391689
|
91
|
+
status:
|
88
92
|
- 201 Created
|
89
|
-
|
93
|
+
vary:
|
90
94
|
- X-AppVersion
|
91
|
-
|
92
|
-
- '
|
93
|
-
|
95
|
+
x-appversion:
|
96
|
+
- '15.6'
|
97
|
+
x-frame-options:
|
94
98
|
- SAMEORIGIN
|
95
|
-
|
99
|
+
x-rate-limit-limit:
|
96
100
|
- '60'
|
97
|
-
|
98
|
-
- '
|
99
|
-
|
100
|
-
- '
|
101
|
-
|
102
|
-
-
|
103
|
-
|
104
|
-
- '
|
105
|
-
|
106
|
-
-
|
101
|
+
x-rate-limit-remaining:
|
102
|
+
- '58'
|
103
|
+
x-rate-limit-reset:
|
104
|
+
- '38'
|
105
|
+
x-request-id:
|
106
|
+
- 3a464b6b7accd8e20760742736eafab7
|
107
|
+
content-length:
|
108
|
+
- '1140'
|
109
|
+
connection:
|
110
|
+
- Close
|
107
111
|
body:
|
108
112
|
encoding: UTF-8
|
109
113
|
string: '{"subject":"My subject","body":"Some text for this new article","body_email":"Some
|
@@ -112,12 +116,12 @@ http_interactions:
|
|
112
116
|
this new article","body_web_callback_auto":true,"body_twitter":"Some text
|
113
117
|
for this new article","body_twitter_auto":true,"body_qna":"Some text for this
|
114
118
|
new article","body_qna_auto":true,"body_phone":"Some text for this new article","body_phone_auto":true,"body_facebook":"Some
|
115
|
-
text for this new article","body_facebook_auto":true,"keywords":null,"position":
|
119
|
+
text for this new article","body_facebook_auto":true,"rating":0,"rating_count":0,"rating_score":0,"keywords":null,"position":4,"quickcode":null,"in_support_center":null,"internal_notes":null,"publish_at":null,"created_at":"2013-12-12T19:50:22Z","updated_at":"2013-12-12T19:50:22Z","_links":{"self":{"href":"/api/v2/articles/1391689","class":"article"},"topic":{"href":"/api/v2/topics/498301","class":"topic"},"translations":{"href":"/api/v2/articles/1391689/translations","class":"article_translation"},"created_by":{"href":"/api/v2/users/16096734","class":"user"},"updated_by":{"href":"/api/v2/users/16096734","class":"user"}}}'
|
116
120
|
http_version:
|
117
|
-
recorded_at:
|
121
|
+
recorded_at: Thu, 12 Dec 2013 19:50:22 GMT
|
118
122
|
- request:
|
119
123
|
method: delete
|
120
|
-
uri: https://devel.desk.com/api/v2/articles/
|
124
|
+
uri: https://devel.desk.com/api/v2/articles/1391689
|
121
125
|
body:
|
122
126
|
encoding: US-ASCII
|
123
127
|
string: ''
|
@@ -125,39 +129,39 @@ http_interactions:
|
|
125
129
|
Accept:
|
126
130
|
- application/json
|
127
131
|
User-Agent:
|
128
|
-
- desk.com Ruby Gem v0.1.
|
132
|
+
- desk.com Ruby Gem v0.1.3
|
129
133
|
response:
|
130
134
|
status:
|
131
135
|
code: 204
|
132
136
|
message:
|
133
137
|
headers:
|
134
|
-
|
138
|
+
accept-ranges:
|
135
139
|
- bytes
|
136
|
-
|
140
|
+
cache-control:
|
137
141
|
- no-cache
|
138
|
-
|
139
|
-
-
|
140
|
-
|
142
|
+
date:
|
143
|
+
- Thu, 12 Dec 2013 19:50:22 GMT
|
144
|
+
status:
|
141
145
|
- 204 No Content
|
142
|
-
|
146
|
+
vary:
|
143
147
|
- X-AppVersion
|
144
|
-
|
145
|
-
- '
|
146
|
-
|
148
|
+
x-appversion:
|
149
|
+
- '15.6'
|
150
|
+
x-frame-options:
|
147
151
|
- SAMEORIGIN
|
148
|
-
|
152
|
+
x-rate-limit-limit:
|
149
153
|
- '60'
|
150
|
-
|
151
|
-
- '
|
152
|
-
|
153
|
-
- '
|
154
|
-
|
155
|
-
-
|
156
|
-
|
157
|
-
-
|
154
|
+
x-rate-limit-remaining:
|
155
|
+
- '57'
|
156
|
+
x-rate-limit-reset:
|
157
|
+
- '38'
|
158
|
+
x-request-id:
|
159
|
+
- 334601782b770a2b7f5837d13b969b9a
|
160
|
+
connection:
|
161
|
+
- Close
|
158
162
|
body:
|
159
|
-
encoding:
|
163
|
+
encoding: US-ASCII
|
160
164
|
string: ''
|
161
165
|
http_version:
|
162
|
-
recorded_at:
|
166
|
+
recorded_at: Thu, 12 Dec 2013 19:50:22 GMT
|
163
167
|
recorded_with: VCR 2.5.0
|
data/spec/cassettes/DeskApi_Resource/_delete/throws_an_error_deleting_a_non_deletalbe_resource.yml
CHANGED
@@ -10,47 +10,97 @@ http_interactions:
|
|
10
10
|
Accept:
|
11
11
|
- application/json
|
12
12
|
User-Agent:
|
13
|
-
- desk.com Ruby Gem v0.1.
|
13
|
+
- desk.com Ruby Gem v0.1.3
|
14
14
|
response:
|
15
15
|
status:
|
16
16
|
code: 200
|
17
17
|
message:
|
18
18
|
headers:
|
19
|
-
|
19
|
+
accept-ranges:
|
20
20
|
- bytes
|
21
|
-
|
21
|
+
cache-control:
|
22
22
|
- no-cache, private
|
23
|
-
|
23
|
+
content-type:
|
24
24
|
- application/json; charset=utf-8
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
- '"
|
29
|
-
|
25
|
+
date:
|
26
|
+
- Thu, 12 Dec 2013 19:49:46 GMT
|
27
|
+
etag:
|
28
|
+
- '"1386874620"'
|
29
|
+
status:
|
30
30
|
- 200 OK
|
31
|
-
|
31
|
+
vary:
|
32
32
|
- X-AppVersion
|
33
|
-
|
34
|
-
- '
|
35
|
-
|
33
|
+
x-appversion:
|
34
|
+
- '15.6'
|
35
|
+
x-frame-options:
|
36
36
|
- SAMEORIGIN
|
37
|
-
|
37
|
+
x-rate-limit-limit:
|
38
38
|
- '60'
|
39
|
-
|
40
|
-
- '
|
41
|
-
|
42
|
-
- '
|
43
|
-
|
44
|
-
-
|
45
|
-
|
46
|
-
- '
|
47
|
-
|
48
|
-
-
|
39
|
+
x-rate-limit-remaining:
|
40
|
+
- '57'
|
41
|
+
x-rate-limit-reset:
|
42
|
+
- '14'
|
43
|
+
x-request-id:
|
44
|
+
- 5f31d5781a30f18e9c80bc0f19b34e76
|
45
|
+
content-length:
|
46
|
+
- '4293'
|
47
|
+
connection:
|
48
|
+
- Close
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"total_entries":
|
52
|
-
Stachl","public_name":"Thomas Stachl","email":"tstachl@salesforce.com","level":"siteadmin_billing","_links":{"self":{"href":"/api/v2/users/16096734","class":"user"},"preferences":{"href":"/api/v2/users/16096734/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/16096734/searches","class":"search"}}},{"name":"Dan
|
53
|
-
Stern","public_name":"Dan","email":"dan@desk.com","level":"siteadmin","_links":{"self":{"href":"/api/v2/users/16107036","class":"user"},"preferences":{"href":"/api/v2/users/16107036/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/16107036/searches","class":"search"}}},{"name":"Mark","public_name":"Mark","email":"mchasse_old@desk.com","level":"siteadmin_billing","_links":{"self":{"href":"/api/v2/users/17069383","class":"user"},"preferences":{"href":"/api/v2/users/17069383/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/17069383/searches","class":"search"}}},{"name":"Mich","public_name":"Mich","email":"mich@desk.com","level":"siteadmin_billing","_links":{"self":{"href":"/api/v2/users/17069397","class":"user"},"preferences":{"href":"/api/v2/users/17069397/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/17069397/searches","class":"search"}}},{"name":"Keith","public_name":"Keith","email":"keith@desk.com","level":"agent","_links":{"self":{"href":"/api/v2/users/17250751","class":"user"},"preferences":{"href":"/api/v2/users/17250751/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/17250751/searches","class":"search"}}}
|
51
|
+
string: '{"total_entries":6,"_links":{"self":{"href":"/api/v2/users?page=1&per_page=50","class":"page"},"first":{"href":"/api/v2/users?page=1&per_page=50","class":"page"},"last":{"href":"/api/v2/users?page=1&per_page=50","class":"page"},"previous":null,"next":null},"_embedded":{"entries":[{"name":"Thomas
|
52
|
+
Stachl","public_name":"Thomas Stachl","email":"tstachl@salesforce.com","level":"siteadmin_billing","avatar":"http://www.gravatar.com/avatar/9d1a9e1a385960d1ba80fb873128cf73?rating=PG&size=50&default=https%3A%2F%2Fd218iqt4mo6adh.cloudfront.net%2Fassets%2Funknown_user_50-521aae04e00222d7dd814e72d7d869d0.png","created_at":"2012-06-06T14:51:21Z","updated_at":"2013-12-11T18:08:41Z","current_login_at":"2013-12-11T18:08:41Z","last_login_at":"2013-12-11T00:50:06Z","_links":{"self":{"href":"/api/v2/users/16096734","class":"user"},"preferences":{"href":"/api/v2/users/16096734/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/16096734/searches","class":"search"}}},{"name":"Dan
|
53
|
+
Stern","public_name":"Dan","email":"dan@desk.com","level":"siteadmin","avatar":"http://www.gravatar.com/avatar/5f56818e857c5776e02779aa2a4f8ea4?rating=PG&size=50&default=https%3A%2F%2Fd218iqt4mo6adh.cloudfront.net%2Fassets%2Funknown_user_50-521aae04e00222d7dd814e72d7d869d0.png","created_at":"2012-06-06T18:24:08Z","updated_at":"2013-08-05T22:33:48Z","current_login_at":"2013-08-05T22:33:48Z","last_login_at":"2013-08-05T22:32:16Z","_links":{"self":{"href":"/api/v2/users/16107036","class":"user"},"preferences":{"href":"/api/v2/users/16107036/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/16107036/searches","class":"search"}}},{"name":"Mark","public_name":"Mark","email":"mchasse_old@desk.com","level":"siteadmin_billing","avatar":"http://www.gravatar.com/avatar/f2d79817f28bbe7b89081b59b9a370d0?rating=PG&size=50&default=https%3A%2F%2Fd218iqt4mo6adh.cloudfront.net%2Fassets%2Funknown_user_50-521aae04e00222d7dd814e72d7d869d0.png","created_at":"2012-06-22T21:52:55Z","updated_at":"2013-05-16T01:30:48Z","current_login_at":"2013-05-16T01:30:34Z","last_login_at":"2012-07-17T19:24:54Z","_links":{"self":{"href":"/api/v2/users/17069383","class":"user"},"preferences":{"href":"/api/v2/users/17069383/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/17069383/searches","class":"search"}}},{"name":"Mich","public_name":"Mich","email":"mich@desk.com","level":"siteadmin_billing","avatar":"http://www.gravatar.com/avatar/73a4ddb25d4f0ce32eddb64add48a730?rating=PG&size=50&default=https%3A%2F%2Fd218iqt4mo6adh.cloudfront.net%2Fassets%2Funknown_user_50-521aae04e00222d7dd814e72d7d869d0.png","created_at":"2012-06-22T21:53:12Z","updated_at":"2012-06-22T21:55:12Z","current_login_at":"2012-06-22T21:55:08Z","last_login_at":null,"_links":{"self":{"href":"/api/v2/users/17069397","class":"user"},"preferences":{"href":"/api/v2/users/17069397/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/17069397/searches","class":"search"}}},{"name":"Keith","public_name":"Keith","email":"keith@desk.com","level":"agent","avatar":"http://www.gravatar.com/avatar/c492d3f749ce562f187fb738ef6adaa7?rating=PG&size=50&default=https%3A%2F%2Fd218iqt4mo6adh.cloudfront.net%2Fassets%2Funknown_user_50-521aae04e00222d7dd814e72d7d869d0.png","created_at":"2012-06-26T00:11:48Z","updated_at":"2012-06-26T19:02:52Z","current_login_at":"2012-06-26T19:02:51Z","last_login_at":null,"_links":{"self":{"href":"/api/v2/users/17250751","class":"user"},"preferences":{"href":"/api/v2/users/17250751/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/17250751/searches","class":"search"}}},{"name":"Thomas
|
54
|
+
Stachl","public_name":"Thomas Stachl","email":"thomas@desk.com","level":"flexagent","avatar":"http://www.gravatar.com/avatar/9385d65da0b8577fef3fc472dd8b5e1b?rating=PG&size=50&default=https%3A%2F%2Fd218iqt4mo6adh.cloudfront.net%2Fassets%2Funknown_user_50-521aae04e00222d7dd814e72d7d869d0.png","created_at":"2013-09-11T20:24:06Z","updated_at":"2013-09-11T20:24:23Z","current_login_at":null,"last_login_at":null,"_links":{"self":{"href":"/api/v2/users/21410327","class":"user"},"preferences":{"href":"/api/v2/users/21410327/preferences","class":"user_preference"},"searches":{"href":"/api/v2/users/21410327/searches","class":"search"}}}]}}'
|
54
55
|
http_version:
|
55
|
-
recorded_at:
|
56
|
+
recorded_at: Thu, 12 Dec 2013 19:49:46 GMT
|
57
|
+
- request:
|
58
|
+
method: delete
|
59
|
+
uri: https://devel.desk.com/api/v2/users/16096734
|
60
|
+
body:
|
61
|
+
encoding: US-ASCII
|
62
|
+
string: ''
|
63
|
+
headers:
|
64
|
+
Accept:
|
65
|
+
- application/json
|
66
|
+
User-Agent:
|
67
|
+
- desk.com Ruby Gem v0.1.3
|
68
|
+
response:
|
69
|
+
status:
|
70
|
+
code: 405
|
71
|
+
message:
|
72
|
+
headers:
|
73
|
+
accept-ranges:
|
74
|
+
- bytes
|
75
|
+
cache-control:
|
76
|
+
- no-cache
|
77
|
+
content-type:
|
78
|
+
- application/json; charset=utf-8
|
79
|
+
date:
|
80
|
+
- Thu, 12 Dec 2013 19:49:46 GMT
|
81
|
+
status:
|
82
|
+
- 405 Method Not Allowed
|
83
|
+
vary:
|
84
|
+
- X-AppVersion
|
85
|
+
x-appversion:
|
86
|
+
- '15.6'
|
87
|
+
x-frame-options:
|
88
|
+
- SAMEORIGIN
|
89
|
+
x-rate-limit-limit:
|
90
|
+
- '60'
|
91
|
+
x-rate-limit-remaining:
|
92
|
+
- '56'
|
93
|
+
x-rate-limit-reset:
|
94
|
+
- '14'
|
95
|
+
x-request-id:
|
96
|
+
- 8d04b98369d41b35c6c66ea3c29fd4f7
|
97
|
+
content-length:
|
98
|
+
- '32'
|
99
|
+
connection:
|
100
|
+
- Close
|
101
|
+
body:
|
102
|
+
encoding: UTF-8
|
103
|
+
string: '{"message":"Method Not Allowed"}'
|
104
|
+
http_version:
|
105
|
+
recorded_at: Thu, 12 Dec 2013 19:49:46 GMT
|
56
106
|
recorded_with: VCR 2.5.0
|