forem-ruby 0.1.0.beta2 → 0.1.0.beta3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25e286206f0f92f3a65e64399b43715cca4b70a7ff532ca17fd4ea8f6e68146b
4
- data.tar.gz: 04af2856b16152eb19965634c9bc9356c603e17a24f8c829dd85a18f0240b769
3
+ metadata.gz: 1e948a4e3001066a9344c0609f3493a6c582b31fab01ff88dcc418e0dcc67c1c
4
+ data.tar.gz: ae8872806a2a55f49d4879561cf9bf5b993da167ec665a43c48390f3ced505cd
5
5
  SHA512:
6
- metadata.gz: 9a8bb32085051edb5f430c54d97450cf8ad564750e0f2ca0689d6333072aaae95b4019fa7151ee7ff56727ae4bd2333ed103964c01aec816ff42e5ffaf1f958d
7
- data.tar.gz: 71da89bed7aaa18d649850b029cd142ad81fdef3aeb25e2721c2266179f58c3a3f9d5bbd65d9e477905f2750f2bce625a60dedff1c1f972d2d1f2e6fff8e8f2f
6
+ metadata.gz: 3e2846154e8d12dbb1b78b3b7c46f44fc7b210c064429630af165164a59a45c5a336160d63c65cfa64fd9c3300e75a2ddb14eda607b7b660ba11fde557ae6628
7
+ data.tar.gz: 970dcc16e46767419612226f5ad6bd085e340e1617e99a5bf034685cebde22acbe5ac1b0abda6621160aeeed1b81b221f94c647626b1073e23538621937a1f46
@@ -132,18 +132,19 @@ module Forem
132
132
  ForemObject.construct_from(resp.parsed_body, requestor: requestor)
133
133
  end
134
134
 
135
- # Update the email newsletter notification setting for a user.
136
- #
137
135
  # @param user_id [Integer, String] the Forem user ID.
138
- # @param email_newsletter [Boolean] whether newsletter email is enabled.
136
+ # @param settings [Hash] notification setting columns to write, e.g.
137
+ # +{ email_newsletter: false, email_digest_periodic: false }+. Sent
138
+ # verbatim under the +notification_setting+ wrapper; the server owns
139
+ # which keys it accepts.
139
140
  # @param opts [Hash] per-request options.
140
141
  # @return [ForemObject] the updated notification setting.
141
- def self.update_notification_settings(user_id, email_newsletter:, **opts)
142
+ def self.update_notification_settings(user_id, settings:, **opts)
142
143
  requestor = opts[:requestor]
143
144
  resp = request(
144
145
  :put,
145
146
  "#{resource_path}/#{user_id}/notification_settings",
146
- { notification_setting: { email_newsletter: email_newsletter } },
147
+ { notification_setting: settings },
147
148
  opts
148
149
  )
149
150
  ForemObject.construct_from(resp.parsed_body, requestor: requestor)
@@ -96,16 +96,15 @@ module Forem
96
96
  )
97
97
  end
98
98
 
99
- # Update the email newsletter notification setting for a user.
100
99
  #
101
100
  # @param user_id [Integer, String] the Forem user ID.
102
- # @param email_newsletter [Boolean] whether newsletter email is enabled.
101
+ # @param settings [Hash] notification setting columns to write.
103
102
  # @param opts [Hash] per-request options.
104
103
  # @return [ForemObject] the updated notification setting.
105
- def update_notification_settings(user_id, email_newsletter:, **opts)
104
+ def update_notification_settings(user_id, settings:, **opts)
106
105
  AdminUser.update_notification_settings(
107
106
  user_id,
108
- email_newsletter: email_newsletter,
107
+ settings: settings,
109
108
  **opts_with_requestor(opts)
110
109
  )
111
110
  end
data/lib/forem/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Forem
2
2
  # The current version of the forem-ruby gem.
3
- VERSION = "0.1.0.beta2"
3
+ VERSION = "0.1.0.beta3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forem-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta2
4
+ version: 0.1.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Forem