TestsTested | โ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Apr 2016 |
SPMSupports SPM | โ |
Maintained by Humber Aquino, Andrew Yates, Jordan Morgan, Humber Aquino.
Depends on: | |
Moya | >= 0 |
ObjectMapper | >= 0 |
BufferSwiftKit is a Swift based SDK to access the Buffer API. The main goal is to provide a simple and easy interface to use Buffer in your iOS apps.
// Can get the token from https://buffer.com/developers/api
// Or use OAuth 2.0. See the demo project for a sample
let token = "...."
let bufferClient = MoyaBufferClient(token: token)
bufferClient.getProfiles({ (profiles) -> Void in
print("All right! You have \(profiles.count) profiles!")
}, failure: { (error) -> Void in
print(error)
})
This project is actively under development. Currently, we support Xcode 7 and Swift 2.
Go to https://buffer.com/developers/api and create an app.
After completing the the process you receive the Client secret in your email. Youโll need it configure OAuth 2.0
The rest of the app information is located here. Your application should look similar to this:
BufferKitClient just needs a token to interact with the API. So, you could use the provided access token listed in the appโs description for simple apps. Or, you can use OAuth 2.0 to request for a token associated with a particular user.
To use the demo project you just have to open:
open Demo/BufferSwiftKit\ Demo.xcworkspace
And run it with cmd+r. The app will prompt for the Buffer API token once.
In case you want to provide the API token programmatically you can do that inside the AppDelegate file. The line to change will look like this:
AuthManager.sharedManager.accessToken = "Insert token here"
We adhere to the Raywenderlich Swift coding style.
Please visit the CHANGELOG.md file.
We are always happy to talk shop, so feel free to give us a shout on Twitter:
Or, hey - Wanna come join us!? Weโre hiring!
BufferSwiftKit is released under the MIT license. See LICENSE for details.