mailslurp_client
MailSlurpClient - the Ruby gem for the MailSlurp API
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 SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.0.1-alpha
- Package version: 4.3.3
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://www.mailslurp.com
Installation
Build a gem
To build the Ruby code into a gem:
gem build mailslurp_client.gemspec
Then either install the gem locally:
gem install ./mailslurp_client-4.3.3.gem
(for development, run gem install --dev ./mailslurp_client-4.3.3.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'mailslurp_client', '~> 4.3.3'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'mailslurp_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'mailslurp_client'
# Setup authorization
MailSlurpClient.configure do |config|
# Configure API key authorization: API_KEY
config.api_key['x-api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['x-api-key'] = 'Bearer'
end
api_instance = MailSlurpClient::CommonOperationsApi.new
begin
#Create new email address
result = api_instance.create_new_email_address
p result
rescue MailSlurpClient::ApiError => e
puts "Exception when calling CommonOperationsApi->create_new_email_address: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.mailslurp.com
Class | Method | HTTP request | Description |
---|---|---|---|
MailSlurpClient::CommonOperationsApi | create_new_email_address | POST /newEmailAddress | Create new email address |
MailSlurpClient::CommonOperationsApi | send_email_simple | POST /sendEmail | Send an email from a random email address |
MailSlurpClient::CommonOperationsApi | wait_for_latest_email | GET /fetchLatestEmail | Fetch inbox's latest email or if empty wait for email to arrive |
MailSlurpClient::ExtraOperationsApi | bulk_create_inboxes | POST /bulk/inboxes | Bulk create Inboxes (email addresses) |
MailSlurpClient::ExtraOperationsApi | bulk_delete_inboxes | DELETE /bulk/inboxes | Bulk Delete Inboxes |
MailSlurpClient::ExtraOperationsApi | bulk_send_emails | POST /bulk/send | Bulk Send Emails |
MailSlurpClient::ExtraOperationsApi | create_inbox | POST /inboxes | Create an Inbox (email address) |
MailSlurpClient::ExtraOperationsApi | create_webhook | POST /inboxes/inboxId/webhooks | Attach a WebHook URL to an inbox |
MailSlurpClient::ExtraOperationsApi | delete_email | DELETE /emails/emailId | Delete Email |
MailSlurpClient::ExtraOperationsApi | delete_inbox | DELETE /inboxes/inboxId | Delete Inbox / Email Address |
MailSlurpClient::ExtraOperationsApi | delete_webhook | DELETE /inboxes/inboxId/webhooks/webhookId | Delete and disable a WebHook for an Inbox |
MailSlurpClient::ExtraOperationsApi | download_attachment | GET /emails/emailId/attachments/attachmentId | Get email attachment |
MailSlurpClient::ExtraOperationsApi | get_email | GET /emails/emailId | Get Email Content |
MailSlurpClient::ExtraOperationsApi | get_emails | GET /inboxes/inboxId/emails | List Emails in an Inbox / EmailAddress |
MailSlurpClient::ExtraOperationsApi | get_inbox | GET /inboxes/inboxId | Get Inbox / EmailAddress |
MailSlurpClient::ExtraOperationsApi | get_inboxes | GET /inboxes | List Inboxes / Email Addresses |
MailSlurpClient::ExtraOperationsApi | get_raw_email_contents | GET /emails/emailId/raw | Get Raw Email Content |
MailSlurpClient::ExtraOperationsApi | get_webhooks | GET /inboxes/inboxId/webhooks | Get all WebHooks for an Inbox |
MailSlurpClient::ExtraOperationsApi | send_email | POST /inboxes/inboxId | Send Email |
Documentation for Models
- MailSlurpClient::BasicAuthOptions
- MailSlurpClient::BulkSendEmailOptions
- MailSlurpClient::CreateWebhookOptions
- MailSlurpClient::Email
- MailSlurpClient::EmailAnalysis
- MailSlurpClient::EmailPreview
- MailSlurpClient::Inbox
- MailSlurpClient::SendEmailOptions
- MailSlurpClient::Webhook
Documentation for Authorization
API_KEY
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header