forem-ruby 0.1.0.beta1 → 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 +4 -4
- data/forem-ruby.gemspec +4 -0
- data/lib/forem/resources/admin_user.rb +6 -5
- data/lib/forem/services/admin_user_service.rb +3 -4
- data/lib/forem/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e948a4e3001066a9344c0609f3493a6c582b31fab01ff88dcc418e0dcc67c1c
|
|
4
|
+
data.tar.gz: ae8872806a2a55f49d4879561cf9bf5b993da167ec665a43c48390f3ced505cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e2846154e8d12dbb1b78b3b7c46f44fc7b210c064429630af165164a59a45c5a336160d63c65cfa64fd9c3300e75a2ddb14eda607b7b660ba11fde557ae6628
|
|
7
|
+
data.tar.gz: 970dcc16e46767419612226f5ad6bd085e340e1617e99a5bf034685cebde22acbe5ac1b0abda6621160aeeed1b81b221f94c647626b1073e23538621937a1f46
|
data/forem-ruby.gemspec
CHANGED
|
@@ -13,5 +13,9 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.require_paths = ["lib"]
|
|
14
14
|
s.metadata = {
|
|
15
15
|
"rubygems_mfa_required" => "true",
|
|
16
|
+
"homepage_uri" => "https://github.com/forem/forem-ruby",
|
|
17
|
+
"source_code_uri" => "https://github.com/forem/forem-ruby",
|
|
18
|
+
"bug_tracker_uri" => "https://github.com/forem/forem-ruby/issues",
|
|
19
|
+
"documentation_uri" => "https://rubydoc.info/gems/forem-ruby",
|
|
16
20
|
}
|
|
17
21
|
end
|
|
@@ -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
|
|
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,
|
|
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:
|
|
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
|
|
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,
|
|
104
|
+
def update_notification_settings(user_id, settings:, **opts)
|
|
106
105
|
AdminUser.update_notification_settings(
|
|
107
106
|
user_id,
|
|
108
|
-
|
|
107
|
+
settings: settings,
|
|
109
108
|
**opts_with_requestor(opts)
|
|
110
109
|
)
|
|
111
110
|
end
|
data/lib/forem/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.1.0.beta3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Forem
|
|
@@ -91,6 +91,10 @@ licenses:
|
|
|
91
91
|
- MIT
|
|
92
92
|
metadata:
|
|
93
93
|
rubygems_mfa_required: 'true'
|
|
94
|
+
homepage_uri: https://github.com/forem/forem-ruby
|
|
95
|
+
source_code_uri: https://github.com/forem/forem-ruby
|
|
96
|
+
bug_tracker_uri: https://github.com/forem/forem-ruby/issues
|
|
97
|
+
documentation_uri: https://rubydoc.info/gems/forem-ruby
|
|
94
98
|
rdoc_options: []
|
|
95
99
|
require_paths:
|
|
96
100
|
- lib
|
|
@@ -105,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
105
109
|
- !ruby/object:Gem::Version
|
|
106
110
|
version: '0'
|
|
107
111
|
requirements: []
|
|
108
|
-
rubygems_version:
|
|
112
|
+
rubygems_version: 4.0.16
|
|
109
113
|
specification_version: 4
|
|
110
114
|
summary: Ruby client for the Forem API
|
|
111
115
|
test_files: []
|