desk 0.3.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +7 -0
  2. data/README.mkd +305 -106
  3. data/TRANSITION.mkd +133 -0
  4. data/desk.gemspec +1 -1
  5. data/lib/desk.rb +1 -1
  6. data/lib/desk/api.rb +5 -1
  7. data/lib/desk/client.rb +184 -10
  8. data/lib/desk/client/article.rb +4 -83
  9. data/lib/desk/client/brand.rb +11 -0
  10. data/lib/desk/client/case.rb +59 -42
  11. data/lib/desk/client/company.rb +11 -0
  12. data/lib/desk/client/custom_field.rb +10 -0
  13. data/lib/desk/client/customer.rb +26 -124
  14. data/lib/desk/client/facebook_user.rb +11 -0
  15. data/lib/desk/client/filter.rb +11 -0
  16. data/lib/desk/client/group.rb +3 -29
  17. data/lib/desk/client/insight.rb +17 -0
  18. data/lib/desk/client/integration_url.rb +11 -0
  19. data/lib/desk/client/job.rb +11 -0
  20. data/lib/desk/client/label.rb +11 -0
  21. data/lib/desk/client/macro.rb +3 -133
  22. data/lib/desk/client/mailbox.rb +26 -0
  23. data/lib/desk/client/rule.rb +14 -0
  24. data/lib/desk/client/site_setting.rb +11 -0
  25. data/lib/desk/client/system_message.rb +16 -0
  26. data/lib/desk/client/topic.rb +4 -81
  27. data/lib/desk/client/twitter_account.rb +11 -0
  28. data/lib/desk/client/twitter_user.rb +11 -0
  29. data/lib/desk/client/user.rb +3 -30
  30. data/lib/desk/configuration.rb +1 -1
  31. data/lib/desk/connection.rb +2 -1
  32. data/lib/desk/deash.rb +100 -0
  33. data/lib/desk/request.rb +33 -20
  34. data/lib/desk/version.rb +1 -1
  35. data/lib/faraday/request/oauth.rb +6 -3
  36. data/lib/faraday/response/deashify.rb +23 -0
  37. data/spec/desk/client/article_spec.rb +62 -117
  38. data/spec/desk/client/brand_spec.rb +18 -0
  39. data/spec/desk/client/case_spec.rb +182 -66
  40. data/spec/desk/client/companies_spec.rb +26 -0
  41. data/spec/desk/client/custom_fields_spec.rb +18 -0
  42. data/spec/desk/client/customer_spec.rb +16 -145
  43. data/spec/desk/client/facebook_users_spec.rb +17 -0
  44. data/spec/desk/client/filter_spec.rb +28 -0
  45. data/spec/desk/client/group_spec.rb +32 -49
  46. data/spec/desk/client/inbound_mailboxes_spec.rb +70 -0
  47. data/spec/desk/client/integration_url_spec.rb +28 -0
  48. data/spec/desk/client/job_spec.rb +32 -0
  49. data/spec/desk/client/label_spec.rb +31 -0
  50. data/spec/desk/client/macro_spec.rb +22 -185
  51. data/spec/desk/client/rule_spec.rb +18 -0
  52. data/spec/desk/client/site_setting_spec.rb +18 -0
  53. data/spec/desk/client/system_message_spec.rb +42 -0
  54. data/spec/desk/client/topic_spec.rb +31 -112
  55. data/spec/desk/client/twitter_account_spec.rb +32 -0
  56. data/spec/desk/client/twitter_user_spec.rb +27 -0
  57. data/spec/desk/client/user_spec.rb +19 -42
  58. data/spec/desk_spec.rb +2 -2
  59. data/spec/faraday/response_spec.rb +3 -6
  60. data/spec/fixtures/article +50 -0
  61. data/spec/fixtures/article_create +50 -0
  62. data/spec/fixtures/article_translation +29 -0
  63. data/spec/fixtures/article_translation_create +29 -0
  64. data/spec/fixtures/article_translation_update +29 -0
  65. data/spec/fixtures/article_translations +81 -0
  66. data/spec/fixtures/article_update +50 -0
  67. data/spec/fixtures/articles +123 -0
  68. data/spec/fixtures/articles_search +124 -0
  69. data/spec/fixtures/brand +11 -0
  70. data/spec/fixtures/brands +45 -0
  71. data/spec/fixtures/case +44 -0
  72. data/spec/fixtures/case_attachment +19 -0
  73. data/spec/fixtures/case_attachment_create +19 -0
  74. data/spec/fixtures/case_attachments +61 -0
  75. data/spec/fixtures/case_create +51 -0
  76. data/spec/fixtures/case_message +26 -0
  77. data/spec/fixtures/case_note +21 -0
  78. data/spec/fixtures/case_note_create +26 -0
  79. data/spec/fixtures/case_notes +65 -0
  80. data/spec/fixtures/case_replies +75 -0
  81. data/spec/fixtures/case_reply +26 -0
  82. data/spec/fixtures/case_reply_create +26 -0
  83. data/spec/fixtures/case_reply_update +26 -0
  84. data/spec/fixtures/case_update +49 -0
  85. data/spec/fixtures/cases +111 -0
  86. data/spec/fixtures/cases_search +113 -0
  87. data/spec/fixtures/companies +75 -0
  88. data/spec/fixtures/companies_search +76 -0
  89. data/spec/fixtures/company +26 -0
  90. data/spec/fixtures/company_create +26 -0
  91. data/spec/fixtures/company_search +76 -0
  92. data/spec/fixtures/company_update +27 -0
  93. data/spec/fixtures/custom_field +15 -0
  94. data/spec/fixtures/custom_fields +58 -0
  95. data/spec/fixtures/customer +60 -0
  96. data/spec/fixtures/customer_create +54 -0
  97. data/spec/fixtures/customer_update +60 -0
  98. data/spec/fixtures/customers +143 -0
  99. data/spec/fixtures/customers_search +143 -0
  100. data/spec/fixtures/facebook_user +16 -0
  101. data/spec/fixtures/facebook_users +55 -0
  102. data/spec/fixtures/filter +16 -0
  103. data/spec/fixtures/filter_cases +111 -0
  104. data/spec/fixtures/filters +55 -0
  105. data/spec/fixtures/group +9 -0
  106. data/spec/fixtures/group_filters +55 -0
  107. data/spec/fixtures/group_users +63 -0
  108. data/spec/fixtures/groups +42 -0
  109. data/spec/fixtures/inbound_mailbox +32 -0
  110. data/spec/fixtures/inbound_mailboxes +87 -0
  111. data/spec/fixtures/integration_url +15 -0
  112. data/spec/fixtures/integration_url_create +15 -0
  113. data/spec/fixtures/integration_url_update +15 -0
  114. data/spec/fixtures/integration_urls +54 -0
  115. data/spec/fixtures/job +17 -0
  116. data/spec/fixtures/job_create +17 -0
  117. data/spec/fixtures/jobs +57 -0
  118. data/spec/fixtures/label +17 -0
  119. data/spec/fixtures/label_create +17 -0
  120. data/spec/fixtures/label_update +17 -0
  121. data/spec/fixtures/labels +57 -0
  122. data/spec/fixtures/macro +20 -0
  123. data/spec/fixtures/macro_action +17 -0
  124. data/spec/fixtures/macro_action_update +17 -0
  125. data/spec/fixtures/macro_actions +57 -0
  126. data/spec/fixtures/macro_create +20 -0
  127. data/spec/fixtures/macro_update +20 -0
  128. data/spec/fixtures/macros +63 -0
  129. data/spec/fixtures/rule +13 -0
  130. data/spec/fixtures/rules +49 -0
  131. data/spec/fixtures/site_setting +10 -0
  132. data/spec/fixtures/site_settings +43 -0
  133. data/spec/fixtures/system_message +4 -0
  134. data/spec/fixtures/topic +23 -0
  135. data/spec/fixtures/topic_create +23 -0
  136. data/spec/fixtures/topic_translation +12 -0
  137. data/spec/fixtures/topic_translation_create +12 -0
  138. data/spec/fixtures/topic_translation_update +12 -0
  139. data/spec/fixtures/topic_translations +47 -0
  140. data/spec/fixtures/topic_update +23 -0
  141. data/spec/fixtures/topics +69 -0
  142. data/spec/fixtures/twitter_account +14 -0
  143. data/spec/fixtures/twitter_account_tweet +20 -0
  144. data/spec/fixtures/twitter_account_tweet_create +20 -0
  145. data/spec/fixtures/twitter_account_tweets +63 -0
  146. data/spec/fixtures/twitter_accounts +51 -0
  147. data/spec/fixtures/twitter_user +18 -0
  148. data/spec/fixtures/twitter_user_create +18 -0
  149. data/spec/fixtures/twitter_users +59 -0
  150. data/spec/fixtures/user +20 -0
  151. data/spec/fixtures/user_preference +18 -0
  152. data/spec/fixtures/user_preference_update +14 -0
  153. data/spec/fixtures/user_preferences +223 -0
  154. data/spec/fixtures/users +63 -0
  155. data/spec/helper.rb +12 -0
  156. data/spec/shared_context.rb +16 -0
  157. data/spec/shared_examples.rb +312 -0
  158. metadata +247 -181
  159. data/lib/desk/client/interaction.rb +0 -75
  160. data/spec/desk/client/interaction_spec.rb +0 -191
  161. data/spec/fixtures/article.json +0 -50
  162. data/spec/fixtures/article_create.json +0 -54
  163. data/spec/fixtures/article_destroy.json +0 -3
  164. data/spec/fixtures/article_update.json +0 -54
  165. data/spec/fixtures/articles.json +0 -58
  166. data/spec/fixtures/case.json +0 -59
  167. data/spec/fixtures/case_update.json +0 -59
  168. data/spec/fixtures/cases.json +0 -182
  169. data/spec/fixtures/customer.json +0 -58
  170. data/spec/fixtures/customer_create.json +0 -56
  171. data/spec/fixtures/customer_create_email.json +0 -15
  172. data/spec/fixtures/customer_update.json +0 -47
  173. data/spec/fixtures/customer_update_email.json +0 -15
  174. data/spec/fixtures/customers.json +0 -98
  175. data/spec/fixtures/group.json +0 -8
  176. data/spec/fixtures/groups.json +0 -23
  177. data/spec/fixtures/interaction_create.json +0 -126
  178. data/spec/fixtures/interactions.json +0 -139
  179. data/spec/fixtures/macro.json +0 -8
  180. data/spec/fixtures/macro_action.json +0 -9
  181. data/spec/fixtures/macro_action_update.json +0 -12
  182. data/spec/fixtures/macro_actions.json +0 -69
  183. data/spec/fixtures/macro_create.json +0 -13
  184. data/spec/fixtures/macro_destroy.json +0 -3
  185. data/spec/fixtures/macro_update.json +0 -13
  186. data/spec/fixtures/macros.json +0 -24
  187. data/spec/fixtures/topic.json +0 -9
  188. data/spec/fixtures/topic_create.json +0 -14
  189. data/spec/fixtures/topic_destroy.json +0 -3
  190. data/spec/fixtures/topic_update.json +0 -14
  191. data/spec/fixtures/topics.json +0 -35
  192. data/spec/fixtures/user.json +0 -15
  193. data/spec/fixtures/users.json +0 -24
@@ -1,75 +0,0 @@
1
- module Desk
2
- class Client
3
- # Defines methods related to interactions
4
- module Interaction
5
-
6
- # Returns extended information of up to 100 interactions
7
- #
8
- # @option options [Boolean, String, Integer]
9
- # @example Return extended information for 12345
10
- # Desk.interactions(:since_id => 12345)
11
- # Desk.interactions(:since_id => 12345, :count => 5)
12
- # @format :json
13
- # @authenticated true
14
- # @see http://dev.desk.com/docs/api/interactions
15
- def interactions(*args)
16
- options = args.last.is_a?(Hash) ? args.pop : {}
17
- response = get("interactions",options)
18
- response
19
- end
20
-
21
- def create_interaction(*args)
22
- options = args.last.is_a?(Hash) ? args.pop : {}
23
- if options[:direction].to_s == "outbound"
24
- options.delete(:direction)
25
- to = options.delete(:customer_email)
26
- subject = options.delete(:interaction_subject)
27
- body = options.delete(:interaction_body)
28
-
29
- create_outbound_interaction(to, subject, body, options)
30
- else
31
- create_inbound_interaction(options)
32
- end
33
- end
34
-
35
- # Creates an interaction from a customer
36
- #
37
- # @format :json
38
- # @authenticated true
39
- # @rate_limited true
40
- # @return [Array] The requested users.
41
- # @see http://dev.desk.com/docs/api/interactions/create
42
- # @example Create a new interaction
43
- # Desk.create_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com")
44
- def create_inbound_interaction(*args)
45
- options = args.last.is_a?(Hash) ? args.pop : {}
46
- response = post('interactions', options)
47
- if response['success']
48
- return response['results']
49
- else
50
- return response
51
- end
52
- end
53
-
54
- # Create an interaction from an agent
55
- #
56
- # Desk's API doesn't support creating a new case/interaction initiated by an agent
57
- # so we'll use send an email to the customer directly that is BCC'd to the support email address
58
- # which will create the ticket
59
- #
60
- # @see http://support.desk.com/customer/portal/articles/4180
61
- # @see http://support.desk.com/customer/portal/articles/6728
62
- def create_outbound_interaction(to, subject, body, *args)
63
- raise Desk::SupportEmailNotSet if support_email.blank?
64
- options = args.last.is_a?(Hash) ? args.pop : {}
65
- options.merge!(:to => to, :subject => subject, :body => body, :from => support_email, :bcc => support_email)
66
- headers = { "x-assistly-customer-email" => to,
67
- "x-assistly-interaction-direction" => "out",
68
- "x-assistly-case-status" => options[:status]||"open"}
69
- headers.merge!(options[:headers]) if options[:headers]
70
- options.merge!(:headers => headers)
71
- Pony.mail(options)
72
- end
73
- end
74
- end
75
- end
@@ -1,191 +0,0 @@
1
- require 'helper'
2
-
3
- describe Desk::Client do
4
- include EmailSpec::Helpers
5
- include EmailSpec::Matchers
6
-
7
- Desk::Configuration::VALID_FORMATS.each do |format|
8
- context ".new(:format => '#{format}')" do
9
- before do
10
- @client = Desk::Client.new(:subdomain => "example", :format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS', :support_email => "help@example.com")
11
- end
12
-
13
- describe ".create_interaction" do
14
- context "create a new interaction without specifying direction should default to inbound" do
15
- before do
16
- stub_post("interactions.#{format}").
17
- to_return(:body => fixture("interaction_create.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
18
- end
19
-
20
- it "should get the correct resource" do
21
- @client.create_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com")
22
- a_post("interactions.#{format}").
23
- should have_been_made
24
- end
25
-
26
- it "should create an interaction" do
27
- interaction = @client.create_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com")
28
-
29
- interaction.customer.emails.first.email.email.should == "customer@zencoder.com"
30
- interaction.interaction.interactionable.email.subject.should == "this is an api test"
31
- end
32
- end
33
-
34
- context "create a new interaction and specify inbound" do
35
- before do
36
- stub_post("interactions.#{format}").
37
- to_return(:body => fixture("interaction_create.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
38
- end
39
-
40
- it "should get the correct resource" do
41
- @client.create_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com", :direction => "in")
42
- a_post("interactions.#{format}").
43
- should have_been_made
44
- end
45
-
46
- it "should create an interaction" do
47
- interaction = @client.create_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com", :direction => "in")
48
-
49
- interaction.customer.emails.first.email.email.should == "customer@zencoder.com"
50
- interaction.interaction.interactionable.email.subject.should == "this is an api test"
51
- end
52
- end
53
-
54
- context "create a new interaction and specify outbound" do
55
- before do
56
- @email = @client.create_interaction(:customer_email => "customer@example.com", :interaction_subject => "Need help?", :interaction_body => "Sorry we missed you in chat today.", :direction => "outbound")
57
- end
58
-
59
- it "should deliver the email to the customer" do
60
- @email.last.should deliver_to("customer@example.com")
61
- end
62
-
63
- it "should be from the support email" do
64
- @email.last.should deliver_from(@client.support_email)
65
- end
66
-
67
- it "should contain the message in the mail body" do
68
- @email.last.should have_body_text(/Sorry we missed you in chat today/)
69
- end
70
-
71
- it "should bcc to the support email" do
72
- @email.last.should bcc_to(@client.support_email)
73
- end
74
-
75
- it "should set the Desk headers" do
76
- @email.last.should have_header("x-assistly-customer-email","customer@example.com")
77
- @email.last.should have_header("x-assistly-interaction-direction","out")
78
- @email.last.should have_header("x-assistly-case-status","open")
79
- end
80
- end
81
- end
82
-
83
- describe ".create_inbound_interaction" do
84
- context "create a new interaction" do
85
- before do
86
- stub_post("interactions.#{format}").
87
- to_return(:body => fixture("interaction_create.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
88
- end
89
-
90
- it "should get the correct resource" do
91
- @client.create_inbound_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com")
92
- a_post("interactions.#{format}").
93
- should have_been_made
94
- end
95
-
96
- it "should create an interaction" do
97
- interaction = @client.create_inbound_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com")
98
-
99
- interaction.customer.emails.first.email.email.should == "customer@zencoder.com"
100
- interaction.interaction.interactionable.email.subject.should == "this is an api test"
101
- end
102
- end
103
- end
104
-
105
- describe ".create_outbound_interaction" do
106
- context "create" do
107
-
108
- before do
109
- @email = @client.create_outbound_interaction("customer@example.com", "Need help?", "Sorry we missed you in chat today.")
110
- end
111
-
112
- it "should deliver the email to the customer" do
113
- @email.last.should deliver_to("customer@example.com")
114
- end
115
-
116
- it "should be from the support email" do
117
- @email.last.should deliver_from(@client.support_email)
118
- end
119
-
120
- it "should contain the message in the mail body" do
121
- @email.last.should have_body_text(/Sorry we missed you in chat today/)
122
- end
123
-
124
- it "should bcc to the support email" do
125
- @email.last.should bcc_to(@client.support_email)
126
- end
127
-
128
- it "should set the Assitly headers" do
129
- @email.last.should have_header("x-assistly-customer-email","customer@example.com")
130
- @email.last.should have_header("x-assistly-interaction-direction","out")
131
- @email.last.should have_header("x-assistly-case-status","open")
132
- end
133
-
134
- end
135
-
136
- context "without support_email defined" do
137
-
138
- before do
139
- @client_without_support_email = Desk::Client.new(:subdomain => "example", :format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
140
- end
141
-
142
- it "should raise an error" do
143
- lambda do
144
- @client_without_support_email.create_outbound_interaction("customer@example.com", "Need help?", "Sorry we missed you in chat today.")
145
- end.should raise_error(Desk::SupportEmailNotSet)
146
- end
147
-
148
- end
149
-
150
- context "with customer headers set" do
151
- before do
152
- @custom_email = @client.create_outbound_interaction("customer@example.com", "Need help?", "Sorry we missed you in chat today.", :headers => { "x-assistly-interaction-user-agent" => "12345"})
153
- end
154
-
155
- it "should merge the custom headers" do
156
- @custom_email.last.should have_header("x-assistly-interaction-user-agent","12345")
157
- end
158
-
159
- it "should preserve the existing headers" do
160
- @custom_email.last.should have_header("x-assistly-customer-email","customer@example.com")
161
- end
162
- end
163
- end
164
-
165
- describe ".interactions" do
166
-
167
- context "lookup" do
168
-
169
- before do
170
- stub_get("interactions.#{format}").
171
- to_return(:body => fixture("interactions.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
172
- end
173
-
174
- it "should get the correct resource" do
175
- @client.interactions
176
- a_get("interactions.#{format}").
177
- should have_been_made
178
- end
179
-
180
- it "should return up to 100 users worth of extended information" do
181
- interactions = @client.interactions
182
-
183
- interactions.results.should be_a Array
184
- interactions.results.last.interaction.user.name.should == "Agent Jeremy"
185
- end
186
-
187
- end
188
- end
189
- end
190
- end
191
- end
@@ -1,50 +0,0 @@
1
- {
2
- "article":
3
- {
4
- "id":13,
5
- "subject":"API Tips",
6
- "show_in_portal":true,
7
- "main_content":"Tips on using our API",
8
- "agent_content":null,
9
- "email":"Tips on using our API",
10
- "chat":"Tips on using our API",
11
- "twitter":"Tips on using our API",
12
- "question_answer":"Tips on using our API",
13
- "phone":"Tips on using our API",
14
- "quickcode":null,
15
- "created_by":
16
- {
17
- "user":
18
- {
19
- "id":1,
20
- "name":"API User",
21
- "name_public":"API User",
22
- "email":"apiuser@yoursite.com",
23
- "created_at":"2011-01-13T22:41:42Z",
24
- "updated_at":"2011-01-19T22:04:33Z",
25
- "user_level":"admin",
26
- "login_count":9,
27
- "time_zone":"Pacific Time (US & Canada)",
28
- "last_login_at":"2011-01-19T18:21:52Z",
29
- "current_login_at":"2011-01-19T22:04:33Z"
30
- }
31
- },
32
- "updated_by":
33
- {
34
- "user":
35
- {
36
- "id":1,
37
- "name":"API User",
38
- "name_public":"API User",
39
- "email":"apiuser@yoursite.com",
40
- "created_at":"2011-01-13T22:41:42Z",
41
- "updated_at":"2011-01-19T22:04:33Z",
42
- "user_level":"admin",
43
- "login_count":9,
44
- "time_zone":"Pacific Time (US & Canada)",
45
- "last_login_at":"2011-01-19T18:21:52Z",
46
- "current_login_at":"2011-01-19T22:04:33Z"
47
- }
48
- }
49
- }
50
- }
@@ -1,54 +0,0 @@
1
- {
2
- "success":true,
3
- "results":
4
- {
5
- "article":
6
- {
7
- "id":13,
8
- "subject":"API Tips",
9
- "show_in_portal":true,
10
- "main_content":"Tips on using our API",
11
- "agent_content":null,
12
- "email":"Tips on using our API",
13
- "chat":"Tips on using our API",
14
- "twitter":"Tips on using our API",
15
- "question_answer":"Tips on using our API",
16
- "phone":"Tips on using our API",
17
- "quickcode":null,
18
- "created_by":
19
- {
20
- "user":
21
- {
22
- "id":1,
23
- "name":"API User",
24
- "name_public":"API User",
25
- "email":"apiuser@yoursite.com",
26
- "created_at":"2011-01-13T22:41:42Z",
27
- "updated_at":"2011-01-19T22:04:33Z",
28
- "user_level":"admin",
29
- "login_count":9,
30
- "time_zone":"Pacific Time (US & Canada)",
31
- "last_login_at":"2011-01-19T18:21:52Z",
32
- "current_login_at":"2011-01-19T22:04:33Z"
33
- }
34
- },
35
- "updated_by":
36
- {
37
- "user":
38
- {
39
- "id":1,
40
- "name":"API User",
41
- "name_public":"API User",
42
- "email":"apiuser@yoursite.com",
43
- "created_at":"2011-01-13T22:41:42Z",
44
- "updated_at":"2011-01-19T22:04:33Z",
45
- "user_level":"admin",
46
- "login_count":9,
47
- "time_zone":"Pacific Time (US & Canada)",
48
- "last_login_at":"2011-01-19T18:21:52Z",
49
- "current_login_at":"2011-01-19T22:04:33Z"
50
- }
51
- }
52
- }
53
- }
54
- }
@@ -1,3 +0,0 @@
1
- {
2
- "success":true
3
- }
@@ -1,54 +0,0 @@
1
- {
2
- "success":true,
3
- "results":
4
- {
5
- "article":
6
- {
7
- "id":13,
8
- "subject":"API Tips",
9
- "show_in_portal":true,
10
- "main_content":"Tips on using our API",
11
- "agent_content":null,
12
- "email":"Tips on using our API",
13
- "chat":"Tips on using our API",
14
- "twitter":"Tips on using our API",
15
- "question_answer":"Tips on using our API",
16
- "phone":"Tips on using our API",
17
- "quickcode":null,
18
- "created_by":
19
- {
20
- "user":
21
- {
22
- "id":1,
23
- "name":"API User",
24
- "name_public":"API User",
25
- "email":"apiuser@yoursite.com",
26
- "created_at":"2011-01-13T22:41:42Z",
27
- "updated_at":"2011-01-19T22:04:33Z",
28
- "user_level":"admin",
29
- "login_count":9,
30
- "time_zone":"Pacific Time (US & Canada)",
31
- "last_login_at":"2011-01-19T18:21:52Z",
32
- "current_login_at":"2011-01-19T22:04:33Z"
33
- }
34
- },
35
- "updated_by":
36
- {
37
- "user":
38
- {
39
- "id":1,
40
- "name":"API User",
41
- "name_public":"API User",
42
- "email":"apiuser@yoursite.com",
43
- "created_at":"2011-01-13T22:41:42Z",
44
- "updated_at":"2011-01-19T22:04:33Z",
45
- "user_level":"admin",
46
- "login_count":9,
47
- "time_zone":"Pacific Time (US & Canada)",
48
- "last_login_at":"2011-01-19T18:21:52Z",
49
- "current_login_at":"2011-01-19T22:04:33Z"
50
- }
51
- }
52
- }
53
- }
54
- }
@@ -1,58 +0,0 @@
1
- {
2
- "results":
3
- [
4
- {
5
- "article":
6
- {
7
- "id":13,
8
- "subject":"API Tips",
9
- "show_in_portal":true,
10
- "main_content":"Tips on using our API",
11
- "agent_content":null,
12
- "email":"Tips on using our API",
13
- "chat":"Tips on using our API",
14
- "twitter":"Tips on using our API",
15
- "question_answer":"Tips on using our API",
16
- "phone":"Tips on using our API",
17
- "quickcode":null,
18
- "created_by":
19
- {
20
- "user":
21
- {
22
- "id":1,
23
- "name":"API User",
24
- "name_public":"API User",
25
- "email":"apiuser@yoursite.com",
26
- "created_at":"2011-01-13T22:41:42Z",
27
- "updated_at":"2011-01-19T22:04:33Z",
28
- "user_level":"admin",
29
- "login_count":9,
30
- "time_zone":"Pacific Time (US & Canada)",
31
- "last_login_at":"2011-01-19T18:21:52Z",
32
- "current_login_at":"2011-01-19T22:04:33Z"
33
- }
34
- },
35
- "updated_by":
36
- {
37
- "user":
38
- {
39
- "id":1,
40
- "name":"API User",
41
- "name_public":"API User",
42
- "email":"apiuser@yoursite.com",
43
- "created_at":"2011-01-13T22:41:42Z",
44
- "updated_at":"2011-01-19T22:04:33Z",
45
- "user_level":"admin",
46
- "login_count":9,
47
- "time_zone":"Pacific Time (US & Canada)",
48
- "last_login_at":"2011-01-19T18:21:52Z",
49
- "current_login_at":"2011-01-19T22:04:33Z"
50
- }
51
- }
52
- }
53
- }
54
- ],
55
- "page":1,
56
- "count":20,
57
- "total":1
58
- }