A Swift Class (Wrapper) for the Viddler API
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.)
Currently, ViddlerSwift requires SwiftyJSON for easy JSON Parsing.
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"])