public final class ModulePersonalAccessTokens
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ModulePersonalAccessTokens.Async
Async module.
|
Constructor and Description |
---|
ModulePersonalAccessTokens(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor,
boolean environmentIdConfigured)
Create this module.
|
Modifier and Type | Method and Description |
---|---|
ModulePersonalAccessTokens.Async |
async() |
CMAPersonalAccessToken |
create(CMAPersonalAccessToken token)
Create a new personal access token.
|
protected com.contentful.java.cma.ServicePersonalAccessTokens |
createService(retrofit2.Retrofit retrofit) |
CMAArray<CMAPersonalAccessToken> |
fetchAll() |
CMAArray<CMAPersonalAccessToken> |
fetchAll(java.util.Map<java.lang.String,java.lang.String> query) |
CMAPersonalAccessToken |
fetchOne(java.lang.String tokenId) |
CMAPersonalAccessToken |
revoke(CMAPersonalAccessToken token)
Revoke a delivery api token.
|
public ModulePersonalAccessTokens(retrofit2.Retrofit retrofit, java.util.concurrent.Executor callbackExecutor, boolean environmentIdConfigured)
retrofit
- the retrofit instance to be used to create the service.callbackExecutor
- to tell on which thread it should run.environmentIdConfigured
- internal helper to see if environment was set.protected com.contentful.java.cma.ServicePersonalAccessTokens createService(retrofit2.Retrofit retrofit)
public CMAArray<CMAPersonalAccessToken> fetchAll()
public CMAArray<CMAPersonalAccessToken> fetchAll(java.util.Map<java.lang.String,java.lang.String> query)
query
- defines the items to be returned.public CMAPersonalAccessToken fetchOne(java.lang.String tokenId)
tokenId
- the id of the access token to be returned.public CMAPersonalAccessToken create(CMAPersonalAccessToken token)
This method is the _only_ time you will see the personal access token value. Please keep
it save after this call, because a fetchAll()
or a fetchOne(String)
will
_not_ return it!
token
- the token to be created on Contentful.public CMAPersonalAccessToken revoke(CMAPersonalAccessToken token)
token
- the token to be revoked.public ModulePersonalAccessTokens.Async async()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.