emailguard_sdk

Emailguard - the Ruby gem for the EmailGuard Public API

Team-scoped REST API at /api/v1. Authenticate with Authorization: Bearer egsk_live_... or X-API-Key. Forks may register custom routes under /api/v1/tools/* (requires tools:read / tools:write scopes). Async tool jobs return a job_id — poll GET .../{jobId}/results until complete. See /docs/api-reference.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.0.0
  • Generator version: 7.23.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://emailguard.co

Installation

Build a gem

To build the Ruby code into a gem:

gem build emailguard_sdk.gemspec

Then either install the gem locally:

gem install ./emailguard_sdk-1.0.0.gem

(for development, run gem install --dev ./emailguard_sdk-1.0.0.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 'emailguard_sdk', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/emailguard/emailguard-ruby, then add the following in the Gemfile:

gem 'emailguard_sdk', :git => 'https://github.com/emailguard/emailguard-ruby.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 'emailguard_sdk'

# Setup authorization
Emailguard.configure do |config|
  # Configure API key authorization: ApiKeyAuth
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = Emailguard::BillingApi.new
opts = {
  range: 'current', # String | Period selector: current, previous, or custom
  start: 'start_example', # String | Custom range start (RFC3339 or YYYY-MM-DD); required when range=custom
  _end: '_end_example' # String | Custom range end (RFC3339 or YYYY-MM-DD); required when range=custom
}

begin
  #Get billing usage
  result = api_instance.api_v1_team_billing_usage_get(opts)
  p result
rescue Emailguard::ApiError => e
  puts "Exception when calling BillingApi->api_v1_team_billing_usage_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://api.emailguard.co

Class Method HTTP request Description
Emailguard::BillingApi api_v1_team_billing_usage_get GET /api/v1/team/billing/usage Get billing usage
Emailguard::ChannelsApi api_v1_team_notifications_channels_channel_id_delete DELETE /api/v1/team/notifications/channels/channelId Delete notification channel
Emailguard::ChannelsApi api_v1_team_notifications_channels_channel_id_put PUT /api/v1/team/notifications/channels/channelId Update notification channel
Emailguard::ChannelsApi api_v1_team_notifications_channels_channel_id_test_post POST /api/v1/team/notifications/channels/channelId/test Test notification channel
Emailguard::ChannelsApi api_v1_team_notifications_channels_get GET /api/v1/team/notifications/channels List notification channels
Emailguard::ChannelsApi api_v1_team_notifications_channels_post POST /api/v1/team/notifications/channels Create notification channel
Emailguard::EmailApi api_v1_emails_detect_get GET /api/v1/emails/detect Detect email characteristics
Emailguard::EventsApi api_v1_team_notifications_events_get GET /api/v1/team/notifications/events List notification events
Emailguard::InvitesApi api_v1_team_members_invites_get GET /api/v1/team/members/invites List pending team invites
Emailguard::InvitesApi api_v1_team_members_invites_invite_id_delete DELETE /api/v1/team/members/invites/inviteId Cancel a pending invite
Emailguard::InvitesApi api_v1_team_members_invites_post POST /api/v1/team/members/invites Invite a team member
Emailguard::MembersApi api_v1_team_members_get GET /api/v1/team/members List team members
Emailguard::MembersApi api_v1_team_members_user_id_delete DELETE /api/v1/team/members/userId Remove a team member
Emailguard::MembersApi api_v1_team_members_user_id_patch PATCH /api/v1/team/members/userId Update a team member role
Emailguard::RulesApi api_v1_team_notifications_rules_get GET /api/v1/team/notifications/rules List notification rules
Emailguard::RulesApi api_v1_team_notifications_rules_post POST /api/v1/team/notifications/rules Create notification rule
Emailguard::RulesApi api_v1_team_notifications_rules_rule_id_delete DELETE /api/v1/team/notifications/rules/ruleId Delete notification rule
Emailguard::RulesApi api_v1_team_notifications_rules_rule_id_put PUT /api/v1/team/notifications/rules/ruleId Update notification rule
Emailguard::TeamsApi api_v1_team_get GET /api/v1/team Get team
Emailguard::TeamsApi api_v1_team_patch PATCH /api/v1/team Update team

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

BasicAuth

  • Type: HTTP basic authentication

BearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header