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,69 @@
|
|
1
|
+
{
|
2
|
+
"total_entries": 2,
|
3
|
+
"_links": {
|
4
|
+
"self": {
|
5
|
+
"href": "/api/v2/topics?page=1&per_page=30",
|
6
|
+
"class": "page"
|
7
|
+
},
|
8
|
+
"first": {
|
9
|
+
"href": "/api/v2/topics?page=1&per_page=30",
|
10
|
+
"class": "page"
|
11
|
+
},
|
12
|
+
"last": {
|
13
|
+
"href": "/api/v2/topics?page=1&per_page=30",
|
14
|
+
"class": "page"
|
15
|
+
},
|
16
|
+
"next": null,
|
17
|
+
"previous": null
|
18
|
+
},
|
19
|
+
"_embedded": {
|
20
|
+
"entries": [
|
21
|
+
{
|
22
|
+
"name": "Customer Support",
|
23
|
+
"description": "This is key to going from good to great",
|
24
|
+
"position": 1,
|
25
|
+
"allow_questions": true,
|
26
|
+
"in_support_center": true,
|
27
|
+
"created_at": "2013-11-12T22:59:20Z",
|
28
|
+
"updated_at": "2013-11-17T22:59:20Z",
|
29
|
+
"_links": {
|
30
|
+
"self": {
|
31
|
+
"href": "/api/v2/topics/1",
|
32
|
+
"class": "topic"
|
33
|
+
},
|
34
|
+
"articles": {
|
35
|
+
"href": "/api/v2/topics/1/articles",
|
36
|
+
"class": "article"
|
37
|
+
},
|
38
|
+
"translations": {
|
39
|
+
"href": "/api/v2/topics/1/translations",
|
40
|
+
"class": "topic_translation"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "Another Topic",
|
46
|
+
"description": "Not the first one, but another one!",
|
47
|
+
"position": 2,
|
48
|
+
"allow_questions": true,
|
49
|
+
"in_support_center": true,
|
50
|
+
"created_at": "2013-11-12T22:59:20Z",
|
51
|
+
"updated_at": "2013-11-17T22:59:20Z",
|
52
|
+
"_links": {
|
53
|
+
"self": {
|
54
|
+
"href": "/api/v2/topics/2",
|
55
|
+
"class": "topic"
|
56
|
+
},
|
57
|
+
"articles": {
|
58
|
+
"href": "/api/v2/topics/1/articles",
|
59
|
+
"class": "article"
|
60
|
+
},
|
61
|
+
"translations": {
|
62
|
+
"href": "/api/v2/topics/1/translations",
|
63
|
+
"class": "topic_translation"
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
]
|
68
|
+
}
|
69
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"handle": "desk_dev",
|
3
|
+
"name": "Desk.com Development",
|
4
|
+
"profile_image": "http://www.example.com/image.png",
|
5
|
+
"active": true,
|
6
|
+
"created_at": "2013-05-22T21:59:20Z",
|
7
|
+
"updated_at": "2013-06-22T21:59:20Z",
|
8
|
+
"_links": {
|
9
|
+
"self": {
|
10
|
+
"href": "/api/v2/twitter_accounts/1",
|
11
|
+
"class": "twitter_account"
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"body": "Example tweet",
|
3
|
+
"direction": "out",
|
4
|
+
"type": "mention",
|
5
|
+
"status": "sent",
|
6
|
+
"to": null,
|
7
|
+
"from": "desk_dev",
|
8
|
+
"created_at": "2013-11-22T17:59:20Z",
|
9
|
+
"updated_at": "2013-11-22T17:59:20Z",
|
10
|
+
"_links": {
|
11
|
+
"self": {
|
12
|
+
"href": "/api/v2/twitter_accounts/1/tweets/1",
|
13
|
+
"class": "tweet"
|
14
|
+
},
|
15
|
+
"twitter_account": {
|
16
|
+
"href": "/api/v2/twitter_accounts/1",
|
17
|
+
"class": "twitter_account"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"body": "Example tweet",
|
3
|
+
"direction": "out",
|
4
|
+
"type": "mention",
|
5
|
+
"status": "sent",
|
6
|
+
"to": null,
|
7
|
+
"from": "desk_dev",
|
8
|
+
"created_at": "2013-11-22T17:59:20Z",
|
9
|
+
"updated_at": "2013-11-22T17:59:20Z",
|
10
|
+
"_links": {
|
11
|
+
"self": {
|
12
|
+
"href": "/api/v2/twitter_accounts/1/tweets/1",
|
13
|
+
"class": "tweet"
|
14
|
+
},
|
15
|
+
"twitter_account": {
|
16
|
+
"href": "/api/v2/twitter_accounts/1",
|
17
|
+
"class": "twitter_account"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"total_entries": 2,
|
3
|
+
"_links": {
|
4
|
+
"self": {
|
5
|
+
"href": "/api/v2/tweets?page=1&per_page=30",
|
6
|
+
"class": "page"
|
7
|
+
},
|
8
|
+
"first": {
|
9
|
+
"href": "/api/v2/tweets?page=1&per_page=30",
|
10
|
+
"class": "page"
|
11
|
+
},
|
12
|
+
"last": {
|
13
|
+
"href": "/api/v2/tweets?page=1&per_page=30",
|
14
|
+
"class": "page"
|
15
|
+
},
|
16
|
+
"next": null,
|
17
|
+
"previous": null
|
18
|
+
},
|
19
|
+
"_embedded": {
|
20
|
+
"entries": [
|
21
|
+
{
|
22
|
+
"body": "Example tweet",
|
23
|
+
"direction": "out",
|
24
|
+
"type": "mention",
|
25
|
+
"status": "sent",
|
26
|
+
"to": null,
|
27
|
+
"from": "desk_dev",
|
28
|
+
"created_at": "2013-11-22T17:59:20Z",
|
29
|
+
"updated_at": "2013-11-22T17:59:20Z",
|
30
|
+
"_links": {
|
31
|
+
"self": {
|
32
|
+
"href": "/api/v2/twitter_accounts/1/tweets/1",
|
33
|
+
"class": "tweet"
|
34
|
+
},
|
35
|
+
"twitter_account": {
|
36
|
+
"href": "/api/v2/twitter_accounts/1",
|
37
|
+
"class": "twitter_account"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"body": "we're checking out your API examples @desk_dev",
|
43
|
+
"direction": "out",
|
44
|
+
"type": "mention",
|
45
|
+
"status": "sent",
|
46
|
+
"to": null,
|
47
|
+
"from": "desk_dev",
|
48
|
+
"created_at": "2013-11-22T17:59:20Z",
|
49
|
+
"updated_at": "2013-11-22T17:59:20Z",
|
50
|
+
"_links": {
|
51
|
+
"self": {
|
52
|
+
"href": "/api/v2/twitter_accounts/1/tweets/2",
|
53
|
+
"class": "tweet"
|
54
|
+
},
|
55
|
+
"twitter_account": {
|
56
|
+
"href": "/api/v2/twitter_accounts/1",
|
57
|
+
"class": "twitter_account"
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
]
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"total_entries": 2,
|
3
|
+
"_links": {
|
4
|
+
"self": {
|
5
|
+
"href": "/api/v2/twitter_accounts?page=1&per_page=30",
|
6
|
+
"class": "page"
|
7
|
+
},
|
8
|
+
"first": {
|
9
|
+
"href": "/api/v2/twitter_accounts?page=1&per_page=30",
|
10
|
+
"class": "page"
|
11
|
+
},
|
12
|
+
"last": {
|
13
|
+
"href": "/api/v2/twitter_accounts?page=1&per_page=30",
|
14
|
+
"class": "page"
|
15
|
+
},
|
16
|
+
"next": null,
|
17
|
+
"previous": null
|
18
|
+
},
|
19
|
+
"_embedded": {
|
20
|
+
"entries": [
|
21
|
+
{
|
22
|
+
"handle": "desk_dev",
|
23
|
+
"name": "Desk.com Development",
|
24
|
+
"profile_image": "http://www.example.com/image.png",
|
25
|
+
"active": true,
|
26
|
+
"created_at": "2013-05-22T21:59:20Z",
|
27
|
+
"updated_at": "2013-06-22T21:59:20Z",
|
28
|
+
"_links": {
|
29
|
+
"self": {
|
30
|
+
"href": "/api/v2/twitter_accounts/1",
|
31
|
+
"class": "twitter_account"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"handle": "desk_ops",
|
37
|
+
"name": "Desk.com Operations",
|
38
|
+
"profile_image": "http://www.example.com/image.png",
|
39
|
+
"active": true,
|
40
|
+
"created_at": "2013-05-22T21:59:20Z",
|
41
|
+
"updated_at": "2013-06-22T21:59:20Z",
|
42
|
+
"_links": {
|
43
|
+
"self": {
|
44
|
+
"href": "/api/v2/twitter_accounts/2",
|
45
|
+
"class": "twitter_account"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
]
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"handle": "desk_dev",
|
3
|
+
"image_url": "http://example.com/image.png",
|
4
|
+
"followers_count": "123",
|
5
|
+
"verified": false,
|
6
|
+
"created_at": "2013-11-22T22:49:20Z",
|
7
|
+
"updated_at": "2013-11-22T22:49:20Z",
|
8
|
+
"_links": {
|
9
|
+
"self": {
|
10
|
+
"href": "/api/v2/twitter_users/1",
|
11
|
+
"class": "twitter_user"
|
12
|
+
},
|
13
|
+
"customer": {
|
14
|
+
"href": "/api/v2/customers/1",
|
15
|
+
"class": "customer"
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"handle": "desk_dev",
|
3
|
+
"image_url": "http://example.com/image.png",
|
4
|
+
"followers_count": "123",
|
5
|
+
"verified": false,
|
6
|
+
"created_at": "2013-11-22T22:49:20Z",
|
7
|
+
"updated_at": "2013-11-22T22:49:20Z",
|
8
|
+
"_links": {
|
9
|
+
"self": {
|
10
|
+
"href": "/api/v2/twitter_users/1",
|
11
|
+
"class": "twitter_user"
|
12
|
+
},
|
13
|
+
"customer": {
|
14
|
+
"href": "/api/v2/customers/1",
|
15
|
+
"class": "customer"
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"total_entries": 2,
|
3
|
+
"_links": {
|
4
|
+
"self": {
|
5
|
+
"href": "/api/v2/twitter_users?page=1&per_page=30",
|
6
|
+
"class": "page"
|
7
|
+
},
|
8
|
+
"first": {
|
9
|
+
"href": "/api/v2/twitter_users?page=1&per_page=30",
|
10
|
+
"class": "page"
|
11
|
+
},
|
12
|
+
"last": {
|
13
|
+
"href": "/api/v2/twitter_users?page=1&per_page=30",
|
14
|
+
"class": "page"
|
15
|
+
},
|
16
|
+
"next": null,
|
17
|
+
"previous": null
|
18
|
+
},
|
19
|
+
"_embedded": {
|
20
|
+
"entries": [
|
21
|
+
{
|
22
|
+
"handle": "desk_dev",
|
23
|
+
"image_url": "http://example.com/image.png",
|
24
|
+
"followers_count": "123",
|
25
|
+
"verified": false,
|
26
|
+
"created_at": "2013-11-22T22:49:20Z",
|
27
|
+
"updated_at": "2013-11-22T22:49:20Z",
|
28
|
+
"_links": {
|
29
|
+
"self": {
|
30
|
+
"href": "/api/v2/twitter_users/1",
|
31
|
+
"class": "twitter_user"
|
32
|
+
},
|
33
|
+
"customer": {
|
34
|
+
"href": "/api/v2/customers/1",
|
35
|
+
"class": "customer"
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"handle": "desk",
|
41
|
+
"image_url": "http://example.com/image.png",
|
42
|
+
"followers_count": "123",
|
43
|
+
"verified": false,
|
44
|
+
"created_at": "2013-11-22T22:49:20Z",
|
45
|
+
"updated_at": "2013-11-22T22:49:20Z",
|
46
|
+
"_links": {
|
47
|
+
"self": {
|
48
|
+
"href": "/api/v2/twitter_users/2",
|
49
|
+
"class": "twitter_user"
|
50
|
+
},
|
51
|
+
"customer": {
|
52
|
+
"href": "/api/v2/customers/2",
|
53
|
+
"class": "customer"
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
]
|
58
|
+
}
|
59
|
+
}
|
data/spec/fixtures/user
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"name": "John Doe",
|
3
|
+
"public_name": "John Doe",
|
4
|
+
"email": "john@acme.com",
|
5
|
+
"level": "agent",
|
6
|
+
"created_at": "2012-11-22T22:59:20Z",
|
7
|
+
"updated_at": "2013-11-15T22:59:20Z",
|
8
|
+
"current_login_at": "2013-11-21T22:59:20Z",
|
9
|
+
"last_login_at": "2013-11-15T22:59:20Z",
|
10
|
+
"_links": {
|
11
|
+
"self": {
|
12
|
+
"href": "/api/v2/users/1",
|
13
|
+
"class": "user"
|
14
|
+
},
|
15
|
+
"preferences": {
|
16
|
+
"href": "/api/v2/users/1/preferences",
|
17
|
+
"class": "user_preference"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"name": "enable_routing_filter_on_login",
|
3
|
+
"value": "12",
|
4
|
+
"_links": {
|
5
|
+
"self": {
|
6
|
+
"href": "/api/v2/users/1/preferences/1",
|
7
|
+
"class": "user_preference"
|
8
|
+
},
|
9
|
+
"user": {
|
10
|
+
"href": "/api/v2/users/1",
|
11
|
+
"class": "user"
|
12
|
+
},
|
13
|
+
"filter": {
|
14
|
+
"href": "/api/v2/filters/12",
|
15
|
+
"class": "filter"
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,223 @@
|
|
1
|
+
{
|
2
|
+
"total_entries": 14,
|
3
|
+
"_links": {
|
4
|
+
"self": {
|
5
|
+
"href": "/api/v2/users/1/preferences?page=1&per_page=50",
|
6
|
+
"class": "page"
|
7
|
+
},
|
8
|
+
"first": {
|
9
|
+
"href": "/api/v2/users/1/preferences?page=1&per_page=50",
|
10
|
+
"class": "page"
|
11
|
+
},
|
12
|
+
"last": {
|
13
|
+
"href": "/api/v2/users/1/preferences?page=1&per_page=50",
|
14
|
+
"class": "page"
|
15
|
+
},
|
16
|
+
"previous": null,
|
17
|
+
"next": null
|
18
|
+
},
|
19
|
+
"_embedded": {
|
20
|
+
"entries": [
|
21
|
+
{
|
22
|
+
"name": "enable_routing_filter_on_login",
|
23
|
+
"value": "12",
|
24
|
+
"_links": {
|
25
|
+
"self": {
|
26
|
+
"href": "/api/v2/users/1/preferences/1",
|
27
|
+
"class": "user_preference"
|
28
|
+
},
|
29
|
+
"user": {
|
30
|
+
"href": "/api/v2/users/1",
|
31
|
+
"class": "user"
|
32
|
+
},
|
33
|
+
"filter": {
|
34
|
+
"href": "/api/v2/filters/12",
|
35
|
+
"class": "filter"
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"name": "scroll_to_bottom_on_open",
|
41
|
+
"value": "1",
|
42
|
+
"_links": {
|
43
|
+
"self": {
|
44
|
+
"href": "/api/v2/users/1/preferences/2",
|
45
|
+
"class": "user_preference"
|
46
|
+
},
|
47
|
+
"user": {
|
48
|
+
"href": "/api/v2/users/1",
|
49
|
+
"class": "user"
|
50
|
+
}
|
51
|
+
}
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"name": "auto_accept_on_route",
|
55
|
+
"value": false,
|
56
|
+
"_links": {
|
57
|
+
"self": {
|
58
|
+
"href": "/api/v2/users/1/preferences/3",
|
59
|
+
"class": "user_preference"
|
60
|
+
},
|
61
|
+
"user": {
|
62
|
+
"href": "/api/v2/users/1",
|
63
|
+
"class": "user"
|
64
|
+
}
|
65
|
+
}
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"name": "case_filter_view",
|
69
|
+
"value": "200",
|
70
|
+
"_links": {
|
71
|
+
"self": {
|
72
|
+
"href": "/api/v2/users/1/preferences/4",
|
73
|
+
"class": "user_preference"
|
74
|
+
},
|
75
|
+
"user": {
|
76
|
+
"href": "/api/v2/users/1",
|
77
|
+
"class": "user"
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"name": "warn_onbeforeunload",
|
83
|
+
"value": false,
|
84
|
+
"_links": {
|
85
|
+
"self": {
|
86
|
+
"href": "/api/v2/users/1/preferences/5",
|
87
|
+
"class": "user_preference"
|
88
|
+
},
|
89
|
+
"user": {
|
90
|
+
"href": "/api/v2/users/1",
|
91
|
+
"class": "user"
|
92
|
+
}
|
93
|
+
}
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"name": "screenpop_sound",
|
97
|
+
"value": "80",
|
98
|
+
"_links": {
|
99
|
+
"self": {
|
100
|
+
"href": "/api/v2/users/1/preferences/6",
|
101
|
+
"class": "user_preference"
|
102
|
+
},
|
103
|
+
"user": {
|
104
|
+
"href": "/api/v2/users/1",
|
105
|
+
"class": "user"
|
106
|
+
}
|
107
|
+
}
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"name": "screenpop_sound_repeat_enabled",
|
111
|
+
"value": false,
|
112
|
+
"_links": {
|
113
|
+
"self": {
|
114
|
+
"href": "/api/v2/users/1/preferences/7",
|
115
|
+
"class": "user_preference"
|
116
|
+
},
|
117
|
+
"user": {
|
118
|
+
"href": "/api/v2/users/1",
|
119
|
+
"class": "user"
|
120
|
+
}
|
121
|
+
}
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"name": "inactivity_sound",
|
125
|
+
"value": "10",
|
126
|
+
"_links": {
|
127
|
+
"self": {
|
128
|
+
"href": "/api/v2/users/1/preferences/8",
|
129
|
+
"class": "user_preference"
|
130
|
+
},
|
131
|
+
"user": {
|
132
|
+
"href": "/api/v2/users/1",
|
133
|
+
"class": "user"
|
134
|
+
}
|
135
|
+
}
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"name": "inactivity_sound_repeat_enabled",
|
139
|
+
"value": false,
|
140
|
+
"_links": {
|
141
|
+
"self": {
|
142
|
+
"href": "/api/v2/users/1/preferences/9",
|
143
|
+
"class": "user_preference"
|
144
|
+
},
|
145
|
+
"user": {
|
146
|
+
"href": "/api/v2/users/1",
|
147
|
+
"class": "user"
|
148
|
+
}
|
149
|
+
}
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"name": "new_chat_message_sound",
|
153
|
+
"value": "70",
|
154
|
+
"_links": {
|
155
|
+
"self": {
|
156
|
+
"href": "/api/v2/users/1/preferences/10",
|
157
|
+
"class": "user_preference"
|
158
|
+
},
|
159
|
+
"user": {
|
160
|
+
"href": "/api/v2/users/1",
|
161
|
+
"class": "user"
|
162
|
+
}
|
163
|
+
}
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"name": "confirm_on_short_replies",
|
167
|
+
"value": true,
|
168
|
+
"_links": {
|
169
|
+
"self": {
|
170
|
+
"href": "/api/v2/users/1/preferences/11",
|
171
|
+
"class": "user_preference"
|
172
|
+
},
|
173
|
+
"user": {
|
174
|
+
"href": "/api/v2/users/1",
|
175
|
+
"class": "user"
|
176
|
+
}
|
177
|
+
}
|
178
|
+
},
|
179
|
+
{
|
180
|
+
"name": "case_default_view",
|
181
|
+
"value": "-1",
|
182
|
+
"_links": {
|
183
|
+
"self": {
|
184
|
+
"href": "/api/v2/users/1/preferences/12",
|
185
|
+
"class": "user_preference"
|
186
|
+
},
|
187
|
+
"user": {
|
188
|
+
"href": "/api/v2/users/1",
|
189
|
+
"class": "user"
|
190
|
+
}
|
191
|
+
}
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"name": "show_labels_in_case_filter_view",
|
195
|
+
"value": true,
|
196
|
+
"_links": {
|
197
|
+
"self": {
|
198
|
+
"href": "/api/v2/users/1/preferences/13",
|
199
|
+
"class": "user_preference"
|
200
|
+
},
|
201
|
+
"user": {
|
202
|
+
"href": "/api/v2/users/1",
|
203
|
+
"class": "user"
|
204
|
+
}
|
205
|
+
}
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"name": "bulk_case_filter_manage_confirm",
|
209
|
+
"value": true,
|
210
|
+
"_links": {
|
211
|
+
"self": {
|
212
|
+
"href": "/api/v2/users/1/preferences/14",
|
213
|
+
"class": "user_preference"
|
214
|
+
},
|
215
|
+
"user": {
|
216
|
+
"href": "/api/v2/users/1",
|
217
|
+
"class": "user"
|
218
|
+
}
|
219
|
+
}
|
220
|
+
}
|
221
|
+
]
|
222
|
+
}
|
223
|
+
}
|