desk 0.3.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.mkd +305 -106
- data/TRANSITION.mkd +133 -0
- data/desk.gemspec +1 -1
- data/lib/desk.rb +1 -1
- data/lib/desk/api.rb +5 -1
- data/lib/desk/client.rb +184 -10
- data/lib/desk/client/article.rb +4 -83
- data/lib/desk/client/brand.rb +11 -0
- data/lib/desk/client/case.rb +59 -42
- data/lib/desk/client/company.rb +11 -0
- data/lib/desk/client/custom_field.rb +10 -0
- data/lib/desk/client/customer.rb +26 -124
- data/lib/desk/client/facebook_user.rb +11 -0
- data/lib/desk/client/filter.rb +11 -0
- data/lib/desk/client/group.rb +3 -29
- data/lib/desk/client/insight.rb +17 -0
- data/lib/desk/client/integration_url.rb +11 -0
- data/lib/desk/client/job.rb +11 -0
- data/lib/desk/client/label.rb +11 -0
- data/lib/desk/client/macro.rb +3 -133
- data/lib/desk/client/mailbox.rb +26 -0
- data/lib/desk/client/rule.rb +14 -0
- data/lib/desk/client/site_setting.rb +11 -0
- data/lib/desk/client/system_message.rb +16 -0
- data/lib/desk/client/topic.rb +4 -81
- data/lib/desk/client/twitter_account.rb +11 -0
- data/lib/desk/client/twitter_user.rb +11 -0
- data/lib/desk/client/user.rb +3 -30
- data/lib/desk/configuration.rb +1 -1
- data/lib/desk/connection.rb +2 -1
- data/lib/desk/deash.rb +100 -0
- data/lib/desk/request.rb +33 -20
- data/lib/desk/version.rb +1 -1
- data/lib/faraday/request/oauth.rb +6 -3
- data/lib/faraday/response/deashify.rb +23 -0
- data/spec/desk/client/article_spec.rb +62 -117
- data/spec/desk/client/brand_spec.rb +18 -0
- data/spec/desk/client/case_spec.rb +182 -66
- data/spec/desk/client/companies_spec.rb +26 -0
- data/spec/desk/client/custom_fields_spec.rb +18 -0
- data/spec/desk/client/customer_spec.rb +16 -145
- data/spec/desk/client/facebook_users_spec.rb +17 -0
- data/spec/desk/client/filter_spec.rb +28 -0
- data/spec/desk/client/group_spec.rb +32 -49
- data/spec/desk/client/inbound_mailboxes_spec.rb +70 -0
- data/spec/desk/client/integration_url_spec.rb +28 -0
- data/spec/desk/client/job_spec.rb +32 -0
- data/spec/desk/client/label_spec.rb +31 -0
- data/spec/desk/client/macro_spec.rb +22 -185
- data/spec/desk/client/rule_spec.rb +18 -0
- data/spec/desk/client/site_setting_spec.rb +18 -0
- data/spec/desk/client/system_message_spec.rb +42 -0
- data/spec/desk/client/topic_spec.rb +31 -112
- data/spec/desk/client/twitter_account_spec.rb +32 -0
- data/spec/desk/client/twitter_user_spec.rb +27 -0
- data/spec/desk/client/user_spec.rb +19 -42
- data/spec/desk_spec.rb +2 -2
- data/spec/faraday/response_spec.rb +3 -6
- data/spec/fixtures/article +50 -0
- data/spec/fixtures/article_create +50 -0
- data/spec/fixtures/article_translation +29 -0
- data/spec/fixtures/article_translation_create +29 -0
- data/spec/fixtures/article_translation_update +29 -0
- data/spec/fixtures/article_translations +81 -0
- data/spec/fixtures/article_update +50 -0
- data/spec/fixtures/articles +123 -0
- data/spec/fixtures/articles_search +124 -0
- data/spec/fixtures/brand +11 -0
- data/spec/fixtures/brands +45 -0
- data/spec/fixtures/case +44 -0
- data/spec/fixtures/case_attachment +19 -0
- data/spec/fixtures/case_attachment_create +19 -0
- data/spec/fixtures/case_attachments +61 -0
- data/spec/fixtures/case_create +51 -0
- data/spec/fixtures/case_message +26 -0
- data/spec/fixtures/case_note +21 -0
- data/spec/fixtures/case_note_create +26 -0
- data/spec/fixtures/case_notes +65 -0
- data/spec/fixtures/case_replies +75 -0
- data/spec/fixtures/case_reply +26 -0
- data/spec/fixtures/case_reply_create +26 -0
- data/spec/fixtures/case_reply_update +26 -0
- data/spec/fixtures/case_update +49 -0
- data/spec/fixtures/cases +111 -0
- data/spec/fixtures/cases_search +113 -0
- data/spec/fixtures/companies +75 -0
- data/spec/fixtures/companies_search +76 -0
- data/spec/fixtures/company +26 -0
- data/spec/fixtures/company_create +26 -0
- data/spec/fixtures/company_search +76 -0
- data/spec/fixtures/company_update +27 -0
- data/spec/fixtures/custom_field +15 -0
- data/spec/fixtures/custom_fields +58 -0
- data/spec/fixtures/customer +60 -0
- data/spec/fixtures/customer_create +54 -0
- data/spec/fixtures/customer_update +60 -0
- data/spec/fixtures/customers +143 -0
- data/spec/fixtures/customers_search +143 -0
- data/spec/fixtures/facebook_user +16 -0
- data/spec/fixtures/facebook_users +55 -0
- data/spec/fixtures/filter +16 -0
- data/spec/fixtures/filter_cases +111 -0
- data/spec/fixtures/filters +55 -0
- data/spec/fixtures/group +9 -0
- data/spec/fixtures/group_filters +55 -0
- data/spec/fixtures/group_users +63 -0
- data/spec/fixtures/groups +42 -0
- data/spec/fixtures/inbound_mailbox +32 -0
- data/spec/fixtures/inbound_mailboxes +87 -0
- data/spec/fixtures/integration_url +15 -0
- data/spec/fixtures/integration_url_create +15 -0
- data/spec/fixtures/integration_url_update +15 -0
- data/spec/fixtures/integration_urls +54 -0
- data/spec/fixtures/job +17 -0
- data/spec/fixtures/job_create +17 -0
- data/spec/fixtures/jobs +57 -0
- data/spec/fixtures/label +17 -0
- data/spec/fixtures/label_create +17 -0
- data/spec/fixtures/label_update +17 -0
- data/spec/fixtures/labels +57 -0
- data/spec/fixtures/macro +20 -0
- data/spec/fixtures/macro_action +17 -0
- data/spec/fixtures/macro_action_update +17 -0
- data/spec/fixtures/macro_actions +57 -0
- data/spec/fixtures/macro_create +20 -0
- data/spec/fixtures/macro_update +20 -0
- data/spec/fixtures/macros +63 -0
- data/spec/fixtures/rule +13 -0
- data/spec/fixtures/rules +49 -0
- data/spec/fixtures/site_setting +10 -0
- data/spec/fixtures/site_settings +43 -0
- data/spec/fixtures/system_message +4 -0
- data/spec/fixtures/topic +23 -0
- data/spec/fixtures/topic_create +23 -0
- data/spec/fixtures/topic_translation +12 -0
- data/spec/fixtures/topic_translation_create +12 -0
- data/spec/fixtures/topic_translation_update +12 -0
- data/spec/fixtures/topic_translations +47 -0
- data/spec/fixtures/topic_update +23 -0
- data/spec/fixtures/topics +69 -0
- data/spec/fixtures/twitter_account +14 -0
- data/spec/fixtures/twitter_account_tweet +20 -0
- data/spec/fixtures/twitter_account_tweet_create +20 -0
- data/spec/fixtures/twitter_account_tweets +63 -0
- data/spec/fixtures/twitter_accounts +51 -0
- data/spec/fixtures/twitter_user +18 -0
- data/spec/fixtures/twitter_user_create +18 -0
- data/spec/fixtures/twitter_users +59 -0
- data/spec/fixtures/user +20 -0
- data/spec/fixtures/user_preference +18 -0
- data/spec/fixtures/user_preference_update +14 -0
- data/spec/fixtures/user_preferences +223 -0
- data/spec/fixtures/users +63 -0
- data/spec/helper.rb +12 -0
- data/spec/shared_context.rb +16 -0
- data/spec/shared_examples.rb +312 -0
- metadata +247 -181
- data/lib/desk/client/interaction.rb +0 -75
- data/spec/desk/client/interaction_spec.rb +0 -191
- data/spec/fixtures/article.json +0 -50
- data/spec/fixtures/article_create.json +0 -54
- data/spec/fixtures/article_destroy.json +0 -3
- data/spec/fixtures/article_update.json +0 -54
- data/spec/fixtures/articles.json +0 -58
- data/spec/fixtures/case.json +0 -59
- data/spec/fixtures/case_update.json +0 -59
- data/spec/fixtures/cases.json +0 -182
- data/spec/fixtures/customer.json +0 -58
- data/spec/fixtures/customer_create.json +0 -56
- data/spec/fixtures/customer_create_email.json +0 -15
- data/spec/fixtures/customer_update.json +0 -47
- data/spec/fixtures/customer_update_email.json +0 -15
- data/spec/fixtures/customers.json +0 -98
- data/spec/fixtures/group.json +0 -8
- data/spec/fixtures/groups.json +0 -23
- data/spec/fixtures/interaction_create.json +0 -126
- data/spec/fixtures/interactions.json +0 -139
- data/spec/fixtures/macro.json +0 -8
- data/spec/fixtures/macro_action.json +0 -9
- data/spec/fixtures/macro_action_update.json +0 -12
- data/spec/fixtures/macro_actions.json +0 -69
- data/spec/fixtures/macro_create.json +0 -13
- data/spec/fixtures/macro_destroy.json +0 -3
- data/spec/fixtures/macro_update.json +0 -13
- data/spec/fixtures/macros.json +0 -24
- data/spec/fixtures/topic.json +0 -9
- data/spec/fixtures/topic_create.json +0 -14
- data/spec/fixtures/topic_destroy.json +0 -3
- data/spec/fixtures/topic_update.json +0 -14
- data/spec/fixtures/topics.json +0 -35
- data/spec/fixtures/user.json +0 -15
- data/spec/fixtures/users.json +0 -24
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Desk::Client do
|
4
|
+
context "Twitter Account" do
|
5
|
+
|
6
|
+
let(:endpoint) { "twitter_account" }
|
7
|
+
let(:id) { 1 }
|
8
|
+
let(:check_key) { "handle" }
|
9
|
+
let(:check_value) { "desk_dev" }
|
10
|
+
|
11
|
+
include_context "basic configuration"
|
12
|
+
|
13
|
+
it_behaves_like "a list endpoint"
|
14
|
+
|
15
|
+
it_behaves_like "a show endpoint"
|
16
|
+
|
17
|
+
context "Tweet" do
|
18
|
+
|
19
|
+
let(:sub_endpoint) { "tweet" }
|
20
|
+
let(:sub_id) { 1 }
|
21
|
+
let(:check_key) { "body" }
|
22
|
+
let(:check_value) { "Example tweet" }
|
23
|
+
|
24
|
+
it_behaves_like "a sub list endpoint"
|
25
|
+
|
26
|
+
it_behaves_like "a sub show endpoint"
|
27
|
+
|
28
|
+
it_behaves_like "a sub create endpoint", { :body => "Example Tweet" }
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Desk::Client do
|
4
|
+
context "Twitter User" do
|
5
|
+
|
6
|
+
let(:endpoint) { "twitter_user" }
|
7
|
+
let(:id) { 1 }
|
8
|
+
let(:check_key) { "handle" }
|
9
|
+
let(:check_value) { "desk_dev" }
|
10
|
+
|
11
|
+
include_context "basic configuration"
|
12
|
+
|
13
|
+
it_behaves_like "a list endpoint"
|
14
|
+
|
15
|
+
it_behaves_like "a show endpoint"
|
16
|
+
|
17
|
+
it_behaves_like "a create endpoint", {
|
18
|
+
:handle => "desk_dev",
|
19
|
+
:_links => {
|
20
|
+
:customer => {
|
21
|
+
:href => "/api/v2/customers/1",
|
22
|
+
:class => "customer"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
@@ -1,58 +1,35 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
describe Desk::Client do
|
4
|
-
|
5
|
-
context ".new(:format => '#{format}')" do
|
6
|
-
before do
|
7
|
-
@client = Desk::Client.new(:subdomain => "example", :format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".user" do
|
11
|
-
|
12
|
-
context "with id passed" do
|
4
|
+
context "User" do
|
13
5
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
let(:endpoint) { "user" }
|
7
|
+
let(:id) { 1 }
|
8
|
+
let(:check_key) { "name" }
|
9
|
+
let(:check_value) { "John Doe" }
|
18
10
|
|
19
|
-
|
20
|
-
@client.user(1)
|
21
|
-
a_get("users/1.#{format}").
|
22
|
-
should have_been_made
|
23
|
-
end
|
11
|
+
include_context "basic configuration"
|
24
12
|
|
25
|
-
|
26
|
-
user = @client.user(1)
|
27
|
-
user.name.should == "Chris Warren"
|
28
|
-
end
|
13
|
+
it_behaves_like "a list endpoint"
|
29
14
|
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
describe ".users" do
|
15
|
+
it_behaves_like "a show endpoint"
|
34
16
|
|
35
|
-
|
17
|
+
context "Preference" do
|
36
18
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
19
|
+
let(:sub_endpoint) { "preference" }
|
20
|
+
let(:sub_id) { 1 }
|
21
|
+
let(:check_key) { "name" }
|
22
|
+
let(:check_value) { "enable_routing_filter_on_login" }
|
41
23
|
|
42
|
-
|
43
|
-
@client.users
|
44
|
-
a_get("users.#{format}").
|
45
|
-
should have_been_made
|
46
|
-
end
|
24
|
+
it_behaves_like "a sub list endpoint"
|
47
25
|
|
48
|
-
|
49
|
-
users = @client.users
|
50
|
-
users.results.should be_a Array
|
51
|
-
users.results.first.user.name.should == "Test User"
|
52
|
-
end
|
26
|
+
it_behaves_like "a sub show endpoint"
|
53
27
|
|
54
|
-
|
28
|
+
it_behaves_like "a sub update endpoint", { :value => true } do
|
29
|
+
let(:sub_id) { 3 }
|
30
|
+
let(:check_value) { "auto_accept_on_route" }
|
55
31
|
end
|
32
|
+
|
56
33
|
end
|
57
34
|
end
|
58
35
|
end
|
data/spec/desk_spec.rb
CHANGED
@@ -154,8 +154,8 @@ describe Desk do
|
|
154
154
|
describe ".counter" do
|
155
155
|
before do
|
156
156
|
Desk.counter = 0
|
157
|
-
stub_get("cases
|
158
|
-
to_return(:body => fixture("cases
|
157
|
+
stub_get("cases").
|
158
|
+
to_return(:body => fixture("cases"), :headers => {:content_type => "application/json; charset=utf-8"})
|
159
159
|
end
|
160
160
|
|
161
161
|
it "should be 0 in the beginning" do
|
@@ -19,16 +19,13 @@ describe Faraday::Response do
|
|
19
19
|
context "when HTTP status is #{status}" do
|
20
20
|
|
21
21
|
before do
|
22
|
-
stub_get('users/1
|
22
|
+
stub_get('users/1').
|
23
23
|
with(:headers => {'Accept'=>'application/json', 'User-Agent'=>Desk::Configuration::DEFAULT_USER_AGENT}).
|
24
24
|
to_return(:status => status)
|
25
25
|
end
|
26
26
|
|
27
|
-
it
|
28
|
-
|
29
|
-
@client.user(1)
|
30
|
-
end.should raise_error(exception)
|
31
|
-
end
|
27
|
+
it { expect{ @client.user(1) }.to raise_error(exception) }
|
28
|
+
|
32
29
|
end
|
33
30
|
end
|
34
31
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"subject": "Awesome Subject",
|
3
|
+
"body": "<p>Awesome apples</p>",
|
4
|
+
"body_email": "Email for Awesome apples",
|
5
|
+
"body_email_auto": false,
|
6
|
+
"body_chat": "Awesome apples",
|
7
|
+
"body_chat_auto": true,
|
8
|
+
"body_web_callback": "<p>Awesome Apples</p>",
|
9
|
+
"body_web_callback_auto": false,
|
10
|
+
"body_twitter": "Awesome apples",
|
11
|
+
"body_twitter_auto": true,
|
12
|
+
"body_qna": "Awesome apples",
|
13
|
+
"body_qna_auto": true,
|
14
|
+
"body_phone": "Awesome apples",
|
15
|
+
"body_phone_auto": true,
|
16
|
+
"body_facebook": "Awesome apples",
|
17
|
+
"body_facebook_auto": true,
|
18
|
+
"rating": 75,
|
19
|
+
"rating_count": 4,
|
20
|
+
"rating_score": 3,
|
21
|
+
"position": 1,
|
22
|
+
"quickcode": "AWESOME",
|
23
|
+
"in_support_center": true,
|
24
|
+
"internal_notes": "Notes to the agent here",
|
25
|
+
"publish_at": "2013-11-12T18:07:34Z",
|
26
|
+
"created_at": "2013-11-12T18:02:34Z",
|
27
|
+
"updated_at": "2013-11-12T18:07:34Z",
|
28
|
+
"_links": {
|
29
|
+
"self": {
|
30
|
+
"href": "/api/v2/articles/1",
|
31
|
+
"class": "article"
|
32
|
+
},
|
33
|
+
"topic": {
|
34
|
+
"href": "/api/v2/topics/1",
|
35
|
+
"class": "topic"
|
36
|
+
},
|
37
|
+
"translations": {
|
38
|
+
"href": "/api/v2/articles/1/translations",
|
39
|
+
"class": "article_translation"
|
40
|
+
},
|
41
|
+
"created_by": {
|
42
|
+
"href": "/api/v2/users/1",
|
43
|
+
"class": "user"
|
44
|
+
},
|
45
|
+
"updated_by": {
|
46
|
+
"href": "/api/v2/users/1",
|
47
|
+
"class": "user"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"subject": "Awesome Subject",
|
3
|
+
"body": "<strong>Use Desk.com</strong>",
|
4
|
+
"body_email": "Email just doesn't cut it",
|
5
|
+
"body_email_auto": false,
|
6
|
+
"body_chat": "Use Desk.com",
|
7
|
+
"body_chat_auto": true,
|
8
|
+
"body_web_callback": "<strong>Use Desk.com</strong>",
|
9
|
+
"body_web_callback_auto": false,
|
10
|
+
"body_twitter": "Use Desk.com in 140 chars or less",
|
11
|
+
"body_twitter_auto": false,
|
12
|
+
"body_qna": "Use Desk.com",
|
13
|
+
"body_qna_auto": true,
|
14
|
+
"body_phone": "Use Desk.com",
|
15
|
+
"body_phone_auto": true,
|
16
|
+
"body_facebook": "Use Desk.com",
|
17
|
+
"body_facebook_auto": true,
|
18
|
+
"rating": 75,
|
19
|
+
"rating_count": 4,
|
20
|
+
"rating_score": 3,
|
21
|
+
"position": 1,
|
22
|
+
"quickcode": "AWESOME",
|
23
|
+
"in_support_center": true,
|
24
|
+
"internal_notes": "Notes to the agent here",
|
25
|
+
"publish_at": "2013-11-12T18:07:34Z",
|
26
|
+
"created_at": "2013-11-12T18:02:34Z",
|
27
|
+
"updated_at": "2013-11-12T18:07:34Z",
|
28
|
+
"_links": {
|
29
|
+
"self": {
|
30
|
+
"href": "/api/v2/articles/1",
|
31
|
+
"class": "article"
|
32
|
+
},
|
33
|
+
"topic": {
|
34
|
+
"href": "/api/v2/topics/1",
|
35
|
+
"class": "topic"
|
36
|
+
},
|
37
|
+
"translations": {
|
38
|
+
"href": "/api/v2/articles/1/translations",
|
39
|
+
"class": "article_translation"
|
40
|
+
},
|
41
|
+
"created_by": {
|
42
|
+
"href": "/api/v2/users/1",
|
43
|
+
"class": "user"
|
44
|
+
},
|
45
|
+
"updated_by": {
|
46
|
+
"href": "/api/v2/users/1",
|
47
|
+
"class": "user"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"locale": "en",
|
3
|
+
"subject": "Awesome Subject",
|
4
|
+
"body": "<p>Awesome apples</p>",
|
5
|
+
"body_email": "Email for Awesome apples",
|
6
|
+
"body_email_auto": true,
|
7
|
+
"body_chat": "Awesome apples",
|
8
|
+
"body_chat_auto": true,
|
9
|
+
"body_web_callback": "<p>Awesome Apples</p>",
|
10
|
+
"body_web_callback_auto": true,
|
11
|
+
"body_twitter": "Awesome apples",
|
12
|
+
"body_twitter_auto": true,
|
13
|
+
"body_qna": "Awesome apples",
|
14
|
+
"body_qna_auto": true,
|
15
|
+
"body_phone": "Awesome apples",
|
16
|
+
"body_phone_auto": true,
|
17
|
+
"body_facebook": "Awesome apples",
|
18
|
+
"body_facebook_auto": true,
|
19
|
+
"outdated": false,
|
20
|
+
"publish_at": "2013-11-22T22:54:20Z",
|
21
|
+
"created_at": "2013-11-22T22:49:20Z",
|
22
|
+
"updated_at": "2013-11-22T22:54:20Z",
|
23
|
+
"_links": {
|
24
|
+
"self": {
|
25
|
+
"href": "/api/v2/articles/1/translations/en",
|
26
|
+
"class": "article"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"locale": "es",
|
3
|
+
"subject": "Spanish Translation",
|
4
|
+
"body": "Traducción español aquí",
|
5
|
+
"body_email": "Traducción español aquí",
|
6
|
+
"body_email_auto": true,
|
7
|
+
"body_chat": "Traducción español aquí",
|
8
|
+
"body_chat_auto": true,
|
9
|
+
"body_web_callback": "Traducción español aquí",
|
10
|
+
"body_web_callback_auto": true,
|
11
|
+
"body_twitter": "Traducción español aquí",
|
12
|
+
"body_twitter_auto": true,
|
13
|
+
"body_qna": "Traducción español aquí",
|
14
|
+
"body_qna_auto": true,
|
15
|
+
"body_phone": "Traducción español aquí",
|
16
|
+
"body_phone_auto": true,
|
17
|
+
"body_facebook": "Traducción español aquí",
|
18
|
+
"body_facebook_auto": true,
|
19
|
+
"outdated": false,
|
20
|
+
"publish_at": "2013-11-22T22:54:20Z",
|
21
|
+
"created_at": "2013-11-22T22:49:20Z",
|
22
|
+
"updated_at": "2013-11-22T22:54:20Z",
|
23
|
+
"_links": {
|
24
|
+
"self": {
|
25
|
+
"href": "/api/v2/articles/1/translations/es",
|
26
|
+
"class": "article"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"locale": "es",
|
3
|
+
"subject": "Updated Spanish Translation",
|
4
|
+
"body": "Traducción español aquí",
|
5
|
+
"body_email": "Traducción español aquí",
|
6
|
+
"body_email_auto": true,
|
7
|
+
"body_chat": "Traducción español aquí",
|
8
|
+
"body_chat_auto": true,
|
9
|
+
"body_web_callback": "Traducción español aquí",
|
10
|
+
"body_web_callback_auto": true,
|
11
|
+
"body_twitter": "Traducción español aquí",
|
12
|
+
"body_twitter_auto": true,
|
13
|
+
"body_qna": "Traducción español aquí",
|
14
|
+
"body_qna_auto": true,
|
15
|
+
"body_phone": "Traducción español aquí",
|
16
|
+
"body_phone_auto": true,
|
17
|
+
"body_facebook": "Traducción español aquí",
|
18
|
+
"body_facebook_auto": true,
|
19
|
+
"outdated": false,
|
20
|
+
"publish_at": "2013-11-22T22:54:20Z",
|
21
|
+
"created_at": "2013-11-22T22:49:20Z",
|
22
|
+
"updated_at": "2013-11-22T22:54:20Z",
|
23
|
+
"_links": {
|
24
|
+
"self": {
|
25
|
+
"href": "/api/v2/articles/1/translations/es",
|
26
|
+
"class": "article"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
{
|
2
|
+
"total_entries": 2,
|
3
|
+
"_links": {
|
4
|
+
"self": {
|
5
|
+
"href": "/api/v2/articles/1/translations?page=1&per_page=50",
|
6
|
+
"class": "page"
|
7
|
+
},
|
8
|
+
"first": {
|
9
|
+
"href": "/api/v2/articles/1/translations?page=1&per_page=50",
|
10
|
+
"class": "page"
|
11
|
+
},
|
12
|
+
"last": {
|
13
|
+
"href": "/api/v2/articles/1/translations?page=1&per_page=50",
|
14
|
+
"class": "page"
|
15
|
+
},
|
16
|
+
"next": null,
|
17
|
+
"previous": null
|
18
|
+
},
|
19
|
+
"_embedded": {
|
20
|
+
"entries": [
|
21
|
+
{
|
22
|
+
"locale": "en",
|
23
|
+
"subject": "Awesome Subject",
|
24
|
+
"body": "<p>Awesome apples</p>",
|
25
|
+
"body_email": "Email for Awesome apples",
|
26
|
+
"body_email_auto": true,
|
27
|
+
"body_chat": "Awesome apples",
|
28
|
+
"body_chat_auto": true,
|
29
|
+
"body_web_callback": "<p>Awesome Apples</p>",
|
30
|
+
"body_web_callback_auto": true,
|
31
|
+
"body_twitter": "Awesome apples",
|
32
|
+
"body_twitter_auto": true,
|
33
|
+
"body_qna": "Awesome apples",
|
34
|
+
"body_qna_auto": true,
|
35
|
+
"body_phone": "Awesome apples",
|
36
|
+
"body_phone_auto": true,
|
37
|
+
"body_facebook": "Awesome apples",
|
38
|
+
"body_facebook_auto": true,
|
39
|
+
"outdated": false,
|
40
|
+
"publish_at": "2013-11-22T22:54:20Z",
|
41
|
+
"created_at": "2013-11-22T22:49:20Z",
|
42
|
+
"updated_at": "2013-11-22T22:54:20Z",
|
43
|
+
"_links": {
|
44
|
+
"self": {
|
45
|
+
"href": "/api/v2/articles/1/translations/en",
|
46
|
+
"class": "article"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"locale": "es",
|
52
|
+
"subject": "Spanish Translation",
|
53
|
+
"body": "Traducción español aquí",
|
54
|
+
"body_email": "Traducción español aquí",
|
55
|
+
"body_email_auto": true,
|
56
|
+
"body_chat": "Traducción español aquí",
|
57
|
+
"body_chat_auto": true,
|
58
|
+
"body_web_callback": "Traducción español aquí",
|
59
|
+
"body_web_callback_auto": true,
|
60
|
+
"body_twitter": "Traducción español aquí",
|
61
|
+
"body_twitter_auto": true,
|
62
|
+
"body_qna": "Traducción español aquí",
|
63
|
+
"body_qna_auto": true,
|
64
|
+
"body_phone": "Traducción español aquí",
|
65
|
+
"body_phone_auto": true,
|
66
|
+
"body_facebook": "Traducción español aquí",
|
67
|
+
"body_facebook_auto": true,
|
68
|
+
"outdated": false,
|
69
|
+
"publish_at": "2013-11-22T22:54:20Z",
|
70
|
+
"created_at": "2013-11-22T22:49:20Z",
|
71
|
+
"updated_at": "2013-11-22T22:54:20Z",
|
72
|
+
"_links": {
|
73
|
+
"self": {
|
74
|
+
"href": "/api/v2/articles/1/translations/es",
|
75
|
+
"class": "article"
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
]
|
80
|
+
}
|
81
|
+
}
|