twitchrb 1.7.0 → 1.8.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/.github/workflows/ci.yml +2 -2
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/lib/twitch/objects/stream_key.rb +4 -0
- data/lib/twitch/resources/channels.rb +5 -0
- data/lib/twitch/version.rb +1 -1
- data/lib/twitch.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f92c10fcfb6dba2f494d6bd5e0c24bb8cc89662a8dd577d4b8478e744f0f0fa
|
|
4
|
+
data.tar.gz: 32082cfe85dfb4fc7ded29a37b80dc25ce68ccb47481af2957c6a0a990a1c09b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b021607c7e10827384d6d6461b3ba8b9d3f6459996efca1cc276a8e304f9d9ce9c16371e4f6d0a6b136f5ade2cd856d730e38f5f1df94a9d1805f7cf6f1570d
|
|
7
|
+
data.tar.gz: 94e26f89f370b871527b4c76f4aeda72ac77093a5012801efc9cd25695d05e5e683f8e3bbcef9342f0747f6e9595904f9060573e5260de017f8fb8806f9cc13d
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -11,7 +11,7 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
13
|
- name: Checkout code
|
|
14
|
-
uses: actions/checkout@
|
|
14
|
+
uses: actions/checkout@v6
|
|
15
15
|
- name: Set up Ruby
|
|
16
16
|
uses: ruby/setup-ruby@v1
|
|
17
17
|
with:
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
- '3.3'
|
|
32
32
|
- '3.4'
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@v6
|
|
35
35
|
- uses: ruby/setup-ruby@v1
|
|
36
36
|
with:
|
|
37
37
|
ruby-version: ${{ matrix.ruby_version }}
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -190,6 +190,12 @@ attributes = {title: "My new title"}
|
|
|
190
190
|
|
|
191
191
|
# Retrieves editors for a channel
|
|
192
192
|
@client.channels.editors(broadcaster_id: 141981764)
|
|
193
|
+
|
|
194
|
+
# Retrieve the Stream Key for a channel
|
|
195
|
+
# broadcaster_id must match the currently authenticated user
|
|
196
|
+
# Required scope: channel:read:stream_key
|
|
197
|
+
@client.channels.stream_key(broadcaster_id: 123123)
|
|
198
|
+
=> #<Twitch::StreamKey stream_key="live_abc123">
|
|
193
199
|
```
|
|
194
200
|
|
|
195
201
|
### Videos
|
|
@@ -45,5 +45,10 @@ module Twitch
|
|
|
45
45
|
response = get_request("channels/editors?broadcaster_id=#{broadcaster_id}")
|
|
46
46
|
Collection.from_response(response, type: ChannelEditor)
|
|
47
47
|
end
|
|
48
|
+
|
|
49
|
+
def stream_key(broadcaster_id:)
|
|
50
|
+
response = get_request("streams/key?broadcaster_id=#{broadcaster_id}")
|
|
51
|
+
StreamKey.new(response.body.dig("data")[0])
|
|
52
|
+
end
|
|
48
53
|
end
|
|
49
54
|
end
|
data/lib/twitch/version.rb
CHANGED
data/lib/twitch.rb
CHANGED
|
@@ -59,6 +59,7 @@ module Twitch
|
|
|
59
59
|
autoload :User, "twitch/objects/user"
|
|
60
60
|
autoload :FollowedUser, "twitch/objects/followed_user"
|
|
61
61
|
autoload :BlockedUser, "twitch/objects/blocked_user"
|
|
62
|
+
autoload :StreamKey, "twitch/objects/stream_key"
|
|
62
63
|
|
|
63
64
|
autoload :Channel, "twitch/objects/channel"
|
|
64
65
|
autoload :ChannelEditor, "twitch/objects/channel_editor"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twitchrb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dean Perry
|
|
@@ -94,6 +94,7 @@ files:
|
|
|
94
94
|
- lib/twitch/objects/raid.rb
|
|
95
95
|
- lib/twitch/objects/search_result.rb
|
|
96
96
|
- lib/twitch/objects/stream.rb
|
|
97
|
+
- lib/twitch/objects/stream_key.rb
|
|
97
98
|
- lib/twitch/objects/stream_marker.rb
|
|
98
99
|
- lib/twitch/objects/stream_schedule.rb
|
|
99
100
|
- lib/twitch/objects/subscription.rb
|
|
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
168
169
|
- !ruby/object:Gem::Version
|
|
169
170
|
version: '0'
|
|
170
171
|
requirements: []
|
|
171
|
-
rubygems_version: 3.
|
|
172
|
+
rubygems_version: 3.6.9
|
|
172
173
|
specification_version: 4
|
|
173
174
|
summary: A Ruby library for interacting with the Twitch Helix API
|
|
174
175
|
test_files: []
|