pokeapi-go
pokeapi-go copied to clipboard
Allow users to set target URL
- Added SetAPIPath function - seems helpful to allow users to set target URL if they're running their own PokeAPI server
- Added error handling around 4xx and 5xx codes (including HTTP retries, backoff etc), pretty sure this addresses https://github.com/mtslzr/pokeapi-go/issues/29 as we now raise when a 4xx code arrives rather than trying to parse no data
- Fixed two failing tests -- suspect due to changes on remote end (should probably mock API responses as part of the tests)
Codecov Report
Merging #30 (43226df) into master (ee7a30b) will decrease coverage by
6.60%
. The diff coverage is59.45%
.
@@ Coverage Diff @@
## master #30 +/- ##
==========================================
- Coverage 97.05% 90.44% -6.61%
==========================================
Files 14 14
Lines 204 178 -26
==========================================
- Hits 198 161 -37
- Misses 3 11 +8
- Partials 3 6 +3
Impacted Files | Coverage Δ | |
---|---|---|
client.go | 61.36% <59.45%> (-7.06%) |
:arrow_down: |
cache.go | 100.00% <0.00%> (ø) |
|
games.go | 100.00% <0.00%> (ø) |
|
items.go | 100.00% <0.00%> (ø) |
|
moves.go | 100.00% <0.00%> (ø) |
|
berries.go | 100.00% <0.00%> (ø) |
|
pokemon.go | 100.00% <0.00%> (ø) |
|
utility.go | 100.00% <0.00%> (ø) |
|
contests.go | 100.00% <0.00%> (ø) |
|
machines.go | 100.00% <0.00%> (ø) |
|
... and 4 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ee7a30b...43226df. Read the comment docs.