Skip to content

Cheffheid/MarvelAPIWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Marvel API wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages