public class FieldsApi extends CrowdinApi
clientConfig, graphqlUrl, httpClient, url
Constructor and Description |
---|
FieldsApi(Credentials credentials) |
FieldsApi(Credentials credentials,
ClientConfig clientConfig) |
Modifier and Type | Method and Description |
---|---|
ResponseObject<Field> |
addField(FieldRequest request) |
void |
deleteField(java.lang.Long fieldId) |
ResponseObject<Field> |
editField(java.lang.Long fieldId,
java.util.List<PatchRequest> request) |
ResponseList<Field> |
getField(java.lang.Long fieldId) |
ResponseList<Field> |
listFields(ListFieldsParams params) |
ResponseList<Field> |
listFields(java.lang.String entity,
java.lang.String search,
java.lang.Integer limit,
java.lang.Integer offset) |
graphql, graphql
public FieldsApi(Credentials credentials)
public FieldsApi(Credentials credentials, ClientConfig clientConfig)
public ResponseList<Field> listFields(java.lang.String entity, java.lang.String search, java.lang.Integer limit, java.lang.Integer offset) throws HttpException, HttpBadRequestException
entity
- Filter fields by entity EntityType
search
- Search fields by slug or namelimit
- maximum number of items to retrieve (default 25)offset
- starting offset in the collection (default 0)HttpException
HttpBadRequestException
public ResponseList<Field> listFields(ListFieldsParams params) throws HttpException, HttpBadRequestException
HttpException
HttpBadRequestException
public ResponseObject<Field> addField(FieldRequest request) throws HttpException, HttpBadRequestException
request
- object FieldRequest
HttpException
HttpBadRequestException
public ResponseList<Field> getField(java.lang.Long fieldId) throws HttpException, HttpBadRequestException
fieldId
- field identifierHttpException
HttpBadRequestException
public void deleteField(java.lang.Long fieldId) throws HttpException, HttpBadRequestException
fieldId
- field identifierHttpException
HttpBadRequestException
public ResponseObject<Field> editField(java.lang.Long fieldId, java.util.List<PatchRequest> request) throws HttpException, HttpBadRequestException
fieldId
- field identifierrequest
- objectHttpException
HttpBadRequestException