mailslurp.api.GroupControllerApi
Load the API package
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
addContactsToGroup | PUT /groups/{groupId}/contacts | Add contacts to a group |
createGroup | POST /groups | Create a group |
deleteGroup | DELETE /groups/{groupId} | Delete group |
getAllGroups | GET /groups/paginated | Get all Contact Groups in paginated format |
getGroup | GET /groups/{groupId} | Get group |
getGroupWithContacts | GET /groups/{groupId}/contacts | Get group and contacts belonging to it |
getGroupWithContactsPaginated | GET /groups/{groupId}/contacts-paginated | |
getGroups | GET /groups | Get all groups |
removeContactsFromGroup | DELETE /groups/{groupId}/contacts | Remove contacts from a group |
GroupContactsDto addContactsToGroup(groupId, updateGroupContacts)
Add contacts to a group
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final groupId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final updateGroupContacts = UpdateGroupContacts(); // UpdateGroupContacts |
try {
final result = api_instance.addContactsToGroup(groupId, updateGroupContacts);
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->addContactsToGroup: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
groupId | String | ||
updateGroupContacts | UpdateGroupContacts |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
GroupDto createGroup(createGroupOptions)
Create a group
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final createGroupOptions = CreateGroupOptions(); // CreateGroupOptions |
try {
final result = api_instance.createGroup(createGroupOptions);
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->createGroup: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
createGroupOptions | CreateGroupOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
deleteGroup(groupId)
Delete group
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final groupId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
api_instance.deleteGroup(groupId);
} catch (e) {
print('Exception when calling GroupControllerApi->deleteGroup: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
groupId | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageGroupProjection getAllGroups(page, size, sort, since, before)
Get all Contact Groups in paginated format
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final page = 56; // int | Optional page in list pagination
final size = 56; // int | Optional page size in list pagination
final sort = sort_example; // String | Optional createdAt sort direction ASC or DESC
final since = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at after the given timestamp
final before = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at before the given timestamp
try {
final result = api_instance.getAllGroups(page, size, sort, since, before);
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->getAllGroups: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int | Optional page in list pagination | [optional] [default to 0] |
size | int | Optional page size in list pagination | [optional] [default to 20] |
sort | String | Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
GroupDto getGroup(groupId)
Get group
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final groupId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
final result = api_instance.getGroup(groupId);
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->getGroup: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
groupId | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
GroupContactsDto getGroupWithContacts(groupId)
Get group and contacts belonging to it
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final groupId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
final result = api_instance.getGroupWithContacts(groupId);
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->getGroupWithContacts: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
groupId | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageContactProjection getGroupWithContactsPaginated(groupId, page, size, sort, since, before)
Get group and paginated contacts belonging to it
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final groupId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final page = 56; // int | Optional page in group contact pagination
final size = 56; // int | Optional page size in group contact pagination
final sort = sort_example; // String | Optional createdAt sort direction ASC or DESC
final since = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at after the given timestamp
final before = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at before the given timestamp
try {
final result = api_instance.getGroupWithContactsPaginated(groupId, page, size, sort, since, before);
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->getGroupWithContactsPaginated: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
groupId | String | ||
page | int | Optional page in group contact pagination | [optional] [default to 0] |
size | int | Optional page size in group contact pagination | [optional] [default to 20] |
sort | String | Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
List
getGroups()
Get all groups
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
try {
final result = api_instance.getGroups();
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->getGroups: $en');
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
GroupContactsDto removeContactsFromGroup(groupId, updateGroupContacts)
Remove contacts from a group
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = GroupControllerApi();
final groupId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final updateGroupContacts = UpdateGroupContacts(); // UpdateGroupContacts |
try {
final result = api_instance.removeContactsFromGroup(groupId, updateGroupContacts);
print(result);
} catch (e) {
print('Exception when calling GroupControllerApi->removeContactsFromGroup: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
groupId | String | ||
updateGroupContacts | UpdateGroupContacts |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]