Launchpad 0.3.0

Launchpad 0.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2016
SPMSupports SPM

Maintained by Bruno Farache.



 
Depends on:
later= 0.1.0
Socket.IO-Client-Swift= 4.1.6
 

Launchpad 0.3.0

  • By
  • Bruno Farache

Connect to your API

pod 'Launchpad'
import Launchpad

Read and Write Data

Launchpad
    .url("http://liferay.io/<YOUR-APP>/<YOUR-SERVICE>/items")
    .post([
        "title": "Star Wars IV",
        "year": 1977
    ])
    .then { response in
        print("Data saved")
    }
.done()
Launchpad
    .url("http://liferay.io/<YOUR-APP>/<YOUR-SERVICE>/items")
    .get()
    .then { response in
        let movies = response.body as? [String: AnyObject]
        print(movies)
    }
.done()
Launchpad
    .url("http://liferay.io/app/service/movies")
    .filter("year", ">", 2000)
    .sort("rating")
    .limit(2)
    .offset(1)
    .get()
    .then { response in
        let movies = response.body as? [String: AnyObject]
        print(movies)
    }
.done()