All Projects → wrap-away → Marvel-API

wrap-away / Marvel-API

Licence: MIT license
API wrapper for Marvel

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Marvel-API

marvel
API wrapper for Marvel Comics
Stars: ✭ 13 (-40.91%)
Mutual labels:  marvel, marvel-api, marvel-comics
marvel-jarvig
Marvel JARVIG (Just A Rather Very Interesting Game) is a game that lets you find and discover Marvel Comics characters based on their name, image and description!
Stars: ✭ 13 (-40.91%)
Mutual labels:  marvel, marvel-api
mcuapi
🦸 Marvel Cinematic Universe API
Stars: ✭ 14 (-36.36%)
Mutual labels:  marvel-api, marvel-comics
ovhnas
kernel for OVH Nas board (marvel armada375 based SYS-arm offering)
Stars: ✭ 36 (+63.64%)
Mutual labels:  marvel
thanosjs
Node.js implementation of Thanos JS website.
Stars: ✭ 34 (+54.55%)
Mutual labels:  marvel
marvel
Marvel Comics API for ruby
Stars: ✭ 13 (-40.91%)
Mutual labels:  marvel
hero
A superhero encyclopaedia made in React Native. Pulls from the SuperHeroAPI & ComicVine API
Stars: ✭ 53 (+140.91%)
Mutual labels:  marvel
Villains-and-Heroes
Android app built with MVP architectural approach and uses Marvel Comics API that allows developers everywhere to access information about Marvel's vast library of comics. ⚡
Stars: ✭ 53 (+140.91%)
Mutual labels:  marvel
KataSuperHeroesIOS
Super heroes kata for iOS Developers. The main goal is to practice UI Testing.
Stars: ✭ 69 (+213.64%)
Mutual labels:  marvel
SuperheroesAndroid
Android sample app using the Marvel API to show a list of superheroes
Stars: ✭ 14 (-36.36%)
Mutual labels:  marvel-api

Marvel API

Installation

Using pip:

pip install marvel

This is an API wrapper for Marvel.

Usage

Usage is as simple as it gets:

from marvel import Marvel
m = Marvel(PUBLIC_KEY, PRIVATE_KEY)

Now there are six objects presented namely, characters, comics, creators, events, series and stories as listed at Developers

characters = m.characters
comics = m.comics
creators = m.creators
events = m.events
series = m.series
stories = m.stories

Each of the above object returns back the appropriate response (json) as mentioned in official docs

Module Examples

Module Examples:

m = Marvel(PUBLIC_KEY, PRIVATE_KEY)
characters = m.characters

Get All Characters:

all_characters = characters.all()

Get Single Character:

character = characters.get(1011334)

Get Some Character's Comics:

comics = characters.comics(1011334)

Similarly, you could apply the same logic to different objects, an example:

m = Marvel(PUBLIC_KEY, PRIVATE_KEY)
stories = m.stories
all_stores = stories.all()
story = stories.get(id)
events = stories.events(id)

Finally, the sub resources that each object has are as follows:

  • Characters
    • all, get, comics, events, series, stories
  • Comics
    • all, get, characters, creators, events, stories
  • Creators
    • all, get, comics, events, series, stories
  • Events
    • all, get, characters, comics, creators, series, stories
  • Series
    • all, get, characters, comics, creators, events, stories
  • Stories
    • all, get, characters, comics, creators, events, series

Exception Handling

You can catch any exception caused by Marvel API such as authentication error, bad input error, server down error, etc by handling the MarvelException at marvel/exceptions.py.

Running Tests

python -m pytest tests/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].