public class StorageApi extends CrowdinApi
clientConfig, graphqlUrl, httpClient, url
Constructor and Description |
---|
StorageApi(Credentials credentials) |
StorageApi(Credentials credentials,
ClientConfig clientConfig) |
Modifier and Type | Method and Description |
---|---|
ResponseObject<Storage> |
addStorage(java.lang.String fileName,
java.io.InputStream content) |
ResponseObject<Storage> |
addStorage(java.lang.String fileName,
java.lang.String content) |
void |
deleteStorage(java.lang.Long storageId) |
ResponseObject<Storage> |
getStorage(java.lang.Long storageId) |
ResponseList<Storage> |
listStorages(java.lang.Integer limit,
java.lang.Integer offset) |
graphql, graphql
public StorageApi(Credentials credentials)
public StorageApi(Credentials credentials, ClientConfig clientConfig)
public ResponseList<Storage> listStorages(java.lang.Integer limit, java.lang.Integer offset) throws HttpException, HttpBadRequestException
limit
- maximum number of items to retrieve (default 25)offset
- starting offset in the collection (default 0)HttpException
HttpBadRequestException
public ResponseObject<Storage> addStorage(java.lang.String fileName, java.lang.String content) throws HttpException, HttpBadRequestException
fileName
- file namecontent
- file contentHttpException
HttpBadRequestException
public ResponseObject<Storage> addStorage(java.lang.String fileName, java.io.InputStream content) throws HttpException, HttpBadRequestException
fileName
- file namecontent
- file contentHttpException
HttpBadRequestException
public ResponseObject<Storage> getStorage(java.lang.Long storageId) throws HttpException, HttpBadRequestException
storageId
- storage identifierHttpException
HttpBadRequestException
public void deleteStorage(java.lang.Long storageId) throws HttpException, HttpBadRequestException
storageId
- storage identifierHttpException
HttpBadRequestException