jikanrb 0.1.0 → 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: 322781c4fbc3373799633c17b00a1db8d7c0862e123d0cbade697542c30efbb0
4
- data.tar.gz: e63b3b3bccd110e0a234beab9304c5eac563163b8885aa8bf91d403fd212fdaf
3
+ metadata.gz: 16ab745e2cbe284b6d08962864868cada85910a8f3dfa42ea31c9a1b7eb8b2cb
4
+ data.tar.gz: 18bf2ec7f5b1f2a8f067af6f322fe7ddeffa62cbc43af4c0599e3481c39ee63e
5
5
  SHA512:
6
- metadata.gz: 9ed79ea3b2baa1f643d3e4369a34afad14da572ed36ba9dd5cc2176691f194e305dadecd5e7a40a663e8d32c9d0630eb6c4ff1e7c1fc288280a16bf8c4389c38
7
- data.tar.gz: ecfc01bce3b8f605d221508b9a803fa1f0febd5719cef1c7d4c51c040e586dca194d4462792fc85459584371f1ac342b06852f774adcfbd80832a74cceca5fca
6
+ metadata.gz: f6d3c48fadcf1bae1ea2c5ee78c06406b644b14d42b4ad943c71d31255e99f945eb38b3fe717dcd130624bced4a7512c7267221f06b58e0eb79c3172d9ee1933
7
+ data.tar.gz: 3971921f0998569e73ca17efa5a1223d45ac566c47e6a2148076e0aee0bf19629479b6ce6719fbd8da80c8b8ec744d10e87fe74b28c296b8ddaaeb7a85560917
data/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2026-01-10
4
+
5
+ ### Changed
6
+ - Changed info about gem for Ru8byGems
7
+
8
+ ## [0.2.0] - 2026-01-10
9
+
10
+ ### Added
11
+ - New endpoint methods:
12
+ - `character(id, full: false)` - Get character information
13
+ - `person(id, full: false)` - Get person information
14
+ - `top_anime(type:, filter:, page:)` - Get top anime rankings
15
+ - `top_manga(type:, filter:, page:)` - Get top manga rankings
16
+ - `season(year, season, page:)` - Get anime by season
17
+ - `season_now(page:)` - Get current season anime
18
+ - `schedules(day:)` - Get anime schedules
19
+ - Pagination helper module (`Jikanrb::Pagination`) with `each_page` iterator
20
+ - Global convenience methods (`Jikanrb.anime(1)`, `Jikanrb.search_anime("Naruto")`, etc.)
21
+ - `IndifferentHash` utility for flexible hash access (symbol/string keys)
22
+ - Enhanced error handling with custom exception classes:
23
+ - `ResourceNotFoundError` (404)
24
+ - `BadRequestError` (400)
25
+ - `RateLimitError` (429)
26
+ - `ServerError` (5xx)
27
+ - `TimeoutError`
28
+ - `ParseError`
29
+ - Retry mechanism with exponential backoff for transient errors
30
+ - Rate limiting awareness (respects Retry-After headers)
31
+
32
+ ### Changed
33
+ - Response hashes now support both symbol and string key access
34
+ - Configuration system supports both global and per-instance settings
35
+ - Improved test coverage (63 examples, all passing)
36
+ - All tests use WebMock stubs for independence from external API
37
+
38
+ ### Documentation
39
+ - Complete README with usage examples
40
+ - YARD documentation for all public methods
41
+ - RuboCop compliant (0 offenses)
42
+
3
43
  ## [0.1.0] - 2026-01-08
4
44
 
45
+ ### Added
5
46
  - Initial release
47
+ - Basic client with Faraday
48
+ - Core endpoints: `anime(id)`, `manga(id)`, `search_anime`, `search_manga`
49
+ - Configuration support
50
+ - Basic error handling
@@ -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 ? "/anime/#{id}/full" : "/anime/#{id}"
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 ? "/manga/#{id}/full" : "/manga/#{id}"
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 ? "/characters/#{id}/full" : "/characters/#{id}"
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 ? "/people/#{id}/full" : "/people/#{id}"
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('/anime', params.merge(q: query))
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('/manga', params.merge(q: query))
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('/top/anime', params)
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('/top/manga', params)
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("/seasons/#{year}/#{season}", page: page)
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('/seasons/now', page: page)
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 ? "/schedules/#{day}" : '/schedules'
157
+ path = day ? "schedules/#{day}" : 'schedules'
158
158
  get(path)
159
159
  end
160
160
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jikanrb
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.2'
5
5
  end
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.1.0
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-09 00:00:00.000000000 Z
11
+ date: 2026-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -73,14 +73,14 @@ files:
73
73
  - lib/jikanrb/utils.rb
74
74
  - lib/jikanrb/version.rb
75
75
  - sig/jikanrb.rbs
76
- homepage: https://github.com/tuusuario/jikanrb
76
+ homepage: https://github.com/sbrocos/jikanrb
77
77
  licenses:
78
78
  - MIT
79
79
  metadata:
80
80
  allowed_push_host: https://rubygems.org
81
- homepage_uri: https://github.com/tuusuario/jikanrb
82
- source_code_uri: https://github.com/tuusuario/jikanrb
83
- changelog_uri: https://github.com/tuusuario/jikanrb/blob/main/CHANGELOG.md
81
+ homepage_uri: https://github.com/sbrocos/jikanrb
82
+ source_code_uri: https://github.com/sbrocos/jikanrb
83
+ changelog_uri: https://github.com/sbrocos/jikanrb/blob/main/CHANGELOG.md
84
84
  documentation_uri: https://rubydoc.info/gems/jikanrb
85
85
  rubygems_mfa_required: 'true'
86
86
  post_install_message: