discourse_api 0.32.0 → 0.33.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d1ed5b5061991f2bad549f4edfe32a6000700848241c3dd31e72b770c4f3cc1
4
- data.tar.gz: 1375bd4604231e28b361dc5f326574a4cd1f4c68a3af5b34252aeddf5b6b0f84
3
+ metadata.gz: 240707cb3c8f93fe11db4af092edcbf7531e1b1571ebfeec47e16769efdf3336
4
+ data.tar.gz: 785b03d93e4fa7092b141bc872c29d27ceef95324ab1b181425a643fbaab5214
5
5
  SHA512:
6
- metadata.gz: afc9b153b80fb9dc4d49c1a7330f6b0ac84b055d6456f9e74fb665c538e11fc33c7264900533aeaa43f1f3732e311dfaafd7076c03f459f1d439b894a2473900
7
- data.tar.gz: 1a03023036d5d74693ef9fee74774b92a5d4c4b630dc7761dea0a9bde6cdfc88103585da1dc68873f5a25440931d666b7648bd5ac18c4838f4d496e8ca133536
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.body['category']
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
@@ -1,3 +1,3 @@
1
1
  module DiscourseApi
2
- VERSION = "0.32.0"
2
+ VERSION = "0.33.0"
3
3
  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.32.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-02-13 00:00:00.000000000 Z
14
+ date: 2019-03-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday