discourse_api 0.32.0 → 0.33.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/CHANGELOG.md +4 -0
- data/examples/category.rb +3 -0
- data/lib/discourse_api/api/categories.rb +8 -1
- data/lib/discourse_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 240707cb3c8f93fe11db4af092edcbf7531e1b1571ebfeec47e16769efdf3336
|
|
4
|
+
data.tar.gz: 785b03d93e4fa7092b141bc872c29d27ceef95324ab1b181425a643fbaab5214
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eaf85eff275d2ec493479f993f1943bebe1a9becf8f7dafd2a320639c51ee3656c225ed1a2fa8eac61a047d3408ad0530dc010a287c225e477055e9844c9c1c7
|
|
7
|
+
data.tar.gz: 9c20b3165b8332c88d5e92daca5d9ab7d05fd5d9547200dfd078701a6591b60e5caa496ef15fa10b69e746e4087ee9f457f7e305a4dff8b6e88929f171569e53
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.33.0] - 2019-03-04
|
|
6
|
+
### Added
|
|
7
|
+
- Added a new method to update a users notification level in a category
|
|
8
|
+
|
|
5
9
|
## [0.32.0] - 2019-02-13
|
|
6
10
|
### Added
|
|
7
11
|
- Added a new method to update a users notification level in a group
|
data/examples/category.rb
CHANGED
|
@@ -19,3 +19,6 @@ puts category_topics
|
|
|
19
19
|
category_topics_paged = client.category_latest_topics(category_slug: "test-category", page: "5")
|
|
20
20
|
puts category_topics_paged
|
|
21
21
|
|
|
22
|
+
# update category notification_level
|
|
23
|
+
update_response = client.category_set_user_notification(id: "test-id", notification_level: "test-notification-level")
|
|
24
|
+
puts update_response
|
|
@@ -61,7 +61,14 @@ module DiscourseApi
|
|
|
61
61
|
|
|
62
62
|
def category(id)
|
|
63
63
|
response = get("/c/#{id}/show")
|
|
64
|
-
response
|
|
64
|
+
response[:body]['category']
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def category_set_user_notification(args={})
|
|
68
|
+
category_id = args[:id]
|
|
69
|
+
args = API.params(args)
|
|
70
|
+
.required(:notification_level)
|
|
71
|
+
post("/category/#{category_id}/notifications", args)
|
|
65
72
|
end
|
|
66
73
|
end
|
|
67
74
|
end
|
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.33.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: 2019-
|
|
14
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: faraday
|