discourse_api 0.45.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +13 -17
- data/.gitignore +0 -19
- data/CHANGELOG.md +39 -0
- data/discourse_api.gemspec +4 -4
- data/examples/bookmark_topic.rb +15 -0
- data/examples/category.rb +3 -0
- data/examples/invite_users.rb +21 -3
- data/examples/notifications.rb +18 -0
- data/examples/topic_lists.rb +3 -0
- data/lib/discourse_api/api/categories.rb +37 -11
- data/lib/discourse_api/api/dashboard.rb +2 -2
- data/lib/discourse_api/api/groups.rb +15 -4
- data/lib/discourse_api/api/invite.rb +67 -2
- data/lib/discourse_api/api/notifications.rb +5 -2
- data/lib/discourse_api/api/private_messages.rb +10 -3
- data/lib/discourse_api/api/search.rb +1 -1
- data/lib/discourse_api/api/site_settings.rb +3 -3
- data/lib/discourse_api/api/topics.rb +30 -2
- data/lib/discourse_api/api/users.rb +4 -0
- data/lib/discourse_api/client.rb +13 -1
- data/lib/discourse_api/error.rb +3 -0
- data/lib/discourse_api/single_sign_on.rb +6 -6
- data/lib/discourse_api/version.rb +1 -1
- data/spec/discourse_api/api/categories_spec.rb +90 -0
- data/spec/discourse_api/api/groups_spec.rb +29 -0
- data/spec/discourse_api/api/invite_spec.rb +123 -0
- data/spec/discourse_api/api/private_messages_spec.rb +4 -4
- data/spec/discourse_api/api/search_spec.rb +2 -2
- data/spec/discourse_api/api/topics_spec.rb +69 -3
- data/spec/discourse_api/api/users_spec.rb +14 -0
- data/spec/discourse_api/client_spec.rb +21 -0
- data/spec/fixtures/notification_success.json +3 -0
- data/spec/fixtures/retrieve_invite.json +116 -0
- data/spec/fixtures/top.json +108 -0
- data/spec/fixtures/topic_posts.json +1 -0
- metadata +17 -7
@@ -0,0 +1,108 @@
|
|
1
|
+
{
|
2
|
+
"topic_list": {
|
3
|
+
"can_create_topic": false,
|
4
|
+
"more_topics_url": "/latest.json?page=1",
|
5
|
+
"draft": null,
|
6
|
+
"draft_key": "new_topic",
|
7
|
+
"draft_sequence": null,
|
8
|
+
"topics": [
|
9
|
+
{
|
10
|
+
"id": 1,
|
11
|
+
"title": "Test topic #1",
|
12
|
+
"fancy_title": "Test topic #1",
|
13
|
+
"slug": "test-topic-1",
|
14
|
+
"posts_count": 1,
|
15
|
+
"reply_count": 0,
|
16
|
+
"highest_post_number": 1,
|
17
|
+
"image_url": null,
|
18
|
+
"created_at": "2013-02-04T15:26:25.977-05:00",
|
19
|
+
"last_posted_at": "2013-02-05T12:14:17.364-05:00",
|
20
|
+
"bumped": true,
|
21
|
+
"bumped_at": "2013-02-07T13:43:11.191-05:00",
|
22
|
+
"unseen": false,
|
23
|
+
"pinned": true,
|
24
|
+
"excerpt": "Welcome! \n\nTry is a sandbox, a safe place to play with Discourse and its features.\n\nThis site is reset every day (or even more often). Any accounts or posts you create here will not exist tomorrow! \n\nFeel free to experim…",
|
25
|
+
"visible": true,
|
26
|
+
"closed": false,
|
27
|
+
"archived": false,
|
28
|
+
"views": 268,
|
29
|
+
"like_count": 14,
|
30
|
+
"has_best_of": false,
|
31
|
+
"archetype": "regular",
|
32
|
+
"last_poster_username": "test_user",
|
33
|
+
"category_id": 1,
|
34
|
+
"posters": [
|
35
|
+
{
|
36
|
+
"extras": null,
|
37
|
+
"description": "Original Poster, Most Recent Poster",
|
38
|
+
"user_id": 1
|
39
|
+
}
|
40
|
+
]
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"id": 1,
|
44
|
+
"title": "Test topic #2",
|
45
|
+
"fancy_title": "Test topic #2",
|
46
|
+
"slug": "test-topic-1",
|
47
|
+
"posts_count": 1,
|
48
|
+
"reply_count": 0,
|
49
|
+
"highest_post_number": 2,
|
50
|
+
"image_url": null,
|
51
|
+
"created_at": "2013-11-06T13:57:47.984-05:00",
|
52
|
+
"last_posted_at": "2013-11-06T13:57:48.111-05:00",
|
53
|
+
"bumped": true,
|
54
|
+
"bumped_at": "2013-11-06T13:57:48.111-05:00",
|
55
|
+
"unseen": false,
|
56
|
+
"pinned": false,
|
57
|
+
"visible": true,
|
58
|
+
"closed": false,
|
59
|
+
"archived": false,
|
60
|
+
"views": 1,
|
61
|
+
"like_count": 0,
|
62
|
+
"has_best_of": false,
|
63
|
+
"archetype": "regular",
|
64
|
+
"last_poster_username": "test_user",
|
65
|
+
"category_id": 1,
|
66
|
+
"posters": [
|
67
|
+
{
|
68
|
+
"extras": null,
|
69
|
+
"description": "Original Poster, Most Recent Poster",
|
70
|
+
"user_id": 1
|
71
|
+
}
|
72
|
+
]
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"id": 1,
|
76
|
+
"title": "Test topic #3",
|
77
|
+
"fancy_title": "Test topic #3",
|
78
|
+
"slug": "test-topic-3",
|
79
|
+
"posts_count": 1,
|
80
|
+
"reply_count": 0,
|
81
|
+
"highest_post_number": 1,
|
82
|
+
"image_url": null,
|
83
|
+
"created_at": "2013-02-04T21:46:58.194-05:00",
|
84
|
+
"last_posted_at": "2013-11-06T13:56:27.753-05:00",
|
85
|
+
"bumped": true,
|
86
|
+
"bumped_at": "2013-11-06T13:56:27.753-05:00",
|
87
|
+
"unseen": false,
|
88
|
+
"pinned": false,
|
89
|
+
"visible": true,
|
90
|
+
"closed": false,
|
91
|
+
"archived": false,
|
92
|
+
"views": 82,
|
93
|
+
"like_count": 10,
|
94
|
+
"has_best_of": false,
|
95
|
+
"archetype": "regular",
|
96
|
+
"last_poster_username": "test_user",
|
97
|
+
"category_id": 1,
|
98
|
+
"posters": [
|
99
|
+
{
|
100
|
+
"extras": null,
|
101
|
+
"description": "Original Poster, Most Recent Poster",
|
102
|
+
"user_id": 1
|
103
|
+
}
|
104
|
+
]
|
105
|
+
}
|
106
|
+
]
|
107
|
+
}
|
108
|
+
}
|
@@ -34,6 +34,7 @@
|
|
34
34
|
"read":true,
|
35
35
|
"user_title":null,
|
36
36
|
"actions_summary":[{"id":2,"count":3,"can_act":true}],
|
37
|
+
"raw": [{"type":"paragraph","children":[{"text":"This is a raw post I've got white space!... and emojis 😈😈😈😈😈😈"}]}],
|
37
38
|
"moderator":false,
|
38
39
|
"admin":false,
|
39
40
|
"staff":false,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discourse_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.48.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -171,16 +171,16 @@ dependencies:
|
|
171
171
|
name: rubocop-discourse
|
172
172
|
requirement: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
|
-
- - "
|
174
|
+
- - "~>"
|
175
175
|
- !ruby/object:Gem::Version
|
176
|
-
version:
|
176
|
+
version: 2.4.1
|
177
177
|
type: :development
|
178
178
|
prerelease: false
|
179
179
|
version_requirements: !ruby/object:Gem::Requirement
|
180
180
|
requirements:
|
181
|
-
- - "
|
181
|
+
- - "~>"
|
182
182
|
- !ruby/object:Gem::Version
|
183
|
-
version:
|
183
|
+
version: 2.4.1
|
184
184
|
description: Discourse API
|
185
185
|
email:
|
186
186
|
- sam.saffron@gmail.com
|
@@ -204,6 +204,7 @@ files:
|
|
204
204
|
- discourse_api.gemspec
|
205
205
|
- examples/backups.rb
|
206
206
|
- examples/badges.rb
|
207
|
+
- examples/bookmark_topic.rb
|
207
208
|
- examples/category.rb
|
208
209
|
- examples/change_topic_status.rb
|
209
210
|
- examples/create_private_message.rb
|
@@ -217,6 +218,7 @@ files:
|
|
217
218
|
- examples/groups.rb
|
218
219
|
- examples/invite_users.rb
|
219
220
|
- examples/manage_api_keys.rb
|
221
|
+
- examples/notifications.rb
|
220
222
|
- examples/polls.rb
|
221
223
|
- examples/post_action.rb
|
222
224
|
- examples/search.rb
|
@@ -258,6 +260,7 @@ files:
|
|
258
260
|
- spec/discourse_api/api/categories_spec.rb
|
259
261
|
- spec/discourse_api/api/email_spec.rb
|
260
262
|
- spec/discourse_api/api/groups_spec.rb
|
263
|
+
- spec/discourse_api/api/invite_spec.rb
|
261
264
|
- spec/discourse_api/api/notifications_spec.rb
|
262
265
|
- spec/discourse_api/api/params_spec.rb
|
263
266
|
- spec/discourse_api/api/polls_spec.rb
|
@@ -290,6 +293,7 @@ files:
|
|
290
293
|
- spec/fixtures/members_1.json
|
291
294
|
- spec/fixtures/members_2.json
|
292
295
|
- spec/fixtures/new.json
|
296
|
+
- spec/fixtures/notification_success.json
|
293
297
|
- spec/fixtures/notifications.json
|
294
298
|
- spec/fixtures/polls_toggle_status.json
|
295
299
|
- spec/fixtures/polls_vote.json
|
@@ -302,7 +306,9 @@ files:
|
|
302
306
|
- spec/fixtures/regenerate_api_key.json
|
303
307
|
- spec/fixtures/replies.json
|
304
308
|
- spec/fixtures/replies_and_topics.json
|
309
|
+
- spec/fixtures/retrieve_invite.json
|
305
310
|
- spec/fixtures/search.json
|
311
|
+
- spec/fixtures/top.json
|
306
312
|
- spec/fixtures/topic.json
|
307
313
|
- spec/fixtures/topic_invite_user.json
|
308
314
|
- spec/fixtures/topic_posts.json
|
@@ -341,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
347
|
- !ruby/object:Gem::Version
|
342
348
|
version: '0'
|
343
349
|
requirements: []
|
344
|
-
rubygems_version: 3.
|
350
|
+
rubygems_version: 3.1.6
|
345
351
|
signing_key:
|
346
352
|
specification_version: 4
|
347
353
|
summary: Allows access to the Discourse API
|
@@ -352,6 +358,7 @@ test_files:
|
|
352
358
|
- spec/discourse_api/api/categories_spec.rb
|
353
359
|
- spec/discourse_api/api/email_spec.rb
|
354
360
|
- spec/discourse_api/api/groups_spec.rb
|
361
|
+
- spec/discourse_api/api/invite_spec.rb
|
355
362
|
- spec/discourse_api/api/notifications_spec.rb
|
356
363
|
- spec/discourse_api/api/params_spec.rb
|
357
364
|
- spec/discourse_api/api/polls_spec.rb
|
@@ -384,6 +391,7 @@ test_files:
|
|
384
391
|
- spec/fixtures/members_1.json
|
385
392
|
- spec/fixtures/members_2.json
|
386
393
|
- spec/fixtures/new.json
|
394
|
+
- spec/fixtures/notification_success.json
|
387
395
|
- spec/fixtures/notifications.json
|
388
396
|
- spec/fixtures/polls_toggle_status.json
|
389
397
|
- spec/fixtures/polls_vote.json
|
@@ -396,7 +404,9 @@ test_files:
|
|
396
404
|
- spec/fixtures/regenerate_api_key.json
|
397
405
|
- spec/fixtures/replies.json
|
398
406
|
- spec/fixtures/replies_and_topics.json
|
407
|
+
- spec/fixtures/retrieve_invite.json
|
399
408
|
- spec/fixtures/search.json
|
409
|
+
- spec/fixtures/top.json
|
400
410
|
- spec/fixtures/topic.json
|
401
411
|
- spec/fixtures/topic_invite_user.json
|
402
412
|
- spec/fixtures/topic_posts.json
|