nolboo / Swifter

A Twitter framework for iOS & OS X written in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swifter

Getting Started

###Installation

If you're using Xcode 6, Swifter can be installed by simply dragging the Swifter Xcode project into your own project and adding either the SwifteriOS or SwifterMac framework as an embeded framework.

###Usage

Instantiation with ACAccount:

let swifter = Swifter(account: twitterAccount)

Instansiation with OAuth:

let swifter = Swifter(consumerKey: "", consumerSecret: "")

OAuth Authorization:

swifter.authorizeWithCallbackURL(callbackURL, success: {
	accessToken, response in
	
	// ...
	
	}, 
	failure: {

	// ...

	})

Get Home Timeline:

swifter.getStatusesHomeTimelineWithCount(20, sinceID: nil, maxID: nil, trimUser: true, contributorDetails: false, includeEntities: true, success: {
	statuses, response in
	
	// ...

	}, failure: {
	
	// ...
	
	})

Streaming API:

swifter.getStatusesSampleDelimited(nil, stallWarnings: nil, progress: {
	statuses, response in
	
	// ...
	
	}, failure: {
	
	// ...
	
	})

Status Update:

swifter.postStatusUpdate("Hello, world", inReplyToStatusID: nil, lat: nil, long: nil, placeID: nil, displayCoordinates: nil, trimUser: nil, success: {
	json, response in
	
	// ...
	
	}, failure: {
	
	// ...
	
	})

#License

Swifter is licensed under the MIT License. See the LICENSE file for more information.

About

A Twitter framework for iOS & OS X written in Swift

License:MIT License