Reputation: 185
I have aws apigateway generated android sdk. I have included generated jar file and included this in build_gradle file.
Following is the sdk code. Can anyone please tell me how can I invoke methods in android app? I have user token from user pool after successful login. I need to use this token to sign request to the API.
@Service(
endpoint = "https://xxxxx.execute-api.zzzz.amazonaws.com/yyyy"
)
public interface StagingTestClient {
ApiResponse execute(ApiRequest var1);
@Operation(
path = "/accounts",
method = "GET"
)
void accountsGet();
@Operation(
path = "/accounts",
method = "POST"
)
void accountsPost();
@Operation(
path = "/accounts",
method = "DELETE"
)
void accountsDelete();
@Operation(
path = "/accounts",
method = "OPTIONS"
)
void accountsOptions();
}
Upvotes: 0
Views: 341
Reputation: 9020
This is covered in the API Gateway documentation:
http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-generate-sdk-android.html
Note: in order to have a meaningful SDK in Android you will need to create Request/Response models.
Upvotes: 1