twitchrb 0.2.1 → 0.2.2

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: ff8784f24098b67e4c0da539cc288fa99b3e22a306795bd351ad8dbd259ccfac
4
- data.tar.gz: ec48ec81f9b0c0e9f83462f5d7604140ac68e6162979112e1426a8849c1c8748
3
+ metadata.gz: 30b0eac63e649a017a1c4938b034886f1934da667145ca984f7d2898220d9c91
4
+ data.tar.gz: 97883516313836adc1a003649904b532c66ce5f14568981d5f82b21b807f489b
5
5
  SHA512:
6
- metadata.gz: d499ace0ef8e6c84f50027e4e8e630ce9a837a27f58e57638213acbcebc999efaee756e762e728a902d66f7083f0b1d45b16c29a2855a83670e69ae9f8da22a0
7
- data.tar.gz: 7568b5b681ddf0f08c0394d809d9fd217bd7e4ee3c111a4e7612233f5227ec4c22ec60b2acafac805c8dd588a1e96051852dd2683a53f6361d847e39a4fa4582
6
+ metadata.gz: 5337a58e97212f82d77208f41a0af2b2b0f5b36c3652b7905c51af117e67767affe6a1388e647ed8e4f8ed307488084ee91989cc1a21494265dd5abba9055eea
7
+ data.tar.gz: 4a95c514a5d1addd4eebd265ba04ba79ae945913042ee4245d07a563e69bf37d365a49d31078130c425a5b545128886058211db96cc3444ff32bd56ebaa31490
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- twitchrb (0.2.1)
4
+ twitchrb (0.2.2)
5
5
  faraday (~> 1.7)
6
6
  faraday_middleware (~> 1.1)
7
7
 
@@ -28,7 +28,7 @@ GEM
28
28
  faraday-net_http_persistent (1.2.0)
29
29
  faraday-patron (1.0.0)
30
30
  faraday-rack (1.0.0)
31
- faraday_middleware (1.1.0)
31
+ faraday_middleware (1.2.0)
32
32
  faraday (~> 1.0)
33
33
  minitest (5.14.1)
34
34
  multipart-post (2.1.1)
data/lib/twitch/client.rb CHANGED
@@ -1,25 +1,3 @@
1
- # require "httparty"
2
-
3
-
4
- # def headers(kind)
5
- # if kind == :helix
6
- # {
7
- # "Client-ID" => @client_id,
8
- # "Accept" => "application/json",
9
- # "Content-Type" => "application/json",
10
- # "Authorization" => "Bearer #{@access_token}"
11
- # }
12
- # else
13
- # {
14
- # "Client-ID" => @client_id,
15
- # "Accept" => "application/vnd.twitchtv.v5+json",
16
- # # "Authorization" => "OAuth #{@access_token}"
17
- # }
18
- # end
19
- # end
20
-
21
-
22
-
23
1
  module Twitch
24
2
  class Client
25
3
  BASE_URL = "https://api.twitch.tv/helix"
@@ -144,5 +122,6 @@ module Twitch
144
122
  conn.adapter adapter, @stubs
145
123
  end
146
124
  end
125
+
147
126
  end
148
127
  end
@@ -8,6 +8,10 @@ module Twitch
8
8
  Collection.from_response(response, type: Clip)
9
9
  end
10
10
 
11
+ def retrieve(id:)
12
+ Clip.new get_request("clips?id=#{id}").body.dig("data")[0]
13
+ end
14
+
11
15
  # Required scope: clips:edit
12
16
  def create(broadcaster_id:, **attributes)
13
17
  response = post_request("clips", body: attributes.merge(broadcaster_id: broadcaster_id))
@@ -1,3 +1,3 @@
1
1
  module Twitch
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/twitch.rb CHANGED
@@ -3,26 +3,6 @@ require "faraday_middleware"
3
3
  require "json"
4
4
  require "twitch/version"
5
5
 
6
- require "twitch/version"
7
-
8
- # require "twitch/client"
9
- # require "twitch/initializable"
10
-
11
- # # Models
12
- # require "twitch/models/channel"
13
- # require "twitch/models/badge"
14
- # require "twitch/models/game"
15
- # require "twitch/models/emote"
16
- # require "twitch/models/poll"
17
- # require "twitch/models/poll_choice"
18
-
19
- # # Helix API
20
- # require "twitch/channels"
21
- # require "twitch/emotes"
22
- # require "twitch/badges"
23
- # require "twitch/games"
24
- # require "twitch/polls"
25
-
26
6
  module Twitch
27
7
 
28
8
  autoload :Client, "twitch/client"
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: 0.2.1
4
+ version: 0.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: 2021-10-02 00:00:00.000000000 Z
11
+ date: 2021-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday