Instagram offers two kind of APIs for developers. The Official API and Unofficial API.
They both have pros and cons, the private api is a tokenless api which means it doesn't require any token or app registration in Instagram system.
But you should know that its not authorized, maintained, sponsored or endorsed by Instagram.
SwiftyInsta allows you to build your own customized Instagram client or Bot. It is 100% open for all developers who wish to create applications on Instagram platform.
This project is still in development phase and intends to provide all features which are available in the Official API.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate SwiftyInsta into your Xcode project using CocoaPods, specify it to a target in your Podfile:
pod 'SwiftyInsta'
Then, run the following command:
$ pod install
To use this library in your project manually you may:
- Add compiled framework from General > Linked frameworks and libraries
- Clone the project, right click on your root project(not SwiftyInsta) and select Add files...
, then select the SwiftyInsta.xcodeproj
. after that go to your project>embeded libraries
and select SwiftyInsta.framework
, build the project and import SwiftyInsta
import SwiftyInsta
let _urlSession = URLSession(configuration: .default)
let handler = try! APIBuilder()
.createBuilder()
.setHttpHandler(urlSession: _urlSession)
.setRequestDelay(delay: .default)
.setUser(user: user)
.build()
try? handler.login { (result) in
//result: Result<LoginResultModel>
}
aslo to prevent known login issues, you can use Siwa, a helper framework for SwiftyInsta
try? handler.getUser(username: "username", completion: { (result) in
//result: (Result<UserModel>)
})
- See Features for all available APIs
- See Usage for more specific usage and use case documentation
- See Tests for some real world examples
Pull requests and issues are welcome
SwiftyInsta is licensed under the MIT license. See LICENSE for more info.