Latest 0.1.0
Homepage https://github.com/richardpiazza/DynuREST
License MIT
Platforms osx 10.12, ios 10.0, tvos 10.0, watchos 3.0, requires ARC
Dependencies CodeQuickKit
Frameworks Foundation
Authors

Version
Platform

Face it… a REST API that responds in only text doesn’t feel very modern. DynuREST attempts to translate the text responses from the Dynu.com IP Update API into propery HTTP status codes and meaningful errors.

API.swift

Provides a wrapper around CodeQuickKit.WebAPI that expands for a username/password credential combination. The update() function will execute the query and parse the ResponseCode returned.

Typical use:

let api = API(username: "username", password: "password")
api.update(ip: "127.0.0.1") { (statusCode, response, responseObject, error) in
    guard error == nil else {
        // Process Error
        return
    }

    guard statusCode < 300 else {
        // Non-OK response
        return
    }

    // All good
}

ResponseCode.swift

A reprsentation of the status codes that should be returned from the Dynu.com API. Use the init(stringValue:) with the test response fo parse the correct response.

String.swift

An extension of Swift.String with regex pattern matching of IPv4 and IPv6 address.

Latest podspec

{
    "name": "DynuREST",
    "version": "0.1.0",
    "summary": "An API wrapper for the Dynu.com IP Update API which attempts to model text responses to HTTP Status Codes.",
    "description": "Face it... a REST API that responds in only text doesn't feel very modern. DynuREST attempts to translate the textnresponses from the Dynu.com IP Update API into propery HTTP status codes and meaningful errors.",
    "homepage": "https://github.com/richardpiazza/DynuREST",
    "license": "MIT",
    "authors": {
        "Richard Piazza": "[email protected]"
    },
    "social_media_url": "https://twitter.com/richardpiazza",
    "source": {
        "git": "https://github.com/richardpiazza/DynuREST.git",
        "tag": "0.1.0"
    },
    "source_files": "Sources/*",
    "requires_arc": true,
    "platforms": {
        "osx": "10.12",
        "ios": "10.0",
        "tvos": "10.0",
        "watchos": "3.0"
    },
    "frameworks": "Foundation",
    "dependencies": {
        "CodeQuickKit": [
            "~> 4.2"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This