/SwifTumb

Tumblr client written by open source swift

Primary LanguageSwiftMIT LicenseMIT

SwifTumb

Build Status Codacy Badge

Tumblr client written by open source swift

Installation

SwiftPM

dependencies: [
    .Package(url: "https://github.com/ushios/SwifTumb.git", majorVersion: 0)
]

Examples

Using user/dashboard api

import SwifTumb

let client = SwifTumb(
    consumerKey: "",
    consumerSecret: "",
    oauthToken: "",
    oauthTokenSecret: ""
)

let handle = try! client.userDashboard(success: { (response: SwifTumbResponse) in
    print(response.meta.status) // 200
    print(response.response!.posts![0].blogName) // Print first blog_name of post list
}) { (error) in
    // error code
}

Testing and development

$ export SWIFTUMB_CONSUMER_KEY=""
$ export SWIFTUMB_CONSUMER_SECRET=""
$ export SWIFTUMB_OAUTH_TOKEN=""
$ export SWIFTUMB_OAUTH_TOKEN_SECRET=""
$ swift test

or create xcode project file using swift package generate-xcodeproj command and set environments on xcode.

Implemented list