holodex 2.0.1 → 2.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7fd9c364a7d6c5379b31c30db17e90406c5b0abdf951360dd1ea7d85123582a
4
- data.tar.gz: 1b9a8ec445c9aab18794d26cce378617aedbd389f38d52a5684c9e8232205e33
3
+ metadata.gz: 7e367901320b683683916df074fc15f7d2d81077374ec3bae8aa21e02adad57f
4
+ data.tar.gz: 9b703b5d47050e5c8e4c11368c4b96e91bf5dc714ff87aa5070531ad218d5e0f
5
5
  SHA512:
6
- metadata.gz: 97d09b136813ddb1033f1fd781b463d2f5ce73c2870eca81ac8f97c1f0522b292b0210d5b7fbe7144e2c4e769a1a143aa0c246d7c8e341ae996c265e0879c864
7
- data.tar.gz: ec701876470a33b87fcae9f11df202cc57a62f49f5e56bdea99c9bc0e5784927b7b31c4ae1df4759a96cdb946506bc4612a61201d08a7a9e313f2cdca1bc614e
6
+ metadata.gz: f9b4625fdf8065f21342064c728192349a9e15eafbd1517fb87fffafd94428fc77a99091d832ddc2612ebc841c4cc72b1a32fa43ec55f2e5320718419bc9304d
7
+ data.tar.gz: b09d30eed3b7a7ff61178c6dc476b926c77ca672ed4cd094c2e2624689ea2f9d764caeb37ae46fbb344f219c3930e07c3133556d1eda144db95167c30cd03a44
@@ -1,4 +1,6 @@
1
1
  class Holodex
2
2
  # https://docs.holodex.net/#operation/post-search-commentSearch
3
- def comment_search(**) = post('/search/commentSearch', **)
3
+ def comment_search(comment:, **)
4
+ post('/search/commentSearch', comment:, **)
5
+ end
4
6
  end
@@ -1,4 +1,4 @@
1
1
  class Holodex
2
2
  # https://docs.holodex.net/#operation/get-v2-channels-channelId-clips
3
- def related_videos(id:, type:, **) = get("channels/#{id}/#{type}", **)
3
+ def related_videos(id, type, **) = get("channels/#{id}/#{type}", **)
4
4
  end
data/lib/holodex.rb CHANGED
@@ -24,7 +24,7 @@ class Holodex
24
24
 
25
25
  private
26
26
 
27
- def encode_query(data)
27
+ def encode_query(**data)
28
28
  data.transform_keys!(&:to_s)
29
29
  data.transform_values! do |value|
30
30
  case value
@@ -57,8 +57,8 @@ class Holodex
57
57
  parse(response)
58
58
  end
59
59
 
60
- def post(path, **)
61
- payload = JSON.generate(**)
60
+ def post(path, **data)
61
+ payload = JSON.generate(data)
62
62
  uri = URI(BASE_API + path)
63
63
  response = Net::HTTP.post(uri, payload, @headers)
64
64
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holodex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akseluhreyter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-07 00:00:00.000000000 Z
11
+ date: 2023-08-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: