OAIContactControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
createContactPOST /contactsCreate a contact
deleteContactDELETE /contacts/{contactId}Delete contact
getAllContactsGET /contacts/paginatedGet all contacts
getContactGET /contacts/{contactId}Get contact
getContactVCardGET /contacts/{contactId}/downloadGet contact vCard vcf file
getContactsGET /contactsGet all contacts

createContact

-(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]; // createContactOptions

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

NameTypeDescriptionNotes
createContactOptionsOAICreateContactOptions*createContactOptions

Return type

OAIContactDto*

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

deleteContact

-(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"; // contactId

OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];

// Delete contact
[apiInstance deleteContactWithContactId:contactId
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAIContactControllerApi->deleteContact: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
contactIdNSString*contactId

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getAllContacts

-(NSURLSessionTask*) getAllContactsWithPage: (NSNumber*) page
    size: (NSNumber*) size
    sort: (NSString*) sort
        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 inbox list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in inbox list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];

// Get all contacts
[apiInstance getAllContactsWithPage:page
              size:size
              sort:sort
          completionHandler: ^(OAIPageContactProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIContactControllerApi->getAllContacts: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
pageNSNumber*Optional page in inbox list pagination[optional] [default to @0]
sizeNSNumber*Optional page size in inbox list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageContactProjection*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getContact

-(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"; // contactId

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

NameTypeDescriptionNotes
contactIdNSString*contactId

Return type

OAIContactDto*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getContactVCard

-(NSURLSessionTask*) getContactVCardWithContactId: (NSString*) contactId
        completionHandler: (void (^)(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"; // contactId

OAIContactControllerApi*apiInstance = [[OAIContactControllerApi alloc] init];

// Get contact vCard vcf file
[apiInstance getContactVCardWithContactId:contactId
          completionHandler: ^(NSData* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIContactControllerApi->getContactVCard: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
contactIdNSString*contactId

Return type

NSData*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getContacts

-(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

NSArray*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]