Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cargath committed Jun 2, 2016
1 parent 29e1e2a commit 55257fb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# MarvelKit

A Swift SDK for working with the https://developer.marvel.com/ API.

## Usage

let client = MarvelKit(privateKey: "abcd", publicKey: "1234")

func performRequest() {
client
.request(Comic.self)
.withParameters([.DateRange(NSDate(timeIntervalSinceReferenceDate: 0), NSDate()), .Limit(2)])
.exec(success: onSuccess, error: onError)
}

func onSuccess(comicDataWrapper: ComicDataWrapper) {
print(comicDataWrapper)
}

func onError(error: MarvelKitError) {
print(error.description)
}

## Acknowledgements

I'm using the MD5 related bits from https://github.com/krzyzanowskim/CryptoSwift by Marcin Krzyżanowski until CommonCrypto works better with Swift. I could have used a Wrapper framework, but i didn't want to introduce a dependency and thought this was a great opportunity to see how MD5 is implemented.

0 comments on commit 55257fb

Please sign in to comment.