twitchrb 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/README.md +7 -0
- data/lib/twitch/resources/moderators.rb +7 -1
- data/lib/twitch/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: 80e37cae23180ab0f9c0e5ba59691a10f306ee5440d99eea6805e355e30f6cb9
|
4
|
+
data.tar.gz: 682c90dc5794062250bfde3ede6d20833a13667962ede478e60cd0f5c76e9b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a00aa325114e5b7e15935ad7301618349deb0b66615e5599ca137adf38ac1feb1817e42777b4f0120da2d366271a16969d0436319aa1492e804a3df50bbd7f1
|
7
|
+
data.tar.gz: c04351cf7d0bc5b7b14b270cf015c1722aaced8521154d2171b6acf040dbb0fc03125951451d5feecd98fdcac04078bc3f8ab338932e7c0f98ad57f77813f46a
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
twitchrb (1.2.
|
4
|
+
twitchrb (1.2.2)
|
5
5
|
faraday (~> 2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
base64 (0.2.0)
|
11
10
|
dotenv (2.7.6)
|
12
|
-
faraday (2.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
faraday-net_http (3.0.2)
|
11
|
+
faraday (2.9.0)
|
12
|
+
faraday-net_http (>= 2.0, < 3.2)
|
13
|
+
faraday-net_http (3.1.0)
|
14
|
+
net-http
|
17
15
|
minitest (5.15.0)
|
16
|
+
net-http (0.4.1)
|
17
|
+
uri
|
18
18
|
rake (12.3.3)
|
19
|
-
|
19
|
+
uri (0.13.0)
|
20
20
|
|
21
21
|
PLATFORMS
|
22
22
|
ruby
|
data/README.md
CHANGED
@@ -251,6 +251,13 @@ These require an application OAuth access token.
|
|
251
251
|
|
252
252
|
### Moderators
|
253
253
|
|
254
|
+
```ruby
|
255
|
+
# List all channels a user has moderator privileges on
|
256
|
+
# Required scope: user:read:moderated_channels
|
257
|
+
# user_id must be the currently authenticated user
|
258
|
+
@client.moderators.channels user_id: 123
|
259
|
+
```
|
260
|
+
|
254
261
|
```ruby
|
255
262
|
# List all moderators for a broadcaster
|
256
263
|
# Required scope: moderation:read
|
@@ -1,6 +1,12 @@
|
|
1
1
|
module Twitch
|
2
2
|
class ModeratorsResource < Resource
|
3
|
-
|
3
|
+
|
4
|
+
# User ID must match the user in the OAuth token
|
5
|
+
def channels(user_id:)
|
6
|
+
response = get_request("moderation/channels", params: {user_id: user_id})
|
7
|
+
Collection.from_response(response, type: Channel)
|
8
|
+
end
|
9
|
+
|
4
10
|
# Broadcaster ID must match the user in the OAuth token
|
5
11
|
def list(broadcaster_id:, **params)
|
6
12
|
response = get_request("moderation/moderators", params: params.merge(broadcaster_id: broadcaster_id))
|
data/lib/twitch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitchrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|