Swift Class (Wrapper) for the Viddler API
Swift
Latest commit 65fc649 Sep 15, 2014 Tom Kover Fix spelling error
Permalink
Failed to load latest commit information.
README.md
ViddlerSwift.swift

README.md

ViddlerSwift

A Swift Class (Wrapper) for the Viddler API

Important Note

This Wrapper is not yet fully supported by Viddler, as it was a Swift Coding experiment. Please feel free to submit suggestions or (hopefuly detailed) pull requests (as this is educational in nature at the moment.)

Requirements

Currently, ViddlerSwift requires SwiftyJSON for easy JSON Parsing.

Usage

To initalize:

let viddler = Viddler(key: "API_KEY")

Then use the JSON object to call a method. Parameters are passed as a [String: String] Dictionary type. For Example:

let auth: JSONValue = viddler.viddlerUsersAuth(["user": "YOUR_USERNAME", "password": "YOUR_VIDDLER_PASSWORD"])

var sessionid: String = auth["auth"]["sessionid"].string!

let updateVideo: JSONValue = viddler.viddlerVideosSetDetails(["sessionid": sessionid, "video_id": "VIDEO_ID", "title": "VIDEO_TITLE"])