This repository has been archived by the owner on May 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
RESTful API Example
Adrián Rivero edited this page Mar 16, 2017
·
5 revisions
@ServerModel(
baseUrl= Config.SERVER,
getHeaders = "Authorization=Bearer {token.getAccessToken()}",
load = {
@ServerRequest(
name = "list",
action = "user"
),
@ServerRequest(
name = "read",
action = "user/{remote_id}"
)
},
put = {
@ServerRequest(
name = "create",
method = ServerRequest.RequestMethod.Post,
action = "user",
model = "this"
),
@ServerRequest(
name = "update",
method = ServerRequest.RequestMethod.Put,
action = "user/{remote_id}",
model = "this"
),
@ServerRequest(
name = "delete",
action = "user/{remote_id}",
method = ServerRequest.RequestMethod.Delete
)
}
)
public class User extends BaseModel {
@Model
static Token_ token;
String name;
String email;
String image;
String password;
}
Sponsored by DSpot Sp. z o.o. Contact us at info@dspot.com.pl