| Modifier and Type | Class and Description |
|---|---|
class |
ModuleWebhooks.Async
Async module.
|
| Constructor and Description |
|---|
ModuleWebhooks(retrofit2.Retrofit retrofit,
Executor callbackExecutor)
Create this module.
|
| Modifier and Type | Method and Description |
|---|---|
ModuleWebhooks.Async |
async()
Use this method if you require asynchronous requests through retrofit.
|
CMAWebhookCallDetail |
callDetails(String spaceId,
String webhookId,
String callId)
Get more information about one specific call to one specific webhook, hosted by one specific
space.
|
CMAArray<CMAWebhookCall> |
calls(String spaceId,
String webhookId)
Get more information about a specific webhook.
|
CMAWebhook |
create(String spaceId,
CMAWebhook webhook)
Create a new webhook.
|
CMAWebhook |
create(String spaceId,
String webhookId,
CMAWebhook webhook)
Create a new webhook with specified ID.
|
protected com.contentful.java.cma.ServiceWebhooks |
createService(retrofit2.Retrofit retrofit)
Internal method used for creating the service.
|
Integer |
delete(String spaceId,
String webhookId)
Delete a given Webhook by its ID.
|
CMAArray<CMAWebhook> |
fetchAll(String spaceId)
Retrieve all the webhooks defined for this space.
|
CMAArray<CMAWebhook> |
fetchAll(String spaceId,
Map<String,String> query)
Retrieve specific webhooks matching a query for this space.
|
CMAWebhook |
fetchOne(String spaceId,
String webhookId)
Retrieve exactly one webhook, whose id you know.
|
CMAWebhookHealth |
health(String spaceId,
String webhookId)
Return a general understanding of the health of the webhooks.
|
CMAWebhook |
update(CMAWebhook webhook)
Change the content of a webhook.
|
public ModuleWebhooks(retrofit2.Retrofit retrofit,
Executor callbackExecutor)
retrofit - An instance to an already setup Retrofit modulecallbackExecutor - Use this executor for this module.public ModuleWebhooks.Async async()
public CMAWebhook create(String spaceId, CMAWebhook webhook)
This will create a new ID and return the newly created webhook as a return value.
spaceId - Which space should be used?webhook - A representation of the Webhook to be used.IllegalArgumentException - if space's id is null.IllegalArgumentException - if webhook is null.public CMAWebhook create(String spaceId, String webhookId, CMAWebhook webhook)
Similar to create(String, CMAWebhook) but uses an id for this Webhook.
spaceId - the space, this Webhook should be created in.webhookId - What id should be given to the new webhook?webhook - Contains the actual data of the webhook to be created.IllegalArgumentException - if space's id is null.IllegalArgumentException - if webhookId is null.IllegalArgumentException - if webhook is null.public Integer delete(String spaceId, String webhookId)
spaceId - The id of the space hosting the webhook to be deleted.webhookId - The id of the actual webhook to be deleted.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhookId is null.public CMAArray<CMAWebhook> fetchAll(String spaceId)
spaceId - The id of the space to be asked for all of its spaces.CMAArray containing all found webhooks for this space.IllegalArgumentException - if spaceId is null.public CMAArray<CMAWebhook> fetchAll(String spaceId, Map<String,String> query)
spaceId - The id of the space to be asked for all of its spaces.query - Specifying the criteria on which webhooks to return.CMAArray containing all found webhooks for this space.IllegalArgumentException - if spaceId is null.public CMAWebhook fetchOne(String spaceId, String webhookId)
spaceId - The id of the space to be hosting this webhook.webhookId - The id of the webhook to be returned.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhookId is null.public CMAWebhook update(CMAWebhook webhook)
This will take the webhooks id and update it on the backend.
webhook - The webhook retrieved beforehand to be changed.IllegalArgumentException - if webhook is null.IllegalArgumentException - if webhookId is null.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if version is null.public CMAArray<CMAWebhookCall> calls(String spaceId, String webhookId)
spaceId - The id of the space hosting the webhookwebhookId - The id of the webhook to be asked for more detail.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhook is null.CMAWebhookCallpublic CMAWebhookCallDetail callDetails(String spaceId, String webhookId, String callId)
spaceId - A space id, identifying the space containing the webhook.webhookId - A webhook id containing the webhook containing the call.callId - A call id identifying the call to be informed about.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhook is null.IllegalArgumentException - if callId is null.public CMAWebhookHealth health(String spaceId, String webhookId)
spaceId - Which space does host this webhook?webhookId - Which webhook should be asked for its health?IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhook is null.protected com.contentful.java.cma.ServiceWebhooks createService(retrofit2.Retrofit retrofit)
retrofit - A Retrofit instance to create the service from.Copyright © 2017 Contentful, GmbH.. All Rights Reserved.