Latest 3.0.0
Homepage https://github.com/kinkofer/PokemonAPI
License MIT
Platforms ios 9.3, osx 10.11, tvos 9.2, watchos 2.2, requires ARC
Authors

Build Status
Version
License
Platform
Carthage compatible

What is this?

PokemonAPI is a swift wrapper for Pokeapi (pokeapi.co).
It supports paginated responses, allowing you to easily get the next results or a specific page.
Linked resources can quickly be turned into their associated classes via a generic fetch(_ resource:) function.

All code is Swift native with no third party frameworks.

Usage

import PokemonAPI

PokemonAPI.berryService.fetchBerry("1") { result in
    switch result {
    case .success(let berryInfo):
        self.testLabel.text = berryInfo.name
    case .failure(let error):
        print(error)
    }
}

TODO

Installation

PokemonAPI is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'PokemonAPI'

If you’re using Carthage you can add PokemonAPI by adding it to your Cartfile:

github "kinkofer/PokemonAPI" ~> 3.0

In your Info.plist, add

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>pokeapi.co</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>TLSv1.2</string>
        </dict>
    </dict>
</dict>

Author

Christopher Jennewein, [email protected]

Forked from PokemonKit, Yeung Yiu Hung, http://github.com/ContinuousLearning/PokemonKit

License

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

Latest podspec

{
    "name": "PokemonAPI",
    "version": "3.0.0",
    "summary": "A wrapper for pokeapi v2",
    "description": "PokemonAPI is a swift wrapper for Pokeapi.",
    "homepage": "https://github.com/kinkofer/PokemonAPI",
    "license": "MIT",
    "authors": {
        "Christopher Jennewein": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kinkofer/PokemonAPI.git",
        "tag": "3.0.0"
    },
    "social_media_url": "https://twitter.com/kinkofer",
    "platforms": {
        "ios": "9.3",
        "osx": "10.11",
        "tvos": "9.2",
        "watchos": "2.2"
    },
    "swift_version": "4.2",
    "requires_arc": true,
    "source_files": [
        "Classes/**/*",
        "Network/**/*",
        "Utilities/**/*"
    ]
}

Pin It on Pinterest

Share This