Skip to content
Marvel API wrapper
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
.gitattributes
.gitignore
README.md
marvel_api.py
requirements.txt

README.md

Marvel API Wrapper

This API wrapper is a work in progress. It gives the ability to interface with the Marvel API.

I've tried to structure this project logically, since it all boils down to a selection of eight methods for each type. As such, each type will only override the methods that are not available for it and tell you that it won't work. For example, it's not possible to get creators for a character will result in the following message instead:

Not a valid method for Characters

Usage

To use this, you will need to obtain an API key from Marvel. Using this API key, all you need to do is instantiate the Marvel API object:

from marvel_api import MarvelAPIObject

API_KEY = ""

marvel = MarvelAPIObject(API_KEY)

From there, you can get information about characters, comics, creators, events, series, or stories. For example:

print marvel.characters.getOne(15)
print marvel.characters.getList(arguments)

Arguments

Apart from the getOne call, which only accepts an "id" argument, all methods require an arguments dict. The arguments for each type may vary, and you'll want to refer to the API documentation to see what you can use.

TODO

  • Actually make the API calls (currently only returns the URL to be called)
You can’t perform that action at this time.