All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
figmaAttachmentAttachToKey | POST /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys | Attach the Figma attachment to a key |
figmaAttachmentDetachFromKey | DELETE /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} | Detach the Figma attachment from a key |
figmaAttachmentAttachToKey(projectId, figmaAttachmentId, id, xPhraseAppOTP, branch)
Attach the Figma attachment to a key
Attach the Figma attachment to a key
// Import classes:
import com.phrase.client.ApiClient;
import com.phrase.client.ApiException;
import com.phrase.client.Configuration;
import com.phrase.client.auth.*;
import com.phrase.client.models.*;
import com.phrase.client.api.KeysFigmaAttachmentsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.phrase.com/v2");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
Token.setApiKeyPrefix("token");
KeysFigmaAttachmentsApi apiInstance = new KeysFigmaAttachmentsApi(defaultClient);
String projectId = "projectId_example"; // String | Project ID
String figmaAttachmentId = "figmaAttachmentId_example"; // String | Figma attachment ID
String id = "id_example"; // String | ID
String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
String branch = "my-feature-branch"; // String | specify the branch to use
try {
apiInstance.figmaAttachmentAttachToKey(projectId, figmaAttachmentId, id, xPhraseAppOTP, branch);
} catch (ApiException e) {
System.err.println("Exception when calling KeysFigmaAttachmentsApi#figmaAttachmentAttachToKey");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | Project ID | |
figmaAttachmentId | String | Figma attachment ID | |
id | String | ID | |
xPhraseAppOTP | String | Two-Factor-Authentication token (optional) | [optional] |
branch | String | specify the branch to use | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | The resource was deleted successfully. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
figmaAttachmentDetachFromKey(projectId, figmaAttachmentId, id, xPhraseAppOTP, branch)
Detach the Figma attachment from a key
Detach the Figma attachment from a key
// Import classes:
import com.phrase.client.ApiClient;
import com.phrase.client.ApiException;
import com.phrase.client.Configuration;
import com.phrase.client.auth.*;
import com.phrase.client.models.*;
import com.phrase.client.api.KeysFigmaAttachmentsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.phrase.com/v2");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
Token.setApiKeyPrefix("token");
KeysFigmaAttachmentsApi apiInstance = new KeysFigmaAttachmentsApi(defaultClient);
String projectId = "projectId_example"; // String | Project ID
String figmaAttachmentId = "figmaAttachmentId_example"; // String | Figma attachment ID
String id = "id_example"; // String | ID
String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
String branch = "my-feature-branch"; // String | specify the branch to use
try {
apiInstance.figmaAttachmentDetachFromKey(projectId, figmaAttachmentId, id, xPhraseAppOTP, branch);
} catch (ApiException e) {
System.err.println("Exception when calling KeysFigmaAttachmentsApi#figmaAttachmentDetachFromKey");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | Project ID | |
figmaAttachmentId | String | Figma attachment ID | |
id | String | ID | |
xPhraseAppOTP | String | Two-Factor-Authentication token (optional) | [optional] |
branch | String | specify the branch to use | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | The resource was deleted successfully. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |