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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -2
  3. data/Gemfile +0 -6
  4. data/README.md +38 -31
  5. data/desk_api.gemspec +1 -4
  6. data/lib/desk_api.rb +5 -7
  7. data/lib/desk_api/client.rb +44 -57
  8. data/lib/desk_api/configuration.rb +89 -95
  9. data/lib/desk_api/default.rb +51 -55
  10. data/lib/desk_api/error.rb +42 -44
  11. data/lib/desk_api/rate_limit.rb +20 -22
  12. data/lib/desk_api/resource.rb +142 -65
  13. data/lib/desk_api/version.rb +1 -1
  14. data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_delete/deletes_a_resource.yml +22 -22
  15. data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_get/fetches_resources.yml +26 -26
  16. data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_patch/updates_a_resource.yml +30 -30
  17. data/spec/cassettes/DeskApi_Client/using_Basic_Authentication/_post/creates_a_resource.yml +27 -27
  18. data/spec/cassettes/DeskApi_Client/using_OAuth/_delete/deletes_a_resource.yml +22 -22
  19. data/spec/cassettes/DeskApi_Client/using_OAuth/_get/fetches_resources.yml +31 -286
  20. data/spec/cassettes/DeskApi_Client/using_OAuth/_patch/updates_a_resource.yml +35 -35
  21. data/spec/cassettes/DeskApi_Client/using_OAuth/_post/creates_a_resource.yml +28 -28
  22. data/spec/cassettes/DeskApi_Error/_from_response/can_be_created_from_a_faraday_response.yml +22 -22
  23. data/spec/cassettes/DeskApi_Error/_from_response/uses_the_body_message_if_present.yml +22 -22
  24. data/spec/cassettes/DeskApi_Error/on_validation_error/allows_access_to_error_hash.yml +22 -22
  25. data/spec/cassettes/DeskApi_Resource/_by_url/finds_resources_by_url.yml +37 -286
  26. data/spec/cassettes/DeskApi_Resource/_create/creates_a_new_topic.yml +27 -27
  27. data/spec/cassettes/DeskApi_Resource/_create/throws_an_error_creating_a_user.yml +54 -0
  28. data/spec/cassettes/DeskApi_Resource/_delete/deletes_a_resource.yml +83 -79
  29. data/spec/cassettes/DeskApi_Resource/_delete/throws_an_error_deleting_a_non_deletalbe_resource.yml +78 -28
  30. data/spec/cassettes/DeskApi_Resource/_exec_/can_be_forced_to_reload.yml +34 -285
  31. data/spec/cassettes/DeskApi_Resource/_exec_/loads_the_current_resource.yml +34 -285
  32. data/spec/cassettes/DeskApi_Resource/_find/has_an_alias_by_id.yml +54 -0
  33. data/spec/cassettes/DeskApi_Resource/_find/loads_the_requested_resource.yml +54 -0
  34. data/spec/cassettes/DeskApi_Resource/_get_linked_resource/returns_linked_resources.yml +113 -0
  35. data/spec/cassettes/DeskApi_Resource/_get_linked_resource/returns_nil_if_link_is_nil.yml +62 -0
  36. data/spec/cassettes/DeskApi_Resource/_get_linked_resource/saves_the_linked_resource_instead_of_the_url.yml +113 -0
  37. data/spec/cassettes/DeskApi_Resource/_method_missing/loads_the_resource_to_find_a_suitable_method.yml +34 -285
  38. data/spec/cassettes/DeskApi_Resource/_method_missing/raises_an_error_if_method_does_not_exist.yml +34 -285
  39. data/spec/cassettes/DeskApi_Resource/_page/keeps_the_resource_as_loaded.yml +113 -0
  40. data/spec/cassettes/DeskApi_Resource/_page/returns_the_current_page_and_loads_if_page_not_defined.yml +62 -0
  41. data/spec/cassettes/DeskApi_Resource/_page/sets_the_resource_to_not_loaded.yml +113 -0
  42. data/spec/cassettes/DeskApi_Resource/_search/allows_searching_on_search_enabled_resources.yml +23 -23
  43. data/spec/cassettes/DeskApi_Resource/_search/throws_an_error_if_search_is_not_enabled.yml +52 -0
  44. data/spec/cassettes/DeskApi_Resource/_update/can_update_without_a_hash.yml +178 -58
  45. data/spec/cassettes/DeskApi_Resource/_update/throws_an_error_updating_a_user.yml +86 -28
  46. data/spec/cassettes/DeskApi_Resource/_update/updates_a_topic.yml +61 -57
  47. data/spec/desk_api/client_spec.rb +9 -16
  48. data/spec/desk_api/resource_spec.rb +118 -43
  49. data/spec/spec_helper.rb +1 -1
  50. metadata +24 -102
  51. data/lib/desk_api/action/create.rb +0 -15
  52. data/lib/desk_api/action/delete.rb +0 -9
  53. data/lib/desk_api/action/embeddable.rb +0 -47
  54. data/lib/desk_api/action/field.rb +0 -33
  55. data/lib/desk_api/action/link.rb +0 -29
  56. data/lib/desk_api/action/resource.rb +0 -14
  57. data/lib/desk_api/action/search.rb +0 -15
  58. data/lib/desk_api/action/update.rb +0 -17
  59. data/lib/desk_api/error/method_not_supported.rb +0 -9
  60. data/lib/desk_api/error/not_embeddable.rb +0 -8
  61. data/lib/desk_api/error/not_updateable.rb +0 -10
  62. data/lib/desk_api/error/parse_error.rb +0 -9
  63. data/lib/desk_api/resource/article.rb +0 -10
  64. data/lib/desk_api/resource/article_translation.rb +0 -8
  65. data/lib/desk_api/resource/attachment.rb +0 -8
  66. data/lib/desk_api/resource/case.rb +0 -11
  67. data/lib/desk_api/resource/company.rb +0 -8
  68. data/lib/desk_api/resource/customer.rb +0 -9
  69. data/lib/desk_api/resource/filter.rb +0 -7
  70. data/lib/desk_api/resource/inbound_mailbox.rb +0 -7
  71. data/lib/desk_api/resource/integration_url.rb +0 -9
  72. data/lib/desk_api/resource/job.rb +0 -9
  73. data/lib/desk_api/resource/label.rb +0 -9
  74. data/lib/desk_api/resource/macro.rb +0 -9
  75. data/lib/desk_api/resource/macro_action.rb +0 -7
  76. data/lib/desk_api/resource/note.rb +0 -7
  77. data/lib/desk_api/resource/page.rb +0 -64
  78. data/lib/desk_api/resource/reply.rb +0 -10
  79. data/lib/desk_api/resource/topic.rb +0 -9
  80. data/lib/desk_api/resource/topic_translation.rb +0 -9
  81. data/lib/desk_api/resource/user_preference.rb +0 -7
  82. data/lib/desk_api/resources.json +0 -76
  83. data/spec/cassettes/DeskApi_Client/_delete/deletes_a_resource.yml +0 -48
  84. data/spec/cassettes/DeskApi_Client/_get/fetches_resources.yml +0 -55
  85. data/spec/cassettes/DeskApi_Client/_patch/updates_a_resource.yml +0 -62
  86. data/spec/cassettes/DeskApi_Client/_post/creates_a_resource.yml +0 -58
  87. data/spec/cassettes/DeskApi_Resource_Case/once_closed/can_not_be_updated.yml +0 -124
  88. data/spec/cassettes/DeskApi_Resource_Page/_find/has_an_alias_by_id.yml +0 -54
  89. data/spec/cassettes/DeskApi_Resource_Page/_find/loads_the_requested_resource.yml +0 -54
  90. data/spec/cassettes/DeskApi_Resource_Page/_page/keeps_the_resource_as_loaded.yml +0 -113
  91. data/spec/cassettes/DeskApi_Resource_Page/_page/returns_the_current_page_and_loads_if_page_not_defined.yml +0 -313
  92. data/spec/cassettes/DeskApi_Resource_Page/_page/sets_the_resource_to_not_loaded.yml +0 -113
  93. data/spec/desk_api/resource/case_spec.rb +0 -28
  94. 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.0
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
- Accept-Ranges:
21
+ accept-ranges:
22
22
  - bytes
23
- Cache-Control:
23
+ cache-control:
24
24
  - max-age=0, private, must-revalidate
25
- Content-Type:
25
+ content-type:
26
26
  - application/json; charset=utf-8
27
- Date:
28
- - Mon, 19 Aug 2013 23:51:34 GMT
29
- ETag:
30
- - '"bab2dddbec638f47dbb9481cc01e4659"'
31
- Location:
32
- - https://devel.desk.com/api/v2/topics/558244
33
- Status:
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
- Vary:
35
+ vary:
36
36
  - X-AppVersion
37
- X-AppVersion:
38
- - '7.9'
39
- X-Frame-Options:
37
+ x-appversion:
38
+ - '15.6'
39
+ x-frame-options:
40
40
  - SAMEORIGIN
41
- X-Rate-Limit-Limit:
41
+ x-rate-limit-limit:
42
42
  - '60'
43
- X-Rate-Limit-Remaining:
44
- - '42'
45
- X-Rate-Limit-Reset:
46
- - '26'
47
- X-Request-Id:
48
- - 0b7a3ccc86a35ef7a27b131fd03aab84
49
- Content-Length:
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
- Connection:
52
- - keep-alive
51
+ connection:
52
+ - Close
53
53
  body:
54
54
  encoding: UTF-8
55
- string: '{"name":"My 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:51:34Z","_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"}}}'
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: Mon, 19 Aug 2013 23:51:34 GMT
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.0
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
- Accept-Ranges:
19
+ accept-ranges:
20
20
  - bytes
21
- Cache-Control:
21
+ cache-control:
22
22
  - must-revalidate, private, max-age=0
23
- Content-Type:
23
+ content-type:
24
24
  - application/json; charset=utf-8
25
- Date:
26
- - Mon, 19 Aug 2013 23:51:33 GMT
27
- ETag:
28
- - '"49308def7f597974a093f90ab1e0ce2b"'
29
- Status:
25
+ date:
26
+ - Thu, 12 Dec 2013 19:50:21 GMT
27
+ etag:
28
+ - '"bbeb448ce8982e712b1bca186a7941a1"'
29
+ status:
30
30
  - 200 OK
31
- Vary:
31
+ vary:
32
32
  - X-AppVersion
33
- X-AppVersion:
34
- - '7.9'
35
- X-Frame-Options:
33
+ x-appversion:
34
+ - '15.6'
35
+ x-frame-options:
36
36
  - SAMEORIGIN
37
- X-Rate-Limit-Limit:
37
+ x-rate-limit-limit:
38
38
  - '60'
39
- X-Rate-Limit-Remaining:
40
- - '55'
41
- X-Rate-Limit-Reset:
42
- - '27'
43
- X-Request-Id:
44
- - fd7bc5a9e8e3aaa7649deed07ebabae5
45
- Content-Length:
46
- - '1529'
47
- Connection:
48
- - keep-alive
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":3,"_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-08-16T17:15:34Z","_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-15T21:26:17Z","_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-15T21:25:38Z","_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"}}}]}}'
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: Mon, 19 Aug 2013 23:51:33 GMT
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.0
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
- Accept-Ranges:
79
+ accept-ranges:
76
80
  - bytes
77
- Cache-Control:
81
+ cache-control:
78
82
  - max-age=0, private, must-revalidate
79
- Content-Type:
83
+ content-type:
80
84
  - application/json; charset=utf-8
81
- Date:
82
- - Mon, 19 Aug 2013 23:51:33 GMT
83
- ETag:
84
- - '"501b810ab743b2e5d279f981c9aafab8"'
85
- Location:
86
- - https://devel.desk.com/api/v2/articles/1268788
87
- Status:
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
- Vary:
93
+ vary:
90
94
  - X-AppVersion
91
- X-AppVersion:
92
- - '7.9'
93
- X-Frame-Options:
95
+ x-appversion:
96
+ - '15.6'
97
+ x-frame-options:
94
98
  - SAMEORIGIN
95
- X-Rate-Limit-Limit:
99
+ x-rate-limit-limit:
96
100
  - '60'
97
- X-Rate-Limit-Remaining:
98
- - '54'
99
- X-Rate-Limit-Reset:
100
- - '27'
101
- X-Request-Id:
102
- - dd73825cc9fa76c4821a0e352acb8c49
103
- Content-Length:
104
- - '971'
105
- Connection:
106
- - keep-alive
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":2,"quickcode":null,"in_support_center":null,"internal_notes":null,"publish_at":null,"created_at":"2013-08-19T23:51:33Z","updated_at":"2013-08-19T23:51:33Z","_links":{"self":{"href":"/api/v2/articles/1268788","class":"article"},"topic":{"href":"/api/v2/topics/498301","class":"topic"},"translations":{"href":"/api/v2/articles/1268788/translations","class":"article_translation"}}}'
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: Mon, 19 Aug 2013 23:51:33 GMT
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/1268788
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.0
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
- Accept-Ranges:
138
+ accept-ranges:
135
139
  - bytes
136
- Cache-Control:
140
+ cache-control:
137
141
  - no-cache
138
- Date:
139
- - Mon, 19 Aug 2013 23:51:33 GMT
140
- Status:
142
+ date:
143
+ - Thu, 12 Dec 2013 19:50:22 GMT
144
+ status:
141
145
  - 204 No Content
142
- Vary:
146
+ vary:
143
147
  - X-AppVersion
144
- X-AppVersion:
145
- - '7.9'
146
- X-Frame-Options:
148
+ x-appversion:
149
+ - '15.6'
150
+ x-frame-options:
147
151
  - SAMEORIGIN
148
- X-Rate-Limit-Limit:
152
+ x-rate-limit-limit:
149
153
  - '60'
150
- X-Rate-Limit-Remaining:
151
- - '53'
152
- X-Rate-Limit-Reset:
153
- - '27'
154
- X-Request-Id:
155
- - 974610303e0db2e99e6775aa4bba2f29
156
- Connection:
157
- - keep-alive
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: UTF-8
163
+ encoding: US-ASCII
160
164
  string: ''
161
165
  http_version:
162
- recorded_at: Mon, 19 Aug 2013 23:51:33 GMT
166
+ recorded_at: Thu, 12 Dec 2013 19:50:22 GMT
163
167
  recorded_with: VCR 2.5.0
@@ -10,47 +10,97 @@ http_interactions:
10
10
  Accept:
11
11
  - application/json
12
12
  User-Agent:
13
- - desk.com Ruby Gem v0.1.0
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
- Accept-Ranges:
19
+ accept-ranges:
20
20
  - bytes
21
- Cache-Control:
21
+ cache-control:
22
22
  - no-cache, private
23
- Content-Type:
23
+ content-type:
24
24
  - application/json; charset=utf-8
25
- Date:
26
- - Mon, 19 Aug 2013 23:51:33 GMT
27
- ETag:
28
- - '"1376931810"'
29
- Status:
25
+ date:
26
+ - Thu, 12 Dec 2013 19:49:46 GMT
27
+ etag:
28
+ - '"1386874620"'
29
+ status:
30
30
  - 200 OK
31
- Vary:
31
+ vary:
32
32
  - X-AppVersion
33
- X-AppVersion:
34
- - '7.9'
35
- X-Frame-Options:
33
+ x-appversion:
34
+ - '15.6'
35
+ x-frame-options:
36
36
  - SAMEORIGIN
37
- X-Rate-Limit-Limit:
37
+ x-rate-limit-limit:
38
38
  - '60'
39
- X-Rate-Limit-Remaining:
40
- - '52'
41
- X-Rate-Limit-Reset:
42
- - '27'
43
- X-Request-Id:
44
- - 1f999a0dc997cbfa1b0e24bf81c8cb7f
45
- Content-Length:
46
- - '1868'
47
- Connection:
48
- - keep-alive
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":5,"_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","_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: Mon, 19 Aug 2013 23:51:33 GMT
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