OAIContactControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
createContact | POST /contacts | Create a contact |
deleteContact | DELETE /contacts/{contactId} | Delete contact |
getAllContacts | GET /contacts/paginated | Get all contacts |
getContact | GET /contacts/{contactId} | Get contact |
getContactVCard | GET /contacts/{contactId}/download | Get contact vCard vcf file |
getContacts | GET /contacts | Get all contacts |
-(NSURLSessionTask*) createContactWithCreateContactOptions: (OAICreateContactOptions*) createContactOptions
completionHandler: (void (^)(OAIContactDto* output, NSError* error)) handler;
Create a contact
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAICreateContactOptions* createContactOptions = [[OAICreateContactOptions alloc] init]; //
OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];
// Create a contact
[apiInstance createContactWithCreateContactOptions:createContactOptions
completionHandler: ^(OAIContactDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIContactControllerApi->createContact: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
createContactOptions | OAICreateContactOptions* |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) deleteContactWithContactId: (NSString*) contactId
completionHandler: (void (^)(NSError* error)) handler;
Delete contact
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* contactId = @"contactId_example"; //
OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];
// Delete contact
[apiInstance deleteContactWithContactId:contactId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling OAIContactControllerApi->deleteContact: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
contactId | NSString* |
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 ]
-(NSURLSessionTask*) getAllContactsWithPage: (NSNumber*) page
size: (NSNumber*) size
sort: (NSString*) sort
since: (NSDate*) since
before: (NSDate*) before
completionHandler: (void (^)(OAIPageContactProjection* output, NSError* error)) handler;
Get all contacts
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSNumber* page = @0; // Optional page in list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)
OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];
// Get all contacts
[apiInstance getAllContactsWithPage:page
size:size
sort:sort
since:since
before:before
completionHandler: ^(OAIPageContactProjection* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIContactControllerApi->getAllContacts: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | NSNumber* | Optional page in list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size in list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
since | NSDate* | Filter by created at after the given timestamp | [optional] |
before | NSDate* | 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 ]
-(NSURLSessionTask*) getContactWithContactId: (NSString*) contactId
completionHandler: (void (^)(OAIContactDto* output, NSError* error)) handler;
Get contact
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* contactId = @"contactId_example"; //
OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];
// Get contact
[apiInstance getContactWithContactId:contactId
completionHandler: ^(OAIContactDto* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIContactControllerApi->getContact: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
contactId | NSString* |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getContactVCardWithContactId: (NSString*) contactId
completionHandler: (void (^)(NSArray<NSData*>* output, NSError* error)) handler;
Get contact vCard vcf file
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
NSString* contactId = @"contactId_example"; //
OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];
// Get contact vCard vcf file
[apiInstance getContactVCardWithContactId:contactId
completionHandler: ^(NSArray<NSData*>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIContactControllerApi->getContactVCard: %@", error);
}
}];
Parameters
Name | Type | Description | Notes |
---|---|---|---|
contactId | NSString* |
Return type
NSArray
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
-(NSURLSessionTask*) getContactsWithCompletionHandler:
(void (^)(NSArray<OAIContactProjection>* output, NSError* error)) handler;
Get all contacts
Example
OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];
// Get all contacts
[apiInstance getContactsWithCompletionHandler:
^(NSArray<OAIContactProjection>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIContactControllerApi->getContacts: %@", error);
}
}];
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 ]