Serialization: ?
Special Data Types:
- Error { int code; string message }
- ApiResponse { T object; Error? error; }
- GeoPoint { double lat, long; }
- Token { string token; }
- FailableAction { bool sucess; }
- Lockbox { .. }
? - means Optional, so object could be null!, and should be asked for null before job [] - is array
EX:
-
/:namespace/:method
- HTTP_METHOD:methodName(type :paramName...) -> ReturnType SO request : HTTP_METHOD /:namespace/:methodName(?):paramName=(type)$(:paramName)
-
/phone/ // for auth logics and stuff
- GET:sendCode(string phoneNumber) -> ApiResponse // hard-code 'code' for some number
- GET:validateCode(string code, Token token) -> ApiResponse // on server token should be moved to properly authorized
-
/settings/ // for user specific settings
-
/user/ // for some user related info
-
/lockbox/ // for lockboxes
- GET:list(GeoPoint? userPosition, GeoPoint? prefferedPosition...) -> ApiResponse<Lockbox[]>