discourse_api 0.11.0 → 0.12.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.
- checksums.yaml +4 -4
- data/.gitignore +21 -21
- data/.travis.yml +5 -5
- data/CHANGELOG.md +105 -99
- data/Gemfile +4 -4
- data/Guardfile +5 -5
- data/LICENSE.txt +22 -22
- data/README.md +73 -73
- data/Rakefile +7 -7
- data/discourse_api.gemspec +35 -35
- data/examples/backups.rb +18 -18
- data/examples/category.rb +21 -21
- data/examples/change_topic_status.rb +33 -33
- data/examples/create_topic.rb +23 -23
- data/examples/create_user.rb +14 -14
- data/examples/dashboard.rb +13 -13
- data/examples/disposable_invite_tokens.rb +18 -18
- data/examples/example.rb +9 -9
- data/examples/groups.rb +25 -25
- data/examples/invite_users.rb +15 -15
- data/examples/post_action.rb +25 -25
- data/examples/search.rb +9 -9
- data/examples/sso.rb +14 -14
- data/examples/topic_lists.rb +15 -15
- data/examples/update_user.rb +22 -22
- data/lib/discourse_api.rb +5 -5
- data/lib/discourse_api/api/api_key.rb +31 -31
- data/lib/discourse_api/api/backups.rb +24 -24
- data/lib/discourse_api/api/badges.rb +28 -28
- data/lib/discourse_api/api/categories.rb +57 -57
- data/lib/discourse_api/api/dashboard.rb +24 -24
- data/lib/discourse_api/api/email.rb +15 -15
- data/lib/discourse_api/api/groups.rb +52 -52
- data/lib/discourse_api/api/invite.rb +17 -17
- data/lib/discourse_api/api/notifications.rb +9 -9
- data/lib/discourse_api/api/params.rb +55 -55
- data/lib/discourse_api/api/posts.rb +41 -41
- data/lib/discourse_api/api/private_messages.rb +10 -10
- data/lib/discourse_api/api/search.rb +19 -19
- data/lib/discourse_api/api/sso.rb +22 -22
- data/lib/discourse_api/api/tags.rb +10 -10
- data/lib/discourse_api/api/topics.rb +78 -78
- data/lib/discourse_api/api/users.rb +93 -85
- data/lib/discourse_api/client.rb +133 -133
- data/lib/discourse_api/error.rb +17 -17
- data/lib/discourse_api/single_sign_on.rb +110 -110
- data/lib/discourse_api/version.rb +3 -3
- data/routes.txt +203 -203
- data/spec/discourse_api/api/api_key_spec.rb +121 -121
- data/spec/discourse_api/api/backups_spec.rb +23 -23
- data/spec/discourse_api/api/badges_spec.rb +40 -40
- data/spec/discourse_api/api/categories_spec.rb +87 -87
- data/spec/discourse_api/api/email_spec.rb +39 -39
- data/spec/discourse_api/api/groups_spec.rb +94 -94
- data/spec/discourse_api/api/notifications_spec.rb +24 -24
- data/spec/discourse_api/api/params_spec.rb +32 -32
- data/spec/discourse_api/api/posts_spec.rb +41 -41
- data/spec/discourse_api/api/private_messages_spec.rb +22 -22
- data/spec/discourse_api/api/search_spec.rb +30 -30
- data/spec/discourse_api/api/sso_spec.rb +16 -16
- data/spec/discourse_api/api/topics_spec.rb +113 -113
- data/spec/discourse_api/api/users_spec.rb +255 -227
- data/spec/discourse_api/client_spec.rb +115 -115
- data/spec/fixtures/api.json +12 -12
- data/spec/fixtures/backups.json +12 -12
- data/spec/fixtures/badges.json +569 -569
- data/spec/fixtures/categories.json +72 -72
- data/spec/fixtures/category_latest_topics.json +92 -92
- data/spec/fixtures/category_topics.json +91 -91
- data/spec/fixtures/email_list_all.json +749 -749
- data/spec/fixtures/email_settings.json +13 -13
- data/spec/fixtures/generate_api_key.json +12 -12
- data/spec/fixtures/generate_master_key.json +7 -7
- data/spec/fixtures/groups.json +18 -18
- data/spec/fixtures/hot.json +113 -113
- data/spec/fixtures/latest.json +115 -115
- data/spec/fixtures/members_0.json +403 -403
- data/spec/fixtures/members_1.json +363 -363
- data/spec/fixtures/new.json +113 -113
- data/spec/fixtures/notifications.json +16 -16
- data/spec/fixtures/post.json +94 -94
- data/spec/fixtures/post_action_users.json +18 -18
- data/spec/fixtures/private_messages.json +69 -69
- data/spec/fixtures/regenerate_api_key.json +7 -7
- data/spec/fixtures/search.json +24 -24
- data/spec/fixtures/topic.json +739 -739
- data/spec/fixtures/topic_invite_user.json +3 -3
- data/spec/fixtures/topics_created_by.json +49 -49
- data/spec/fixtures/update_trust_level.json +37 -37
- data/spec/fixtures/upload_avatar.json +13 -13
- data/spec/fixtures/user.json +65 -65
- data/spec/fixtures/user_activate_success.json +3 -3
- data/spec/fixtures/user_badges.json +170 -170
- data/spec/fixtures/user_create_success.json +5 -5
- data/spec/fixtures/user_grant_admin.json +37 -37
- data/spec/fixtures/user_list.json +583 -583
- data/spec/fixtures/user_log_out_success.json +3 -3
- data/spec/fixtures/user_update_avatar_success.json +3 -3
- data/spec/fixtures/user_update_user.json +3 -3
- data/spec/fixtures/user_update_username.json +4 -4
- data/spec/spec_helper.rb +61 -61
- metadata +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"success": true
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"success": true
|
|
3
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"users": [
|
|
3
|
-
{
|
|
4
|
-
"id": 1,
|
|
5
|
-
"username": "test_user",
|
|
6
|
-
"avatar_template": "//www.gravatar.com/avatar/test.png?s={size}&r=pg&d=identicon"
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"topic_list": {
|
|
10
|
-
"can_create_topic": true,
|
|
11
|
-
"draft": null,
|
|
12
|
-
"draft_key": "new_topic",
|
|
13
|
-
"draft_sequence": 0,
|
|
14
|
-
"topics": [
|
|
15
|
-
{
|
|
16
|
-
"id": 1,
|
|
17
|
-
"title": "Test topic #1",
|
|
18
|
-
"fancy_title": "Test topic #1",
|
|
19
|
-
"slug": "test-topic-1",
|
|
20
|
-
"posts_count": 1,
|
|
21
|
-
"reply_count": 0,
|
|
22
|
-
"highest_post_number": 1,
|
|
23
|
-
"image_url": null,
|
|
24
|
-
"created_at": "2013-07-22T19:27:14.818-04:00",
|
|
25
|
-
"last_posted_at": "2013-07-22T19:41:49.768-04:00",
|
|
26
|
-
"bumped": true,
|
|
27
|
-
"bumped_at": "2013-07-22T19:41:49.768-04:00",
|
|
28
|
-
"unseen": false,
|
|
29
|
-
"pinned": false,
|
|
30
|
-
"visible": true,
|
|
31
|
-
"closed": false,
|
|
32
|
-
"archived": false,
|
|
33
|
-
"views": 68,
|
|
34
|
-
"like_count": 0,
|
|
35
|
-
"has_best_of": false,
|
|
36
|
-
"archetype": "regular",
|
|
37
|
-
"last_poster_username": "test_user",
|
|
38
|
-
"category_id": 1,
|
|
39
|
-
"posters": [
|
|
40
|
-
{
|
|
41
|
-
"extras": null,
|
|
42
|
-
"description": "Original Poster, Most Recent Poster",
|
|
43
|
-
"user_id": 1
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"users": [
|
|
3
|
+
{
|
|
4
|
+
"id": 1,
|
|
5
|
+
"username": "test_user",
|
|
6
|
+
"avatar_template": "//www.gravatar.com/avatar/test.png?s={size}&r=pg&d=identicon"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"topic_list": {
|
|
10
|
+
"can_create_topic": true,
|
|
11
|
+
"draft": null,
|
|
12
|
+
"draft_key": "new_topic",
|
|
13
|
+
"draft_sequence": 0,
|
|
14
|
+
"topics": [
|
|
15
|
+
{
|
|
16
|
+
"id": 1,
|
|
17
|
+
"title": "Test topic #1",
|
|
18
|
+
"fancy_title": "Test topic #1",
|
|
19
|
+
"slug": "test-topic-1",
|
|
20
|
+
"posts_count": 1,
|
|
21
|
+
"reply_count": 0,
|
|
22
|
+
"highest_post_number": 1,
|
|
23
|
+
"image_url": null,
|
|
24
|
+
"created_at": "2013-07-22T19:27:14.818-04:00",
|
|
25
|
+
"last_posted_at": "2013-07-22T19:41:49.768-04:00",
|
|
26
|
+
"bumped": true,
|
|
27
|
+
"bumped_at": "2013-07-22T19:41:49.768-04:00",
|
|
28
|
+
"unseen": false,
|
|
29
|
+
"pinned": false,
|
|
30
|
+
"visible": true,
|
|
31
|
+
"closed": false,
|
|
32
|
+
"archived": false,
|
|
33
|
+
"views": 68,
|
|
34
|
+
"like_count": 0,
|
|
35
|
+
"has_best_of": false,
|
|
36
|
+
"archetype": "regular",
|
|
37
|
+
"last_poster_username": "test_user",
|
|
38
|
+
"category_id": 1,
|
|
39
|
+
"posters": [
|
|
40
|
+
{
|
|
41
|
+
"extras": null,
|
|
42
|
+
"description": "Original Poster, Most Recent Poster",
|
|
43
|
+
"user_id": 1
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"admin_user": {
|
|
3
|
-
"id": 2,
|
|
4
|
-
"username": "robin",
|
|
5
|
-
"uploaded_avatar_id": 3,
|
|
6
|
-
"avatar_template": "/user_avatar/localhost/robin/{size}/3.png",
|
|
7
|
-
"active": true,
|
|
8
|
-
"admin": false,
|
|
9
|
-
"moderator": false,
|
|
10
|
-
"last_seen_at": "2014-09-19T13:00:20.939Z",
|
|
11
|
-
"last_emailed_at": "2015-01-01T01:01:24.438Z",
|
|
12
|
-
"created_at": "2014-09-13T14:27:07.352Z",
|
|
13
|
-
"last_seen_age": "4mon",
|
|
14
|
-
"last_emailed_age": "13d",
|
|
15
|
-
"created_at_age": "4mon",
|
|
16
|
-
"username_lower": "robin",
|
|
17
|
-
"trust_level": 2,
|
|
18
|
-
"trust_level_locked": false,
|
|
19
|
-
"flag_level": 0,
|
|
20
|
-
"title": null,
|
|
21
|
-
"suspended_at": null,
|
|
22
|
-
"suspended_till": null,
|
|
23
|
-
"suspended": null,
|
|
24
|
-
"blocked": false,
|
|
25
|
-
"time_read": "< 1m",
|
|
26
|
-
"days_visited": 3,
|
|
27
|
-
"posts_read_count": 2,
|
|
28
|
-
"topics_entered": 2,
|
|
29
|
-
"post_count": 0,
|
|
30
|
-
"can_send_activation_email": true,
|
|
31
|
-
"can_activate": false,
|
|
32
|
-
"can_deactivate": true,
|
|
33
|
-
"ip_address": "127.0.0.1",
|
|
34
|
-
"registration_ip_address": "127.0.0.1",
|
|
35
|
-
"single_sign_on_record": null
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"admin_user": {
|
|
3
|
+
"id": 2,
|
|
4
|
+
"username": "robin",
|
|
5
|
+
"uploaded_avatar_id": 3,
|
|
6
|
+
"avatar_template": "/user_avatar/localhost/robin/{size}/3.png",
|
|
7
|
+
"active": true,
|
|
8
|
+
"admin": false,
|
|
9
|
+
"moderator": false,
|
|
10
|
+
"last_seen_at": "2014-09-19T13:00:20.939Z",
|
|
11
|
+
"last_emailed_at": "2015-01-01T01:01:24.438Z",
|
|
12
|
+
"created_at": "2014-09-13T14:27:07.352Z",
|
|
13
|
+
"last_seen_age": "4mon",
|
|
14
|
+
"last_emailed_age": "13d",
|
|
15
|
+
"created_at_age": "4mon",
|
|
16
|
+
"username_lower": "robin",
|
|
17
|
+
"trust_level": 2,
|
|
18
|
+
"trust_level_locked": false,
|
|
19
|
+
"flag_level": 0,
|
|
20
|
+
"title": null,
|
|
21
|
+
"suspended_at": null,
|
|
22
|
+
"suspended_till": null,
|
|
23
|
+
"suspended": null,
|
|
24
|
+
"blocked": false,
|
|
25
|
+
"time_read": "< 1m",
|
|
26
|
+
"days_visited": 3,
|
|
27
|
+
"posts_read_count": 2,
|
|
28
|
+
"topics_entered": 2,
|
|
29
|
+
"post_count": 0,
|
|
30
|
+
"can_send_activation_email": true,
|
|
31
|
+
"can_activate": false,
|
|
32
|
+
"can_deactivate": true,
|
|
33
|
+
"ip_address": "127.0.0.1",
|
|
34
|
+
"registration_ip_address": "127.0.0.1",
|
|
35
|
+
"single_sign_on_record": null
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": 11,
|
|
3
|
-
"user_id": 1,
|
|
4
|
-
"original_filename": "avatar.jpg",
|
|
5
|
-
"filesize": 86900,
|
|
6
|
-
"width": 360,
|
|
7
|
-
"height": 360,
|
|
8
|
-
"url": "/uploads/default/original/1X/417e624d2453925e6c68748b9aa67637c284b5aa.jpg",
|
|
9
|
-
"created_at": "2015-06-21T12:35:45.182Z",
|
|
10
|
-
"updated_at": "2015-06-21T12:35:45.195Z",
|
|
11
|
-
"sha1": "417e624d2453925e6c68748b9aa67637c284b5aa",
|
|
12
|
-
"origin": null,
|
|
13
|
-
"retain_hours": null
|
|
1
|
+
{
|
|
2
|
+
"id": 11,
|
|
3
|
+
"user_id": 1,
|
|
4
|
+
"original_filename": "avatar.jpg",
|
|
5
|
+
"filesize": 86900,
|
|
6
|
+
"width": 360,
|
|
7
|
+
"height": 360,
|
|
8
|
+
"url": "/uploads/default/original/1X/417e624d2453925e6c68748b9aa67637c284b5aa.jpg",
|
|
9
|
+
"created_at": "2015-06-21T12:35:45.182Z",
|
|
10
|
+
"updated_at": "2015-06-21T12:35:45.195Z",
|
|
11
|
+
"sha1": "417e624d2453925e6c68748b9aa67637c284b5aa",
|
|
12
|
+
"origin": null,
|
|
13
|
+
"retain_hours": null
|
|
14
14
|
}
|
data/spec/fixtures/user.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
{
|
|
2
|
-
"user_badges": [],
|
|
3
|
-
"user": {
|
|
4
|
-
"id": 1,
|
|
5
|
-
"username": "test_user",
|
|
6
|
-
"uploaded_avatar_id": null,
|
|
7
|
-
"avatar_template": "/letter_avatar/test/{size}/2.png",
|
|
8
|
-
"name": "Test User",
|
|
9
|
-
"email": "test_user@example.com",
|
|
10
|
-
"last_posted_at": null,
|
|
11
|
-
"last_seen_at": "2014-09-04T08:22:19.370-04:00",
|
|
12
|
-
"bio_cooked": null,
|
|
13
|
-
"created_at": "2014-09-04T08:04:25.104-04:00",
|
|
14
|
-
"can_edit": true,
|
|
15
|
-
"can_edit_username": true,
|
|
16
|
-
"can_edit_email": true,
|
|
17
|
-
"can_edit_name": true,
|
|
18
|
-
"stats": [
|
|
19
|
-
{
|
|
20
|
-
"action_type": 13,
|
|
21
|
-
"count": 1,
|
|
22
|
-
"id": null
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"can_send_private_message_to_user": true,
|
|
26
|
-
"bio_excerpt": "<div class='missing-profile'>test hasn't entered anything in the About Me field of their profile yet</div>",
|
|
27
|
-
"trust_level": 0,
|
|
28
|
-
"moderator": false,
|
|
29
|
-
"admin": false,
|
|
30
|
-
"title": null,
|
|
31
|
-
"badge_count": 0,
|
|
32
|
-
"has_title_badges": false,
|
|
33
|
-
"custom_fields": {},
|
|
34
|
-
"number_of_deleted_posts": 0,
|
|
35
|
-
"number_of_flagged_posts": 0,
|
|
36
|
-
"number_of_flags_given": 0,
|
|
37
|
-
"number_of_suspensions": 0,
|
|
38
|
-
"locale": null,
|
|
39
|
-
"email_digests": true,
|
|
40
|
-
"email_private_messages": true,
|
|
41
|
-
"email_direct": true,
|
|
42
|
-
"email_always": false,
|
|
43
|
-
"digest_after_days": 7,
|
|
44
|
-
"mailing_list_mode": false,
|
|
45
|
-
"auto_track_topics_after_msecs": 240000,
|
|
46
|
-
"new_topic_duration_minutes": 2880,
|
|
47
|
-
"external_links_in_new_tab": false,
|
|
48
|
-
"dynamic_favicon": false,
|
|
49
|
-
"enable_quoting": true,
|
|
50
|
-
"muted_category_ids": [],
|
|
51
|
-
"tracked_category_ids": [],
|
|
52
|
-
"watched_category_ids": [],
|
|
53
|
-
"private_messages_stats": {
|
|
54
|
-
"all": 1,
|
|
55
|
-
"mine": 0,
|
|
56
|
-
"unread": 0
|
|
57
|
-
},
|
|
58
|
-
"disable_jump_reply": false,
|
|
59
|
-
"gravatar_avatar_upload_id": null,
|
|
60
|
-
"custom_avatar_upload_id": null,
|
|
61
|
-
"invited_by": null,
|
|
62
|
-
"custom_groups": [],
|
|
63
|
-
"featured_user_badge_ids": []
|
|
64
|
-
}
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"user_badges": [],
|
|
3
|
+
"user": {
|
|
4
|
+
"id": 1,
|
|
5
|
+
"username": "test_user",
|
|
6
|
+
"uploaded_avatar_id": null,
|
|
7
|
+
"avatar_template": "/letter_avatar/test/{size}/2.png",
|
|
8
|
+
"name": "Test User",
|
|
9
|
+
"email": "test_user@example.com",
|
|
10
|
+
"last_posted_at": null,
|
|
11
|
+
"last_seen_at": "2014-09-04T08:22:19.370-04:00",
|
|
12
|
+
"bio_cooked": null,
|
|
13
|
+
"created_at": "2014-09-04T08:04:25.104-04:00",
|
|
14
|
+
"can_edit": true,
|
|
15
|
+
"can_edit_username": true,
|
|
16
|
+
"can_edit_email": true,
|
|
17
|
+
"can_edit_name": true,
|
|
18
|
+
"stats": [
|
|
19
|
+
{
|
|
20
|
+
"action_type": 13,
|
|
21
|
+
"count": 1,
|
|
22
|
+
"id": null
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"can_send_private_message_to_user": true,
|
|
26
|
+
"bio_excerpt": "<div class='missing-profile'>test hasn't entered anything in the About Me field of their profile yet</div>",
|
|
27
|
+
"trust_level": 0,
|
|
28
|
+
"moderator": false,
|
|
29
|
+
"admin": false,
|
|
30
|
+
"title": null,
|
|
31
|
+
"badge_count": 0,
|
|
32
|
+
"has_title_badges": false,
|
|
33
|
+
"custom_fields": {},
|
|
34
|
+
"number_of_deleted_posts": 0,
|
|
35
|
+
"number_of_flagged_posts": 0,
|
|
36
|
+
"number_of_flags_given": 0,
|
|
37
|
+
"number_of_suspensions": 0,
|
|
38
|
+
"locale": null,
|
|
39
|
+
"email_digests": true,
|
|
40
|
+
"email_private_messages": true,
|
|
41
|
+
"email_direct": true,
|
|
42
|
+
"email_always": false,
|
|
43
|
+
"digest_after_days": 7,
|
|
44
|
+
"mailing_list_mode": false,
|
|
45
|
+
"auto_track_topics_after_msecs": 240000,
|
|
46
|
+
"new_topic_duration_minutes": 2880,
|
|
47
|
+
"external_links_in_new_tab": false,
|
|
48
|
+
"dynamic_favicon": false,
|
|
49
|
+
"enable_quoting": true,
|
|
50
|
+
"muted_category_ids": [],
|
|
51
|
+
"tracked_category_ids": [],
|
|
52
|
+
"watched_category_ids": [],
|
|
53
|
+
"private_messages_stats": {
|
|
54
|
+
"all": 1,
|
|
55
|
+
"mine": 0,
|
|
56
|
+
"unread": 0
|
|
57
|
+
},
|
|
58
|
+
"disable_jump_reply": false,
|
|
59
|
+
"gravatar_avatar_upload_id": null,
|
|
60
|
+
"custom_avatar_upload_id": null,
|
|
61
|
+
"invited_by": null,
|
|
62
|
+
"custom_groups": [],
|
|
63
|
+
"featured_user_badge_ids": []
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"success": "OK"
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"success": "OK"
|
|
3
|
+
}
|
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
{
|
|
2
|
-
"user_badges": [
|
|
3
|
-
{
|
|
4
|
-
"id": 3,
|
|
5
|
-
"granted_at": "2014-11-30T14:27:19.404Z",
|
|
6
|
-
"badge_id": 10,
|
|
7
|
-
"user_id": 1,
|
|
8
|
-
"granted_by_id": -1
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 2,
|
|
12
|
-
"granted_at": "2014-09-16T13:08:23.061Z",
|
|
13
|
-
"post_id": 15,
|
|
14
|
-
"post_number": 1,
|
|
15
|
-
"badge_id": 5,
|
|
16
|
-
"user_id": 1,
|
|
17
|
-
"granted_by_id": -1,
|
|
18
|
-
"topic_id": 12
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"badges": [
|
|
22
|
-
{
|
|
23
|
-
"id": 10,
|
|
24
|
-
"name": "Editor",
|
|
25
|
-
"description": null,
|
|
26
|
-
"grant_count": 1,
|
|
27
|
-
"allow_title": false,
|
|
28
|
-
"multiple_grant": false,
|
|
29
|
-
"icon": "fa-certificate",
|
|
30
|
-
"image": null,
|
|
31
|
-
"listable": true,
|
|
32
|
-
"enabled": true,
|
|
33
|
-
"badge_grouping_id": 2,
|
|
34
|
-
"system": true,
|
|
35
|
-
"badge_type_id": 3
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"id": 5,
|
|
39
|
-
"name": "Welcome",
|
|
40
|
-
"description": null,
|
|
41
|
-
"grant_count": 1,
|
|
42
|
-
"allow_title": false,
|
|
43
|
-
"multiple_grant": false,
|
|
44
|
-
"icon": "fa-certificate",
|
|
45
|
-
"image": null,
|
|
46
|
-
"listable": true,
|
|
47
|
-
"enabled": true,
|
|
48
|
-
"badge_grouping_id": 2,
|
|
49
|
-
"system": true,
|
|
50
|
-
"badge_type_id": 3
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"badge_types": [
|
|
54
|
-
{
|
|
55
|
-
"id": 3,
|
|
56
|
-
"name": "Bronze",
|
|
57
|
-
"sort_order": 7
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"users": [
|
|
61
|
-
{
|
|
62
|
-
"id": 1,
|
|
63
|
-
"username": "test_user",
|
|
64
|
-
"uploaded_avatar_id": 7,
|
|
65
|
-
"avatar_template": "/user_avatar/localhost/test_user/{size}/7.png"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"id": -1,
|
|
69
|
-
"username": "system",
|
|
70
|
-
"uploaded_avatar_id": 1,
|
|
71
|
-
"avatar_template": "/user_avatar/localhost/system/{size}/1.png"
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
"topics": [
|
|
75
|
-
{
|
|
76
|
-
"id": 12,
|
|
77
|
-
"title": "Test topic for inviting users",
|
|
78
|
-
"fancy_title": "Test topic for inviting users",
|
|
79
|
-
"slug": "test-topic-for-inviting-users",
|
|
80
|
-
"posts_count": 1
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
"user": {
|
|
84
|
-
"id": 1,
|
|
85
|
-
"username": "test_user",
|
|
86
|
-
"uploaded_avatar_id": 7,
|
|
87
|
-
"avatar_template": "/user_avatar/localhost/test_user/{size}/7.png",
|
|
88
|
-
"name": "Test User",
|
|
89
|
-
"email": "batman@gotham.com",
|
|
90
|
-
"last_posted_at": "2015-01-07T13:59:29.406Z",
|
|
91
|
-
"last_seen_at": "2015-01-07T15:59:16.095Z",
|
|
92
|
-
"created_at": "2014-09-11T00:11:44.207Z",
|
|
93
|
-
"website": "http://",
|
|
94
|
-
"can_edit": true,
|
|
95
|
-
"can_edit_username": true,
|
|
96
|
-
"can_edit_email": true,
|
|
97
|
-
"can_edit_name": true,
|
|
98
|
-
"stats": [
|
|
99
|
-
{
|
|
100
|
-
"action_type": 12,
|
|
101
|
-
"count": 9,
|
|
102
|
-
"id": null
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"action_type": 4,
|
|
106
|
-
"count": 12,
|
|
107
|
-
"id": null
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"action_type": 5,
|
|
111
|
-
"count": 3,
|
|
112
|
-
"id": null
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"action_type": 2,
|
|
116
|
-
"count": 1,
|
|
117
|
-
"id": null
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"action_type": 3,
|
|
121
|
-
"count": 1,
|
|
122
|
-
"id": null
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
"can_send_private_messages": true,
|
|
126
|
-
"can_send_private_message_to_user": false,
|
|
127
|
-
"bio_excerpt": "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/test_user/preferences/about-me'>would you like to fill it out?</a></div>",
|
|
128
|
-
"trust_level": 0,
|
|
129
|
-
"moderator": false,
|
|
130
|
-
"admin": true,
|
|
131
|
-
"title": null,
|
|
132
|
-
"badge_count": 2,
|
|
133
|
-
"notification_count": 2,
|
|
134
|
-
"has_title_badges": false,
|
|
135
|
-
"custom_fields": {},
|
|
136
|
-
"post_count": 15,
|
|
137
|
-
"can_be_deleted": false,
|
|
138
|
-
"can_delete_all_posts": false,
|
|
139
|
-
"locale": "",
|
|
140
|
-
"email_digests": true,
|
|
141
|
-
"email_private_messages": true,
|
|
142
|
-
"email_direct": true,
|
|
143
|
-
"email_always": false,
|
|
144
|
-
"digest_after_days": 7,
|
|
145
|
-
"mailing_list_mode": false,
|
|
146
|
-
"auto_track_topics_after_msecs": 240000,
|
|
147
|
-
"new_topic_duration_minutes": 2880,
|
|
148
|
-
"external_links_in_new_tab": false,
|
|
149
|
-
"dynamic_favicon": false,
|
|
150
|
-
"enable_quoting": true,
|
|
151
|
-
"muted_category_ids": [],
|
|
152
|
-
"tracked_category_ids": [],
|
|
153
|
-
"watched_category_ids": [],
|
|
154
|
-
"private_messages_stats": {
|
|
155
|
-
"all": 9,
|
|
156
|
-
"mine": 9,
|
|
157
|
-
"unread": 0
|
|
158
|
-
},
|
|
159
|
-
"disable_jump_reply": false,
|
|
160
|
-
"gravatar_avatar_upload_id": null,
|
|
161
|
-
"custom_avatar_upload_id": null,
|
|
162
|
-
"invited_by": null,
|
|
163
|
-
"custom_groups": [],
|
|
164
|
-
"featured_user_badge_ids": [
|
|
165
|
-
3,
|
|
166
|
-
2
|
|
167
|
-
],
|
|
168
|
-
"card_badge": null
|
|
169
|
-
}
|
|
170
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"user_badges": [
|
|
3
|
+
{
|
|
4
|
+
"id": 3,
|
|
5
|
+
"granted_at": "2014-11-30T14:27:19.404Z",
|
|
6
|
+
"badge_id": 10,
|
|
7
|
+
"user_id": 1,
|
|
8
|
+
"granted_by_id": -1
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": 2,
|
|
12
|
+
"granted_at": "2014-09-16T13:08:23.061Z",
|
|
13
|
+
"post_id": 15,
|
|
14
|
+
"post_number": 1,
|
|
15
|
+
"badge_id": 5,
|
|
16
|
+
"user_id": 1,
|
|
17
|
+
"granted_by_id": -1,
|
|
18
|
+
"topic_id": 12
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"badges": [
|
|
22
|
+
{
|
|
23
|
+
"id": 10,
|
|
24
|
+
"name": "Editor",
|
|
25
|
+
"description": null,
|
|
26
|
+
"grant_count": 1,
|
|
27
|
+
"allow_title": false,
|
|
28
|
+
"multiple_grant": false,
|
|
29
|
+
"icon": "fa-certificate",
|
|
30
|
+
"image": null,
|
|
31
|
+
"listable": true,
|
|
32
|
+
"enabled": true,
|
|
33
|
+
"badge_grouping_id": 2,
|
|
34
|
+
"system": true,
|
|
35
|
+
"badge_type_id": 3
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": 5,
|
|
39
|
+
"name": "Welcome",
|
|
40
|
+
"description": null,
|
|
41
|
+
"grant_count": 1,
|
|
42
|
+
"allow_title": false,
|
|
43
|
+
"multiple_grant": false,
|
|
44
|
+
"icon": "fa-certificate",
|
|
45
|
+
"image": null,
|
|
46
|
+
"listable": true,
|
|
47
|
+
"enabled": true,
|
|
48
|
+
"badge_grouping_id": 2,
|
|
49
|
+
"system": true,
|
|
50
|
+
"badge_type_id": 3
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"badge_types": [
|
|
54
|
+
{
|
|
55
|
+
"id": 3,
|
|
56
|
+
"name": "Bronze",
|
|
57
|
+
"sort_order": 7
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"users": [
|
|
61
|
+
{
|
|
62
|
+
"id": 1,
|
|
63
|
+
"username": "test_user",
|
|
64
|
+
"uploaded_avatar_id": 7,
|
|
65
|
+
"avatar_template": "/user_avatar/localhost/test_user/{size}/7.png"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": -1,
|
|
69
|
+
"username": "system",
|
|
70
|
+
"uploaded_avatar_id": 1,
|
|
71
|
+
"avatar_template": "/user_avatar/localhost/system/{size}/1.png"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"topics": [
|
|
75
|
+
{
|
|
76
|
+
"id": 12,
|
|
77
|
+
"title": "Test topic for inviting users",
|
|
78
|
+
"fancy_title": "Test topic for inviting users",
|
|
79
|
+
"slug": "test-topic-for-inviting-users",
|
|
80
|
+
"posts_count": 1
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"user": {
|
|
84
|
+
"id": 1,
|
|
85
|
+
"username": "test_user",
|
|
86
|
+
"uploaded_avatar_id": 7,
|
|
87
|
+
"avatar_template": "/user_avatar/localhost/test_user/{size}/7.png",
|
|
88
|
+
"name": "Test User",
|
|
89
|
+
"email": "batman@gotham.com",
|
|
90
|
+
"last_posted_at": "2015-01-07T13:59:29.406Z",
|
|
91
|
+
"last_seen_at": "2015-01-07T15:59:16.095Z",
|
|
92
|
+
"created_at": "2014-09-11T00:11:44.207Z",
|
|
93
|
+
"website": "http://",
|
|
94
|
+
"can_edit": true,
|
|
95
|
+
"can_edit_username": true,
|
|
96
|
+
"can_edit_email": true,
|
|
97
|
+
"can_edit_name": true,
|
|
98
|
+
"stats": [
|
|
99
|
+
{
|
|
100
|
+
"action_type": 12,
|
|
101
|
+
"count": 9,
|
|
102
|
+
"id": null
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"action_type": 4,
|
|
106
|
+
"count": 12,
|
|
107
|
+
"id": null
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"action_type": 5,
|
|
111
|
+
"count": 3,
|
|
112
|
+
"id": null
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"action_type": 2,
|
|
116
|
+
"count": 1,
|
|
117
|
+
"id": null
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"action_type": 3,
|
|
121
|
+
"count": 1,
|
|
122
|
+
"id": null
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"can_send_private_messages": true,
|
|
126
|
+
"can_send_private_message_to_user": false,
|
|
127
|
+
"bio_excerpt": "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/test_user/preferences/about-me'>would you like to fill it out?</a></div>",
|
|
128
|
+
"trust_level": 0,
|
|
129
|
+
"moderator": false,
|
|
130
|
+
"admin": true,
|
|
131
|
+
"title": null,
|
|
132
|
+
"badge_count": 2,
|
|
133
|
+
"notification_count": 2,
|
|
134
|
+
"has_title_badges": false,
|
|
135
|
+
"custom_fields": {},
|
|
136
|
+
"post_count": 15,
|
|
137
|
+
"can_be_deleted": false,
|
|
138
|
+
"can_delete_all_posts": false,
|
|
139
|
+
"locale": "",
|
|
140
|
+
"email_digests": true,
|
|
141
|
+
"email_private_messages": true,
|
|
142
|
+
"email_direct": true,
|
|
143
|
+
"email_always": false,
|
|
144
|
+
"digest_after_days": 7,
|
|
145
|
+
"mailing_list_mode": false,
|
|
146
|
+
"auto_track_topics_after_msecs": 240000,
|
|
147
|
+
"new_topic_duration_minutes": 2880,
|
|
148
|
+
"external_links_in_new_tab": false,
|
|
149
|
+
"dynamic_favicon": false,
|
|
150
|
+
"enable_quoting": true,
|
|
151
|
+
"muted_category_ids": [],
|
|
152
|
+
"tracked_category_ids": [],
|
|
153
|
+
"watched_category_ids": [],
|
|
154
|
+
"private_messages_stats": {
|
|
155
|
+
"all": 9,
|
|
156
|
+
"mine": 9,
|
|
157
|
+
"unread": 0
|
|
158
|
+
},
|
|
159
|
+
"disable_jump_reply": false,
|
|
160
|
+
"gravatar_avatar_upload_id": null,
|
|
161
|
+
"custom_avatar_upload_id": null,
|
|
162
|
+
"invited_by": null,
|
|
163
|
+
"custom_groups": [],
|
|
164
|
+
"featured_user_badge_ids": [
|
|
165
|
+
3,
|
|
166
|
+
2
|
|
167
|
+
],
|
|
168
|
+
"card_badge": null
|
|
169
|
+
}
|
|
170
|
+
}
|