An unofficial iOS library to access the Marvel.com API.
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.
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"
Copy the contents of the MDAMarvelAPI
folder into your project.
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;
}];
MDAMarvelAPI requires iOS 7.0 and above.
MDAMarvelAPI uses AFNetworking for network connectivity.
MDAMarvelAPI uses ARC.
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!
Karl Monaghan
MDAMarvelAPI is available under the MIT license. See the LICENSE file for more info.
All data fetched is provided by Marvel. © 2014 Marvel.