
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
VERY simple first cut at a gem to interface with the ComicVine api. http://api.comicvine.com/
Add this line to your application's Gemfile:
gem 'comic_vine'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install comic_vine
You will also need to have a ComicVine API key.
Requires that API key be set manually. This is a breaking change from 0.0.4.
ComicVine::API.key = xxxxxx
Calls to plurals return a CVObjectList, which contains the result array as well as the values from the return (total_count, offset, limit, resource).
chars = ComicVine::API.characters
CVObjectLists include enumerable, so they can be looped.
chars.each do |c|
Pagination will return nil if you are at either end of the list, otherwise it will update the object allowing for looping
chars.next_page
chars.prev_page
Calls to singulars require an id and return a CVObject:
ComicVine::API.volume 766
Search takes a resource type or types, separated by a comma(ex. "volume,issue"), and a query string and returns a CVSearchList (also with pagination)
results = ComicVine::API.search 'volume', 'batman'
Call fetch to retrieve the full object
results.first.fetch
Pass in options as a hash
ComicVine::API.characters {:limit=>5, :offset=>10}
There are associations. Call the association by the key name, prefaced by get_ and the gem will return either a CVList or a CVObject from the API.
volume = ComicVine::API.volume 766
issues = volume.get_issues
chars = volume.get_character_credits
Error responses from the API will raise a CVError with the error message
This gem is released under the MIT license, if you find it useful in your application, drop me a line and I'll post a link!
More Error checking
Documentation
Tests
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that comic_vine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.