Latest 0.0.9
License MIT
Platforms ios 11.0
Dependencies Alamofire, RxAlamofire, RxSwift

EtsySwift 🖼

EtsySwift is built on top of RxAlamofire for your iOS projects written in Swift 4.2. for easy API connection with Etsy.


  1. Add pod 'EtsySwift' to your Podfile
  2. Run pod install
  3. Add import EtsySwift wherever you want to use the library

Setup ⚒

To setup the library, you need to pass your consumer key and consumer secret keys.
Never leave your confidential keys in your repository – use any form of obfuscation or cryptography to keep your data safe.

class API {
    let shared = API()
    let etsy: EtsySwift
    init() {
        etsy = EtsySwift(consumerKey: "CONSUMER_KEY", consumerSecret: "CONSUMER_SECRET")


After that you need to login, passing your required scope, as defined in Etsy API.

API.shared.etsy.login(["email_r"], callback: "etsyintegration://oauth-callback")

The second argument you pass is the callback URL that will be triggered after user will log in – Etsy uses oAuth authorization – the library will open a Safari window for you. You need to register your custom scheme in your application and pass it there.
Additionally, you need to add following method to your AppDelegate:

func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool {
    API.shared.etsy.callbackCalled(url: url)
    return true

Making Requests

After you authorize with the login method, you can easilly call any method from Etsy API that you have access to. I’ve also added a handy Rx extension for decoding the response from the API.

For now, the API only supports resources that I needed to use for my project (such as shops listing, products listing and getting images for products), but you can use the request(method:url:) method to request any resource you might need.
Let me know if you will need any other resources to be added to the library or submit a pull request.



  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add your changes
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request



Latest podspec

    "name": "EtsySwift",
    "version": "0.0.9",
    "summary": "Small library allowing reactive authorization with Etsy",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Maciej Kou0142ek": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "11.0"
    "source": {
        "git": "",
        "tag": "0.0.9"
    "swift_version": "4.2",
    "source_files": [
    "dependencies": {
        "Alamofire": [
        "RxAlamofire": [
        "RxSwift": [

Pin It on Pinterest

Share This