Skip to content
No description, website, or topics provided.
Objective-C Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.openapi-generator
MailSlurp
docs
.gitignore
.openapi-generator-ignore
LICENSE
MailSlurp.podspec
README.md
git_push.sh

README.md

MailSlurp

For documentation see developer guide. Create an account in the MailSlurp Dashboard to view your API Key. For all bugs, feature requests, or help please see support.

This ObjC package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.1-alpha
  • Package version:
  • Build package: org.openapitools.codegen.languages.ObjcClientCodegen For more information, please visit https://www.mailslurp.com

Requirements

The SDK requires ARC (Automatic Reference Counting) to be enabled in the Xcode project.

Installation & Usage

Install from Github using CocoaPods

Add the following to the Podfile:

pod 'MailSlurp', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

To specify a particular branch, append , :branch => 'branch-name-here'

To specify a particular commit, append , :commit => '11aa22'

Install from local path using CocoaPods

Put the SDK under your project folder (e.g. /path/to/objc_project/Vendor/MailSlurp) and then add the following to the Podfile:

pod 'MailSlurp', :path => 'Vendor/MailSlurp'

Usage

Import the following:

#import <MailSlurp/OAIApiClient.h>
#import <MailSlurp/OAIDefaultConfiguration.h>
// load models
#import <MailSlurp/OAIBasicAuthOptions.h>
#import <MailSlurp/OAIBulkSendEmailOptions.h>
#import <MailSlurp/OAICreateWebhookOptions.h>
#import <MailSlurp/OAIEmail.h>
#import <MailSlurp/OAIEmailAnalysis.h>
#import <MailSlurp/OAIEmailPreview.h>
#import <MailSlurp/OAIForwardEmailOptions.h>
#import <MailSlurp/OAIInbox.h>
#import <MailSlurp/OAIMatchOption.h>
#import <MailSlurp/OAIMatchOptions.h>
#import <MailSlurp/OAISendEmailOptions.h>
#import <MailSlurp/OAIUploadAttachmentOptions.h>
#import <MailSlurp/OAIWebhook.h>
// load API classes for accessing endpoints
#import <MailSlurp/OAICommonOperationsApi.h>
#import <MailSlurp/OAIExtraOperationsApi.h>

Recommendation

It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issues.

Getting Started

Please follow the installation procedure and then run the following:

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"];



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

// Create new email address
[apiInstance createNewEmailAddressWithCompletionHandler: 
              ^(OAIInbox* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

Documentation for API Endpoints

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

Class Method HTTP request Description
OAICommonOperationsApi createNewEmailAddress POST /newEmailAddress Create new email address
OAICommonOperationsApi deleteEmail DELETE /deleteEmail Delete an email
OAICommonOperationsApi deleteEmailAddress DELETE /deleteEmailAddress Delete email address and its emails
OAICommonOperationsApi emptyInbox DELETE /emptyInbox Delete all emails in an inbox
OAICommonOperationsApi sendEmailSimple POST /sendEmail Send an email from a random email address
OAICommonOperationsApi waitForEmailCount GET /waitForEmailCount Wait for and return count number of emails
OAICommonOperationsApi waitForLatestEmail GET /waitForLatestEmail Fetch inbox's latest email or if empty wait for email to arrive
OAICommonOperationsApi waitForMatchingEmail POST /waitForMatchingEmails Wait or return list of emails that match simple matching patterns
OAICommonOperationsApi waitForNthEmail GET /waitForNthEmail Wait for or fetch the email with a given index in the inbox specified
OAIExtraOperationsApi bulkCreateInboxes POST /bulk/inboxes Bulk create Inboxes (email addresses)
OAIExtraOperationsApi bulkDeleteInboxes DELETE /bulk/inboxes Bulk Delete Inboxes
OAIExtraOperationsApi bulkSendEmails POST /bulk/send Bulk Send Emails
OAIExtraOperationsApi createInbox POST /inboxes Create an Inbox (email address)
OAIExtraOperationsApi createWebhook POST /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
OAIExtraOperationsApi deleteEmail1 DELETE /emails/{emailId} Delete Email
OAIExtraOperationsApi deleteInbox DELETE /inboxes/{inboxId} Delete Inbox / Email Address
OAIExtraOperationsApi deleteWebhook DELETE /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a WebHook for an Inbox
OAIExtraOperationsApi downloadAttachment GET /emails/{emailId}/attachments/{attachmentId} Get email attachment
OAIExtraOperationsApi forwardEmail POST /emails/{emailId}/forward Forward Email
OAIExtraOperationsApi getEmail GET /emails/{emailId} Get Email Content
OAIExtraOperationsApi getEmails GET /inboxes/{inboxId}/emails List Emails in an Inbox / EmailAddress
OAIExtraOperationsApi getInbox GET /inboxes/{inboxId} Get Inbox / EmailAddress
OAIExtraOperationsApi getInboxes GET /inboxes List Inboxes / Email Addresses
OAIExtraOperationsApi getRawEmailContents GET /emails/{emailId}/raw Get Raw Email Content
OAIExtraOperationsApi getWebhooks GET /inboxes/{inboxId}/webhooks Get all WebHooks for an Inbox
OAIExtraOperationsApi sendEmail POST /inboxes/{inboxId} Send Email
OAIExtraOperationsApi uploadAttachment POST /attachments Upload an attachment for sending
OAIExtraOperationsApi uploadMultipartForm POST /attachments/multipart Upload an attachment for sending using Multipart Form

Documentation For Models

Documentation For Authorization

API_KEY

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Author

contact@mailslurp.dev

You can’t perform that action at this time.