Latest 0.1.1
Homepage https://github.com/kmonaghan/MDAMarvelAPI
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking
Authors

Version
Platform

An unofficial iOS library to access the Marvel.com API.

Getting Started with the demo

The example uses CocoaPods. From within the Example folder you should run the following:

pod install

Copy CBPDefines-example.h to CBPDefines.h and fill in your public and private keys in CBPDefines.h.

The example app currently shows you this week’s releases by default and allows you to search to last/next week’s releases. Tapping a cell brings you to a (very) crude standalone comic details screen.

Installation

CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects.

Add the follow to your podfile:

pod "MDAMarvelAPI", "~> 0.1.0"

Manual

Copy the contents of the MDAMarvelAPI folder into your project.

Usage

Include MDAMarvelAPIClient.h and NSURLSessionDataTask+MarvelDeveloperAPI.h where ever you want to be able to access the Marvel API.

For example, if we wanted to view the details of "Avengers Assemble #24" which we know has an id of 48564 and save the result of an instance variable called comic, we simply perform the following call:

    __weak typeof(self) blockSelf = self;

    NSInteger comicId = 48564;

    [NSURLSessionDataTask fetchComicWithId:comicId
                                withBlock:^(MDAComic *comic, NSError *error) {
                                    blockSelf.comic = comic;
    }];

Requirements

MDAMarvelAPI requires iOS 7.0 and above.

MDAMarvelAPI uses AFNetworking for network connectivity.

ARC

MDAMarvelAPI uses ARC.

Contributing

First of all, thank you for contributing, you are awesome!

Please, write commit messages that make
sense
,
and rebase your branch
before submitting your Pull Request.

One may ask you to squash your
commits

too. This is used to "clean" your Pull Request before merging it (we don’t want
commits such as fix tests, fix 2, fix 3, etc.).

Thank you!

Contact

Karl Monaghan

License

MDAMarvelAPI is available under the MIT license. See the LICENSE file for more info.

All data fetched is provided by Marvel. © 2014 Marvel.

Latest podspec

{
    "name": "MDAMarvelAPI",
    "version": "0.1.1",
    "summary": "An unofficial library to access the Marvel developer API.",
    "homepage": "https://github.com/kmonaghan/MDAMarvelAPI",
    "license": "MIT",
    "authors": {
        "Karl Monaghan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kmonaghan/MDAMarvelAPI.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/karlmonaghan",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "MDAMarvelAPI/*.{h,m}",
    "dependencies": {
        "AFNetworking": [
            "~> 2.0.0"
        ]
    }
}

Pin It on Pinterest

Share This