Download the PHP package grzgajda/comicvine-api without Composer
On this page you can find all versions of the php package grzgajda/comicvine-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download grzgajda/comicvine-api
More information about grzgajda/comicvine-api
Files in grzgajda/comicvine-api
Package comicvine-api
Short Description PHP class wrapper providing a simple and flexible methods to using ComicVine API.
License MIT
Informations about the package comicvine-api
ComicVine API
Author: Grzegorz Gajda [email protected]
Update v1.1.1
Arguments for filters etc. didn't work when string has space character. With version 1.1.1, it is fixed. Also 98% of code
has coverage (directory tests
).
Update v1.1.0
If you don't want to use CURLConnection
class, I added built-in integration with guzzlehttp/guzzle package. Since version 1.1.0, default provider for HTTP connection is GuzzleConnection
class.
Basic usage
First, we need to create instance of RegisterKey
object to verify our key. We can use ComicVine
static class to make that object.
Next, we need register key and connection to ComicVine
class. By default, method register
use built-in CURLConnection
class to make connections. Then, you haven't to write second argument.
After registering, we can creating query to ComicVine API. But by default, response will be in XML format. We can change response format by creating instance of ResponseFormat
class.
and then using query (we want to find url to Batman):
Now, variable $response
keep our JSON response from ComicVine API.
Requests
List of implemented resources:
URL | method | implemented? |
---|---|---|
/character | none | false |
/characters | getCharacters | true |
/chat | none | false |
/chats | getChats | true |
/concept | none | false |
/concepts | getConcepts | true |
/episode | none | false |
/episodes | getEpisodes | true |
/issue | none | false |
/issues | getIssues | true |
/location | none | false |
/locations | getLocations | true |
/movie | none | false |
/movies | getMovies | true |
/object | none | false |
/objects | getObjects | true |
/origin | none | false |
/origins | getOrigins | true |
/person | none | false |
/people | getPeople | true |
/power | none | false |
/powers | getPowers | true |
/promo | none | false |
/promos | getPromos | true |
/publisher | none | false |
/publishers | getPublishers | true |
/series | none | false |
/series_list | getSeriesList | true |
/search | getSearch | false |
/story_arc | none | false |
/story_arcs | getStoryArcs | true |
/team | none | false |
/teams | getTeams | true |
/video | none | false |
/videos | getVideos | false |
/video_type | none | false |
/video_types | getVideoTypes | true |
/volume | none | false |
/volumes | getVolumes | true |
Calling each one of get
method creating a new instance of ControllerQuery
class. ControllerQuery
class allows us to:
Extending
Looking on current state of package, you can write your own Connection
class (must implement interface Connection
) and ResponseFormat
(must implement interface ResponseFormat
). We can use new Connection
class in ComicVine::register()
method and new ResponseFormat
class in setFormat
method.
License
The package is open-sourced software licensed under the MIT license