jikanrb 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 +4 -4
- data/lib/jikanrb/client.rb +11 -11
- data/lib/jikanrb/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: 16ab745e2cbe284b6d08962864868cada85910a8f3dfa42ea31c9a1b7eb8b2cb
|
|
4
|
+
data.tar.gz: 18bf2ec7f5b1f2a8f067af6f322fe7ddeffa62cbc43af4c0599e3481c39ee63e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6d3c48fadcf1bae1ea2c5ee78c06406b644b14d42b4ad943c71d31255e99f945eb38b3fe717dcd130624bced4a7512c7267221f06b58e0eb79c3172d9ee1933
|
|
7
|
+
data.tar.gz: 3971921f0998569e73ca17efa5a1223d45ac566c47e6a2148076e0aee0bf19629479b6ce6719fbd8da80c8b8ec744d10e87fe74b28c296b8ddaaeb7a85560917
|
data/lib/jikanrb/client.rb
CHANGED
|
@@ -53,7 +53,7 @@ module Jikanrb
|
|
|
53
53
|
# @param full [Boolean] If true, returns extended information
|
|
54
54
|
# @return [Hash] Anime data
|
|
55
55
|
def anime(id, full: false)
|
|
56
|
-
path = full ? "
|
|
56
|
+
path = full ? "anime/#{id}/full" : "anime/#{id}"
|
|
57
57
|
get(path)
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ module Jikanrb
|
|
|
63
63
|
# @param full [Boolean] If true, returns extended information
|
|
64
64
|
# @return [Hash] Manga data
|
|
65
65
|
def manga(id, full: false)
|
|
66
|
-
path = full ? "
|
|
66
|
+
path = full ? "manga/#{id}/full" : "manga/#{id}"
|
|
67
67
|
get(path)
|
|
68
68
|
end
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ module Jikanrb
|
|
|
73
73
|
# @param full [Boolean] If true, returns extended information
|
|
74
74
|
# @return [Hash] Character data
|
|
75
75
|
def character(id, full: false)
|
|
76
|
-
path = full ? "
|
|
76
|
+
path = full ? "characters/#{id}/full" : "characters/#{id}"
|
|
77
77
|
get(path)
|
|
78
78
|
end
|
|
79
79
|
|
|
@@ -83,7 +83,7 @@ module Jikanrb
|
|
|
83
83
|
# @param full [Boolean] If true, returns extended information
|
|
84
84
|
# @return [Hash] Person data
|
|
85
85
|
def person(id, full: false)
|
|
86
|
-
path = full ? "
|
|
86
|
+
path = full ? "people/#{id}/full" : "people/#{id}"
|
|
87
87
|
get(path)
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -93,7 +93,7 @@ module Jikanrb
|
|
|
93
93
|
# @param params [Hash] Additional filters (type, score, status, etc.)
|
|
94
94
|
# @return [Hash] Search results
|
|
95
95
|
def search_anime(query, **params)
|
|
96
|
-
get('
|
|
96
|
+
get('anime', params.merge(q: query))
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
# Search manga
|
|
@@ -102,7 +102,7 @@ module Jikanrb
|
|
|
102
102
|
# @param params [Hash] Additional filters
|
|
103
103
|
# @return [Hash] Search results
|
|
104
104
|
def search_manga(query, **params)
|
|
105
|
-
get('
|
|
105
|
+
get('manga', params.merge(q: query))
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# Top anime
|
|
@@ -115,7 +115,7 @@ module Jikanrb
|
|
|
115
115
|
params = { page: page }
|
|
116
116
|
params[:type] = type if type
|
|
117
117
|
params[:filter] = filter if filter
|
|
118
|
-
get('
|
|
118
|
+
get('top/anime', params)
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
# Top manga
|
|
@@ -128,7 +128,7 @@ module Jikanrb
|
|
|
128
128
|
params = { page: page }
|
|
129
129
|
params[:type] = type if type
|
|
130
130
|
params[:filter] = filter if filter
|
|
131
|
-
get('
|
|
131
|
+
get('top/manga', params)
|
|
132
132
|
end
|
|
133
133
|
|
|
134
134
|
# Seasonal anime
|
|
@@ -138,7 +138,7 @@ module Jikanrb
|
|
|
138
138
|
# @param page [Integer] Page number
|
|
139
139
|
# @return [Hash] Seasonal anime
|
|
140
140
|
def season(year, season, page: 1)
|
|
141
|
-
get("
|
|
141
|
+
get("seasons/#{year}/#{season}", page: page)
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
# Current season
|
|
@@ -146,7 +146,7 @@ module Jikanrb
|
|
|
146
146
|
# @param page [Integer] Page number
|
|
147
147
|
# @return [Hash] Current season anime
|
|
148
148
|
def season_now(page: 1)
|
|
149
|
-
get('
|
|
149
|
+
get('seasons/now', page: page)
|
|
150
150
|
end
|
|
151
151
|
|
|
152
152
|
# Weekly schedule
|
|
@@ -154,7 +154,7 @@ module Jikanrb
|
|
|
154
154
|
# @param day [String, nil] Day: "monday", "tuesday", etc.
|
|
155
155
|
# @return [Hash] Anime schedule
|
|
156
156
|
def schedules(day: nil)
|
|
157
|
-
path = day ? "
|
|
157
|
+
path = day ? "schedules/#{day}" : 'schedules'
|
|
158
158
|
get(path)
|
|
159
159
|
end
|
|
160
160
|
|
data/lib/jikanrb/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jikanrb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergio Brocos
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|