All URIs are relative to https://api.egoiapp.com
Method | HTTP request | Description |
---|---|---|
deleteSegment | DELETE /lists/{list_id}/segments/{segment_id} | Remove segment |
getAllSegments | GET /lists/{list_id}/segments | Get all segments |
deleteSegment(segmentId, listId)
Remove segment
Remove segment information given its ID
// Import classes:
import org.egoi.client.ApiClient;
import org.egoi.client.ApiException;
import org.egoi.client.Configuration;
import org.egoi.client.auth.*;
import org.egoi.client.models.*;
import org.egoi.client.api.SegmentsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.egoiapp.com");
// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");
SegmentsApi apiInstance = new SegmentsApi(defaultClient);
String segmentId = "segmentId_example"; // String | ID of the Segment
Integer listId = 56; // Integer | ID of the List
try {
apiInstance.deleteSegment(segmentId, listId);
} catch (ApiException e) {
System.err.println("Exception when calling SegmentsApi#deleteSegment");
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 |
---|---|---|---|
segmentId | String | ID of the Segment | |
listId | Integer | ID of the List |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
408 | Request Timeout | - |
409 | Conflict | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
503 | Service Unavailable | - |
SegmentCollection getAllSegments(listId, type, name, offset, limit)
Get all segments
Returns all segments
// Import classes:
import org.egoi.client.ApiClient;
import org.egoi.client.ApiException;
import org.egoi.client.Configuration;
import org.egoi.client.auth.*;
import org.egoi.client.models.*;
import org.egoi.client.api.SegmentsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.egoiapp.com");
// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");
SegmentsApi apiInstance = new SegmentsApi(defaultClient);
Integer listId = 56; // Integer | ID of the List
String type = "auto"; // String | Type of segment
String name = "name_example"; // String | Segment name
Integer offset = 56; // Integer | Element offset (starting at zero for the first element)
Integer limit = 10; // Integer | Number of items to return
try {
SegmentCollection result = apiInstance.getAllSegments(listId, type, name, offset, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SegmentsApi#getAllSegments");
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 |
---|---|---|---|
listId | Integer | ID of the List | |
type | String | Type of segment | [optional] [enum: auto, saved, tag] |
name | String | Segment name | [optional] |
offset | Integer | Element offset (starting at zero for the first element) | [optional] |
limit | Integer | Number of items to return | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Forbidden | - |
408 | Request Timeout | - |
422 | Unprocessable Entity | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
503 | Service Unavailable | - |