desk_api 0.1.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 (100) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.rspec +1 -0
  4. data/.travis.yml +5 -0
  5. data/.yardopts +3 -0
  6. data/Gemfile +15 -0
  7. data/Guardfile +5 -0
  8. data/LICENSE +7 -0
  9. data/README.md +185 -0
  10. data/Rakefile +15 -0
  11. data/config.rb +7 -0
  12. data/desk_api.gemspec +36 -0
  13. data/lib/desk/action/create.rb +15 -0
  14. data/lib/desk/action/delete.rb +9 -0
  15. data/lib/desk/action/embedded.rb +12 -0
  16. data/lib/desk/action/field.rb +33 -0
  17. data/lib/desk/action/link.rb +29 -0
  18. data/lib/desk/action/resource.rb +14 -0
  19. data/lib/desk/action/search.rb +15 -0
  20. data/lib/desk/action/update.rb +12 -0
  21. data/lib/desk/client.rb +67 -0
  22. data/lib/desk/configuration.rb +132 -0
  23. data/lib/desk/default.rb +67 -0
  24. data/lib/desk/error/bad_gateway.rb +10 -0
  25. data/lib/desk/error/bad_request.rb +10 -0
  26. data/lib/desk/error/client_error.rb +9 -0
  27. data/lib/desk/error/configuration_error.rb +8 -0
  28. data/lib/desk/error/conflict.rb +10 -0
  29. data/lib/desk/error/forbidden.rb +10 -0
  30. data/lib/desk/error/gateway_timeout.rb +10 -0
  31. data/lib/desk/error/internal_server_error.rb +10 -0
  32. data/lib/desk/error/method_not_allowed.rb +10 -0
  33. data/lib/desk/error/method_not_supported.rb +9 -0
  34. data/lib/desk/error/not_acceptable.rb +10 -0
  35. data/lib/desk/error/not_found.rb +10 -0
  36. data/lib/desk/error/parse_error.rb +9 -0
  37. data/lib/desk/error/parser_error.rb +9 -0
  38. data/lib/desk/error/server_error.rb +9 -0
  39. data/lib/desk/error/service_unavailable.rb +10 -0
  40. data/lib/desk/error/too_many_requests.rb +10 -0
  41. data/lib/desk/error/unauthorized.rb +10 -0
  42. data/lib/desk/error/unprocessable_entity.rb +10 -0
  43. data/lib/desk/error/unsupported_media_type.rb +10 -0
  44. data/lib/desk/error.rb +61 -0
  45. data/lib/desk/rate_limit.rb +26 -0
  46. data/lib/desk/request/retry.rb +51 -0
  47. data/lib/desk/resource/article.rb +10 -0
  48. data/lib/desk/resource/article_translation.rb +8 -0
  49. data/lib/desk/resource/attachment.rb +8 -0
  50. data/lib/desk/resource/case.rb +9 -0
  51. data/lib/desk/resource/company.rb +8 -0
  52. data/lib/desk/resource/customer.rb +9 -0
  53. data/lib/desk/resource/integration_url.rb +9 -0
  54. data/lib/desk/resource/job.rb +7 -0
  55. data/lib/desk/resource/label.rb +9 -0
  56. data/lib/desk/resource/macro.rb +9 -0
  57. data/lib/desk/resource/macro_action.rb +7 -0
  58. data/lib/desk/resource/note.rb +7 -0
  59. data/lib/desk/resource/page.rb +81 -0
  60. data/lib/desk/resource/reply.rb +8 -0
  61. data/lib/desk/resource/topic.rb +9 -0
  62. data/lib/desk/resource/topic_translation.rb +9 -0
  63. data/lib/desk/resource/user_preference.rb +7 -0
  64. data/lib/desk/resource.rb +53 -0
  65. data/lib/desk/resources.json +76 -0
  66. data/lib/desk/response/raise_error.rb +34 -0
  67. data/lib/desk/version.rb +3 -0
  68. data/lib/desk.rb +35 -0
  69. data/spec/cassettes/Desk_Client/_delete/deletes_a_resource.yml +48 -0
  70. data/spec/cassettes/Desk_Client/_get/fetches_resources.yml +55 -0
  71. data/spec/cassettes/Desk_Client/_patch/updates_a_resource.yml +62 -0
  72. data/spec/cassettes/Desk_Client/_post/creates_a_resource.yml +58 -0
  73. data/spec/cassettes/Desk_Error/_from_response/can_be_created_from_a_faraday_response.yml +54 -0
  74. data/spec/cassettes/Desk_Error/_from_response/uses_the_body_message_if_present.yml +54 -0
  75. data/spec/cassettes/Desk_Resource/_by_url/finds_resources_by_url.yml +313 -0
  76. data/spec/cassettes/Desk_Resource/_create/creates_a_new_topic.yml +58 -0
  77. data/spec/cassettes/Desk_Resource/_delete/deletes_a_resource.yml +164 -0
  78. data/spec/cassettes/Desk_Resource/_delete/throws_an_error_deleting_a_non_deletalbe_resource.yml +56 -0
  79. data/spec/cassettes/Desk_Resource/_exec_/can_be_forced_to_reload.yml +313 -0
  80. data/spec/cassettes/Desk_Resource/_exec_/loads_the_current_resource.yml +313 -0
  81. data/spec/cassettes/Desk_Resource/_method_missing/loads_the_resource_to_find_a_suitable_method.yml +313 -0
  82. data/spec/cassettes/Desk_Resource/_method_missing/raises_an_error_if_method_does_not_exist.yml +313 -0
  83. data/spec/cassettes/Desk_Resource/_search/allows_searching_on_search_enabled_resources.yml +54 -0
  84. data/spec/cassettes/Desk_Resource/_update/throws_an_error_updating_a_user.yml +56 -0
  85. data/spec/cassettes/Desk_Resource/_update/updates_a_topic.yml +118 -0
  86. data/spec/cassettes/Desk_Resource_Page/_by_id/loads_the_requested_resource.yml +54 -0
  87. data/spec/cassettes/Desk_Resource_Page/_page/keeps_the_resource_as_loaded.yml +113 -0
  88. data/spec/cassettes/Desk_Resource_Page/_page/returns_the_current_page_and_loads_if_page_not_defined.yml +313 -0
  89. data/spec/cassettes/Desk_Resource_Page/_page/sets_the_resource_to_not_loaded.yml +113 -0
  90. data/spec/desk/client_spec.rb +133 -0
  91. data/spec/desk/configuration_spec.rb +183 -0
  92. data/spec/desk/default_spec.rb +69 -0
  93. data/spec/desk/error_spec.rb +23 -0
  94. data/spec/desk/rate_limit_spec.rb +42 -0
  95. data/spec/desk/request/retry_spec.rb +46 -0
  96. data/spec/desk/resource_spec.rb +119 -0
  97. data/spec/desk/resources/page_spec.rb +64 -0
  98. data/spec/desk_spec.rb +43 -0
  99. data/spec/spec_helper.rb +39 -0
  100. metadata +347 -0
@@ -0,0 +1,313 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devel.desk.com/api/v2/articles/1213277
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - desk.com Ruby Gem v0.1.0
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ Accept-Ranges:
20
+ - bytes
21
+ Cache-Control:
22
+ - must-revalidate, private, max-age=0
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Date:
26
+ - Thu, 15 Aug 2013 21:20:32 GMT
27
+ ETag:
28
+ - '"13b3639ad423f0298f52f6782b69c3d1"'
29
+ Status:
30
+ - 200 OK
31
+ Vary:
32
+ - X-AppVersion
33
+ X-AppVersion:
34
+ - '7.9'
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ X-Rate-Limit-Limit:
38
+ - '60'
39
+ X-Rate-Limit-Remaining:
40
+ - '48'
41
+ X-Rate-Limit-Reset:
42
+ - '28'
43
+ X-Request-Id:
44
+ - ae8df696c5ba322cc0780cf21f677630
45
+ Content-Length:
46
+ - '20825'
47
+ Connection:
48
+ - keep-alive
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"subject":"asdf","body":"<div>\r\n<div class=\"lc\">\r\n<p><strong>Lorem
52
+ Ipsum</strong>&nbsp;is simply dummy text of the printing and typesetting industry.
53
+ Lorem Ipsum has been the industry&#39;s standard dummy text ever since the
54
+ 1500s, when an unknown printer took a galley of type and scrambled it to make
55
+ a type specimen book. It has survived not only five centuries, but also the
56
+ leap into electronic typesetting, remaining essentially unchanged. It was
57
+ popularised in the 1960s with the release of Letraset sheets containing Lorem
58
+ Ipsum passages, and more recently with desktop publishing software like Aldus
59
+ PageMaker including versions of Lorem Ipsum.</p>\r\n</div>\r\n\r\n<div class=\"rc\">\r\n<h2
60
+ class=\"why\">&nbsp;</h2>\r\n\r\n<p>It is a long established fact that a reader
61
+ will be distracted by the readable content of a page when looking at its layout.
62
+ The point of using Lorem Ipsum is that it has a more-or-less normal distribution
63
+ of letters, as opposed to using &#39;Content here, content here&#39;, making
64
+ it look like readable English. Many desktop publishing packages and web page
65
+ editors now use Lorem Ipsum as their default model text, and a search for
66
+ &#39;lorem ipsum&#39; will uncover many web sites still in their infancy.
67
+ Various versions have evolved over the years, sometimes by accident, sometimes
68
+ on purpose (injected humour and the like).</p>\r\n</div>\r\n</div>\r\n<span
69
+ style=\"color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-size:
70
+ 11px; line-height: normal; text-align: center;\">&nbsp;</span>\r\n\r\n<div>\r\n<div
71
+ class=\"lc\">\r\n<h2 class=\"where\">&nbsp;</h2>\r\n\r\n<p>Contrary to popular
72
+ belief, Lorem Ipsum is not simply random text. It has roots in a piece of
73
+ classical Latin literature from 45 BC, making it over 2000 years old. Richard
74
+ McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
75
+ up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage,
76
+ and going through the cites of the word in classical literature, discovered
77
+ the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33
78
+ of &quot;de Finibus Bonorum et Malorum&quot; (The Extremes of Good and Evil)
79
+ by Cicero, written in 45 BC. This book is a treatise on the theory of ethics,
80
+ very popular during the Renaissance. The first line of Lorem Ipsum, &quot;Lorem
81
+ ipsum dolor sit amet..&quot;, comes from a line in section 1.10.32.</p>\r\n\r\n<p>The
82
+ standard chunk of Lorem Ipsum used since the 1500s is reproduced below for
83
+ those interested. Sections 1.10.32 and 1.10.33 from &quot;de Finibus Bonorum
84
+ et Malorum&quot; by Cicero are also reproduced in their exact original form,
85
+ accompanied by English versions from the 1914 translation by H. Rackham.</p>\r\n</div>\r\n\r\n<div
86
+ class=\"rc\">\r\n<h2 class=\"getsome\">&nbsp;</h2>\r\n\r\n<p>There are many
87
+ variations of passages of Lorem Ipsum available, but the majority have suffered
88
+ alteration in some form, by injected humour, or randomised words which don&#39;t
89
+ look even slightly believable. If you are going to use a passage of Lorem
90
+ Ipsum, you need to be sure there isn&#39;t anything embarrassing hidden in
91
+ the middle of text. All the Lorem Ipsum generators on the Internet tend to
92
+ repeat predefined chunks as necessary, making this the first true generator
93
+ on the Internet. It uses a dictionary of over 200 Latin words, combined with
94
+ a handful of model sentence structures, to generate Lorem Ipsum which looks
95
+ reasonable. The generated Lorem Ipsum is therefore always free from repetition,
96
+ injected humour, or non-characteristic words etc.</p>\r\n</div>\r\n</div>\r\n","body_email":"Lorem
97
+ Ipsum is simply dummy text of the printing and typesetting industry. Lorem
98
+ Ipsum has been the industry''s standard dummy text ever since the 1500s, when
99
+ an unknown printer took a galley of type and scrambled it to make a type specimen
100
+ book. It has survived not only five centuries, but also the leap into electronic
101
+ typesetting, remaining essentially unchanged. It was popularised in the 1960s
102
+ with the release of Letraset sheets containing Lorem Ipsum passages, and more
103
+ recently with desktop publishing software like Aldus PageMaker including versions
104
+ of Lorem Ipsum. \r\n \r\n\r\n \r\n \r\n\r\n It is a long established fact
105
+ that a reader will be distracted by the readable content of a page when looking
106
+ at its layout. The point of using Lorem Ipsum is that it has a more-or-less
107
+ normal distribution of letters, as opposed to using ''Content here, content
108
+ here'', making it look like readable English. Many desktop publishing packages
109
+ and web page editors now use Lorem Ipsum as their default model text, and
110
+ a search for ''lorem ipsum'' will uncover many web sites still in their infancy.
111
+ Various versions have evolved over the years, sometimes by accident, sometimes
112
+ on purpose (injected humour and the like). \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
113
+ Contrary to popular belief, Lorem Ipsum is not simply random text. It has
114
+ roots in a piece of classical Latin literature from 45 BC, making it over
115
+ 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College
116
+ in Virginia, looked up one of the more obscure Latin words, consectetur, from
117
+ a Lorem Ipsum passage, and going through the cites of the word in classical
118
+ literature, discovered the undoubtable source. Lorem Ipsum comes from sections
119
+ 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of
120
+ Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the
121
+ theory of ethics, very popular during the Renaissance. The first line of Lorem
122
+ Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n\nThe
123
+ standard chunk of Lorem Ipsum used since the 1500s is reproduced below for
124
+ those interested. Sections 1.10.32 and 1.10.33 from \"de Finibus Bonorum et
125
+ Malorum\" by Cicero are also reproduced in their exact original form, accompanied
126
+ by English versions from the 1914 translation by H. Rackham. \r\n \r\n\r\n
127
+ \r\n \r\n\r\n There are many variations of passages of Lorem Ipsum available,
128
+ but the majority have suffered alteration in some form, by injected humour,
129
+ or randomised words which don''t look even slightly believable. If you are
130
+ going to use a passage of Lorem Ipsum, you need to be sure there isn''t anything
131
+ embarrassing hidden in the middle of text. All the Lorem Ipsum generators
132
+ on the Internet tend to repeat predefined chunks as necessary, making this
133
+ the first true generator on the Internet. It uses a dictionary of over 200
134
+ Latin words, combined with a handful of model sentence structures, to generate
135
+ Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore
136
+ always free from repetition, injected humour, or non-characteristic words
137
+ etc.","body_email_auto":true,"body_chat":"Lorem Ipsum is simply dummy text
138
+ of the printing and typesetting industry. Lorem Ipsum has been the industry''s
139
+ standard dummy text ever since the 1500s, when an unknown printer took a galley
140
+ of type and scrambled it to make a type specimen book. It h... http://devel.desk.com/customer/portal/articles/1213277-asdf","body_chat_auto":true,"body_web_callback":"<div>\r\n<div
141
+ class=\"lc\">\r\n<p><strong>Lorem Ipsum</strong>&nbsp;is simply dummy text
142
+ of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s
143
+ standard dummy text ever since the 1500s, when an unknown printer took a galley
144
+ of type and scrambled it to make a type specimen book. It has survived not
145
+ only five centuries, but also the leap into electronic typesetting, remaining
146
+ essentially unchanged. It was popularised in the 1960s with the release of
147
+ Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
148
+ publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>\r\n</div>\r\n\r\n<div
149
+ class=\"rc\">\r\n<h2 class=\"why\">&nbsp;</h2>\r\n\r\n<p>It is a long established
150
+ fact that a reader will be distracted by the readable content of a page when
151
+ looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less
152
+ normal distribution of letters, as opposed to using &#39;Content here, content
153
+ here&#39;, making it look like readable English. Many desktop publishing packages
154
+ and web page editors now use Lorem Ipsum as their default model text, and
155
+ a search for &#39;lorem ipsum&#39; will uncover many web sites still in their
156
+ infancy. Various versions have evolved over the years, sometimes by accident,
157
+ sometimes on purpose (injected humour and the like).</p>\r\n</div>\r\n</div>\r\n<span
158
+ style=\"color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-size:
159
+ 11px; line-height: normal; text-align: center;\">&nbsp;</span>\r\n\r\n<div>\r\n<div
160
+ class=\"lc\">\r\n<h2 class=\"where\">&nbsp;</h2>\r\n\r\n<p>Contrary to popular
161
+ belief, Lorem Ipsum is not simply random text. It has roots in a piece of
162
+ classical Latin literature from 45 BC, making it over 2000 years old. Richard
163
+ McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
164
+ up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage,
165
+ and going through the cites of the word in classical literature, discovered
166
+ the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33
167
+ of &quot;de Finibus Bonorum et Malorum&quot; (The Extremes of Good and Evil)
168
+ by Cicero, written in 45 BC. This book is a treatise on the theory of ethics,
169
+ very popular during the Renaissance. The first line of Lorem Ipsum, &quot;Lorem
170
+ ipsum dolor sit amet..&quot;, comes from a line in section 1.10.32.</p>\r\n\r\n<p>The
171
+ standard chunk of Lorem Ipsum used since the 1500s is reproduced below for
172
+ those interested. Sections 1.10.32 and 1.10.33 from &quot;de Finibus Bonorum
173
+ et Malorum&quot; by Cicero are also reproduced in their exact original form,
174
+ accompanied by English versions from the 1914 translation by H. Rackham.</p>\r\n</div>\r\n\r\n<div
175
+ class=\"rc\">\r\n<h2 class=\"getsome\">&nbsp;</h2>\r\n\r\n<p>There are many
176
+ variations of passages of Lorem Ipsum available, but the majority have suffered
177
+ alteration in some form, by injected humour, or randomised words which don&#39;t
178
+ look even slightly believable. If you are going to use a passage of Lorem
179
+ Ipsum, you need to be sure there isn&#39;t anything embarrassing hidden in
180
+ the middle of text. All the Lorem Ipsum generators on the Internet tend to
181
+ repeat predefined chunks as necessary, making this the first true generator
182
+ on the Internet. It uses a dictionary of over 200 Latin words, combined with
183
+ a handful of model sentence structures, to generate Lorem Ipsum which looks
184
+ reasonable. The generated Lorem Ipsum is therefore always free from repetition,
185
+ injected humour, or non-characteristic words etc.</p>\r\n</div>\r\n</div>\r\n","body_web_callback_auto":true,"body_twitter":"Lorem
186
+ Ipsum is simply dummy text of the printing and typesetting industry. Lorem
187
+ Ipsum has been the in... http://devel.desk.com/customer/portal/articles/1213277-asdf","body_twitter_auto":true,"body_qna":"Lorem
188
+ Ipsum is simply dummy text of the printing and typesetting industry. Lorem
189
+ Ipsum has been the industry''s standard dummy text ever since the 1500s, when
190
+ an unknown printer took a galley of type and scrambled it to make a type specimen
191
+ book. It has survived not only five centuries, but also the leap into electronic
192
+ typesetting, remaining essentially unchanged. It was popularised in the 1960s
193
+ with the release of Letraset sheets containing Lorem Ipsum passages, and more
194
+ recently with desktop publishing software like Aldus PageMaker including versions
195
+ of Lorem Ipsum. \r\n \r\n\r\n \r\n \r\n\r\n It is a long established fact
196
+ that a reader will be distracted by the readable content of a page when looking
197
+ at its layout. The point of using Lorem Ipsum is that it has a more-or-less
198
+ normal distribution of letters, as opposed to using ''Content here, content
199
+ here'', making it look like readable English. Many desktop publishing packages
200
+ and web page editors now use Lorem Ipsum as their default model text, and
201
+ a search for ''lorem ipsum'' will uncover many web sites still in their infancy.
202
+ Various versions have evolved over the years, sometimes by accident, sometimes
203
+ on purpose (injected humour and the like). \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
204
+ Contrary to popular belief, Lorem Ipsum is not simply random text. It has
205
+ roots in a piece of classical Latin literature from 45 BC, making it over
206
+ 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College
207
+ in Virginia, looked up one of the more obscure Latin words, consectetur, from
208
+ a Lorem Ipsum passage, and going through the cites of the word in classical
209
+ literature, discovered the undoubtable source. Lorem Ipsum comes from sections
210
+ 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of
211
+ Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the
212
+ theory of ethics, very popular during the Renaissance. The first line of Lorem
213
+ Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n\nThe
214
+ standard chunk of Lorem Ipsum used since the 1500s is reproduced below for
215
+ those interested. Sections 1.10.32 and 1.10.33 from \"de Finibus Bonorum et
216
+ Malorum\" by Cicero are also reproduced in their exact original form, accompanied
217
+ by English versions from the 1914 translation by H. Rackham. \r\n \r\n\r\n
218
+ \r\n \r\n\r\n There are many variations of passages of Lorem Ipsum available,
219
+ but the majority have suffered alteration in some form, by injected humour,
220
+ or randomised words which don''t look even slightly believable. If you are
221
+ going to use a passage of Lorem Ipsum, you need to be sure there isn''t anything
222
+ embarrassing hidden in the middle of text. All the Lorem Ipsum generators
223
+ on the Internet tend to repeat predefined chunks as necessary, making this
224
+ the first true generator on the Internet. It uses a dictionary of over 200
225
+ Latin words, combined with a handful of model sentence structures, to generate
226
+ Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore
227
+ always free from repetition, injected humour, or non-characteristic words
228
+ etc.","body_qna_auto":true,"body_phone":"Lorem Ipsum is simply dummy text
229
+ of the printing and typesetting industry. Lorem Ipsum has been the industry''s
230
+ standard dummy text ever since the 1500s, when an unknown printer took a galley
231
+ of type and scrambled it to make a type specimen book. It has survived not
232
+ only five centuries, but also the leap into electronic typesetting, remaining
233
+ essentially unchanged. It was popularised in the 1960s with the release of
234
+ Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
235
+ publishing software like Aldus PageMaker including versions of Lorem Ipsum.
236
+ \r\n \r\n\r\n \r\n \r\n\r\n It is a long established fact that a reader
237
+ will be distracted by the readable content of a page when looking at its layout.
238
+ The point of using Lorem Ipsum is that it has a more-or-less normal distribution
239
+ of letters, as opposed to using ''Content here, content here'', making it
240
+ look like readable English. Many desktop publishing packages and web page
241
+ editors now use Lorem Ipsum as their default model text, and a search for
242
+ ''lorem ipsum'' will uncover many web sites still in their infancy. Various
243
+ versions have evolved over the years, sometimes by accident, sometimes on
244
+ purpose (injected humour and the like). \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
245
+ Contrary to popular belief, Lorem Ipsum is not simply random text. It has
246
+ roots in a piece of classical Latin literature from 45 BC, making it over
247
+ 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College
248
+ in Virginia, looked up one of the more obscure Latin words, consectetur, from
249
+ a Lorem Ipsum passage, and going through the cites of the word in classical
250
+ literature, discovered the undoubtable source. Lorem Ipsum comes from sections
251
+ 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of
252
+ Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the
253
+ theory of ethics, very popular during the Renaissance. The first line of Lorem
254
+ Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n\nThe
255
+ standard chunk of Lorem Ipsum used since the 1500s is reproduced below for
256
+ those interested. Sections 1.10.32 and 1.10.33 from \"de Finibus Bonorum et
257
+ Malorum\" by Cicero are also reproduced in their exact original form, accompanied
258
+ by English versions from the 1914 translation by H. Rackham. \r\n \r\n\r\n
259
+ \r\n \r\n\r\n There are many variations of passages of Lorem Ipsum available,
260
+ but the majority have suffered alteration in some form, by injected humour,
261
+ or randomised words which don''t look even slightly believable. If you are
262
+ going to use a passage of Lorem Ipsum, you need to be sure there isn''t anything
263
+ embarrassing hidden in the middle of text. All the Lorem Ipsum generators
264
+ on the Internet tend to repeat predefined chunks as necessary, making this
265
+ the first true generator on the Internet. It uses a dictionary of over 200
266
+ Latin words, combined with a handful of model sentence structures, to generate
267
+ Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore
268
+ always free from repetition, injected humour, or non-characteristic words
269
+ etc.","body_phone_auto":true,"body_facebook":"Lorem Ipsum is simply dummy
270
+ text of the printing and typesetting industry. Lorem Ipsum has been the industry''s
271
+ standard dummy text ever since the 1500s, when an unknown printer took a galley
272
+ of type and scrambled it to make a type specimen book. It has survived not
273
+ only five centuries, but also the leap into electronic typesetting, remaining
274
+ essentially unchanged. It was popularised in the 1960s with the release of
275
+ Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
276
+ publishing software like Aldus PageMaker including versions of Lorem Ipsum.
277
+ \r\n \r\n\r\n \r\n \r\n\r\n It is a long established fact that a reader
278
+ will be distracted by the readable content of a page when looking at its layout.
279
+ The point of using Lorem Ipsum is that it has a more-or-less normal distribution
280
+ of letters, as opposed to using ''Content here, content here'', making it
281
+ look like readable English. Many desktop publishing packages and web page
282
+ editors now use Lorem Ipsum as their default model text, and a search for
283
+ ''lorem ipsum'' will uncover many web sites still in their infancy. Various
284
+ versions have evolved over the years, sometimes by accident, sometimes on
285
+ purpose (injected humour and the like). \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
286
+ Contrary to popular belief, Lorem Ipsum is not simply random text. It has
287
+ roots in a piece of classical Latin literature from 45 BC, making it over
288
+ 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College
289
+ in Virginia, looked up one of the more obscure Latin words, consectetur, from
290
+ a Lorem Ipsum passage, and going through the cites of the word in classical
291
+ literature, discovered the undoubtable source. Lorem Ipsum comes from sections
292
+ 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of
293
+ Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the
294
+ theory of ethics, very popular during the Renaissance. The first line of Lorem
295
+ Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n\nThe
296
+ standard chunk of Lorem Ipsum used since the 1500s is reproduced below for
297
+ those interested. Sections 1.10.32 and 1.10.33 from \"de Finibus Bonorum et
298
+ Malorum\" by Cicero are also reproduced in their exact original form, accompanied
299
+ by English versions from the 1914 translation by H. Rackham. \r\n \r\n\r\n
300
+ \r\n \r\n\r\n There are many variations of passages of Lorem Ipsum available,
301
+ but the majority have suffered alteration in some form, by injected humour,
302
+ or randomised words which don''t look even slightly believable. If you are
303
+ going to use a passage of Lorem Ipsum, you need to be sure there isn''t anything
304
+ embarrassing hidden in the middle of text. All the Lorem Ipsum generators
305
+ on the Internet tend to repeat predefined chunks as necessary, making this
306
+ the first true generator on the Internet. It uses a dictionary of over 200
307
+ Latin words, combined with a handful of model sentence structures, to generate
308
+ Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore
309
+ always free from repetition, injected humour, or non-characteristic words
310
+ etc.","body_facebook_auto":true,"keywords":"","position":1,"quickcode":null,"in_support_center":true,"internal_notes":"","publish_at":"2013-08-05T01:13:36Z","created_at":"2013-07-05T15:45:25Z","updated_at":"2013-08-15T21:20:32Z","_links":{"self":{"href":"/api/v2/articles/1213277","class":"article"},"topic":{"href":"/api/v2/topics/498301","class":"topic"},"translations":{"href":"/api/v2/articles/1213277/translations","class":"article_translation"}}}'
311
+ http_version:
312
+ recorded_at: Thu, 15 Aug 2013 21:20:32 GMT
313
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devel.desk.com/api/v2/topics
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"My new topic"}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - desk.com Ruby Gem v0.1.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 201
19
+ message:
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Cache-Control:
24
+ - max-age=0, private, must-revalidate
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Date:
28
+ - Thu, 15 Aug 2013 21:20:32 GMT
29
+ ETag:
30
+ - '"c0bf83a9a262a8d228d6fe2561304ffa"'
31
+ Location:
32
+ - https://devel.desk.com/api/v2/topics/556908
33
+ Status:
34
+ - 201 Created
35
+ Vary:
36
+ - X-AppVersion
37
+ X-AppVersion:
38
+ - '7.9'
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ X-Rate-Limit-Limit:
42
+ - '60'
43
+ X-Rate-Limit-Remaining:
44
+ - '49'
45
+ X-Rate-Limit-Reset:
46
+ - '28'
47
+ X-Request-Id:
48
+ - 66ac5d2b40d3acf6a840deea8cfe1da0
49
+ Content-Length:
50
+ - '402'
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"name":"My new topic","description":null,"position":5,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-15T21:20:32Z","updated_at":"2013-08-15T21:20:32Z","_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"}}}'
56
+ http_version:
57
+ recorded_at: Thu, 15 Aug 2013 21:20:32 GMT
58
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,164 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devel.desk.com/api/v2/topics
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - desk.com Ruby Gem v0.1.0
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ Accept-Ranges:
20
+ - bytes
21
+ Cache-Control:
22
+ - must-revalidate, private, max-age=0
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Date:
26
+ - Thu, 15 Aug 2013 21:20:32 GMT
27
+ ETag:
28
+ - '"a1ddc5668e24e3aa51b6105fea14b800"'
29
+ Status:
30
+ - 200 OK
31
+ Vary:
32
+ - X-AppVersion
33
+ X-AppVersion:
34
+ - '7.9'
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ X-Rate-Limit-Limit:
38
+ - '60'
39
+ X-Rate-Limit-Remaining:
40
+ - '53'
41
+ X-Rate-Limit-Reset:
42
+ - '28'
43
+ X-Request-Id:
44
+ - 36272152bf18814c7de5b83507045674
45
+ Content-Length:
46
+ - '1917'
47
+ Connection:
48
+ - keep-alive
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"total_entries":4,"_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":"Some new description","position":1,"allow_questions":true,"in_support_center":true,"created_at":"2013-04-22T23:46:42Z","updated_at":"2013-08-14T20:01:55Z","_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":"My
53
+ new topic","description":null,"position":2,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-14T19:34:34Z","updated_at":"2013-08-14T19:34:34Z","_links":{"self":{"href":"/api/v2/topics/556401","class":"topic"},"articles":{"href":"/api/v2/topics/556401/articles","class":"article"},"translations":{"href":"/api/v2/topics/556401/translations","class":"topic_translation"}}},{"name":"My
54
+ new topic","description":null,"position":3,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-14T19:37:08Z","updated_at":"2013-08-14T19:37:08Z","_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":"Test
55
+ Topic","description":null,"position":4,"allow_questions":true,"in_support_center":null,"created_at":"2013-08-15T21:20:31Z","updated_at":"2013-08-15T21:20:31Z","_links":{"self":{"href":"/api/v2/topics/556907","class":"topic"},"articles":{"href":"/api/v2/topics/556907/articles","class":"article"},"translations":{"href":"/api/v2/topics/556907/translations","class":"topic_translation"}}}]}}'
56
+ http_version:
57
+ recorded_at: Thu, 15 Aug 2013 21:20:32 GMT
58
+ - request:
59
+ method: post
60
+ uri: https://devel.desk.com/api/v2/articles
61
+ body:
62
+ encoding: UTF-8
63
+ string: '{"subject":"My subject","body":"Some text for this new article","_links":{"topic":{"href":"/api/v2/topics/498301","class":"topic"}}}'
64
+ headers:
65
+ Accept:
66
+ - application/json
67
+ User-Agent:
68
+ - desk.com Ruby Gem v0.1.0
69
+ Content-Type:
70
+ - application/json
71
+ response:
72
+ status:
73
+ code: 201
74
+ message:
75
+ headers:
76
+ Accept-Ranges:
77
+ - bytes
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ Content-Type:
81
+ - application/json; charset=utf-8
82
+ Date:
83
+ - Thu, 15 Aug 2013 21:20:32 GMT
84
+ ETag:
85
+ - '"204e28aa0d48c5e219e968b6d0a609b8"'
86
+ Location:
87
+ - https://devel.desk.com/api/v2/articles/1264832
88
+ Status:
89
+ - 201 Created
90
+ Vary:
91
+ - X-AppVersion
92
+ X-AppVersion:
93
+ - '7.9'
94
+ X-Frame-Options:
95
+ - SAMEORIGIN
96
+ X-Rate-Limit-Limit:
97
+ - '60'
98
+ X-Rate-Limit-Remaining:
99
+ - '52'
100
+ X-Rate-Limit-Reset:
101
+ - '28'
102
+ X-Request-Id:
103
+ - 8faa5ca98745f2d3d62f9b94432f7259
104
+ Content-Length:
105
+ - '971'
106
+ Connection:
107
+ - keep-alive
108
+ body:
109
+ encoding: UTF-8
110
+ string: '{"subject":"My subject","body":"Some text for this new article","body_email":"Some
111
+ text for this new article","body_email_auto":true,"body_chat":"Some text for
112
+ this new article","body_chat_auto":true,"body_web_callback":"Some text for
113
+ this new article","body_web_callback_auto":true,"body_twitter":"Some text
114
+ for this new article","body_twitter_auto":true,"body_qna":"Some text for this
115
+ new article","body_qna_auto":true,"body_phone":"Some text for this new article","body_phone_auto":true,"body_facebook":"Some
116
+ 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-15T21:20:32Z","updated_at":"2013-08-15T21:20:32Z","_links":{"self":{"href":"/api/v2/articles/1264832","class":"article"},"topic":{"href":"/api/v2/topics/498301","class":"topic"},"translations":{"href":"/api/v2/articles/1264832/translations","class":"article_translation"}}}'
117
+ http_version:
118
+ recorded_at: Thu, 15 Aug 2013 21:20:32 GMT
119
+ - request:
120
+ method: delete
121
+ uri: https://devel.desk.com/api/v2/articles/1264832
122
+ body:
123
+ encoding: US-ASCII
124
+ string: ''
125
+ headers:
126
+ Accept:
127
+ - application/json
128
+ User-Agent:
129
+ - desk.com Ruby Gem v0.1.0
130
+ response:
131
+ status:
132
+ code: 204
133
+ message:
134
+ headers:
135
+ Accept-Ranges:
136
+ - bytes
137
+ Cache-Control:
138
+ - no-cache
139
+ Date:
140
+ - Thu, 15 Aug 2013 21:20:32 GMT
141
+ Status:
142
+ - 204 No Content
143
+ Vary:
144
+ - X-AppVersion
145
+ X-AppVersion:
146
+ - '7.9'
147
+ X-Frame-Options:
148
+ - SAMEORIGIN
149
+ X-Rate-Limit-Limit:
150
+ - '60'
151
+ X-Rate-Limit-Remaining:
152
+ - '51'
153
+ X-Rate-Limit-Reset:
154
+ - '28'
155
+ X-Request-Id:
156
+ - 7a5beaec97c3e3e94a8b3cb27e5c7a61
157
+ Connection:
158
+ - keep-alive
159
+ body:
160
+ encoding: UTF-8
161
+ string: ''
162
+ http_version:
163
+ recorded_at: Thu, 15 Aug 2013 21:20:32 GMT
164
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devel.desk.com/api/v2/users
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - desk.com Ruby Gem v0.1.0
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ Accept-Ranges:
20
+ - bytes
21
+ Cache-Control:
22
+ - no-cache, private
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Date:
26
+ - Thu, 15 Aug 2013 21:20:32 GMT
27
+ ETag:
28
+ - '"1376586898"'
29
+ Status:
30
+ - 200 OK
31
+ Vary:
32
+ - X-AppVersion
33
+ X-AppVersion:
34
+ - '7.9'
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ X-Rate-Limit-Limit:
38
+ - '60'
39
+ X-Rate-Limit-Remaining:
40
+ - '50'
41
+ X-Rate-Limit-Reset:
42
+ - '28'
43
+ X-Request-Id:
44
+ - 19c3870310b76b8203c8cdf1bc138dc2
45
+ Content-Length:
46
+ - '1868'
47
+ Connection:
48
+ - keep-alive
49
+ body:
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"}}}]}}'
54
+ http_version:
55
+ recorded_at: Thu, 15 Aug 2013 21:20:32 GMT
56
+ recorded_with: VCR 2.5.0