freshOS / ws-deprecated

⚠️ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing)
MIT License
353 stars 32 forks source link

Plain types parsing #34

Closed maxkonovalov closed 7 years ago

maxkonovalov commented 7 years ago

This makes possible to map plain swift types like this:

func getArticlesCount() -> Promise<Int> {
    return ws.get("/articles", keypath: "count")
}

Need to figure out a better way to parse RawRepresentable types to pass all the tests.

maxkonovalov commented 7 years ago

Also added some minor changes to WSError:

s4cha commented 7 years ago

Another Great feature to write more concise code 🎉👏