struct Mailjet::Client

Defined in:

mailjet/client.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(api_key : Nil | String = Config.api_key, secret_key : Nil | String = Config.secret_key) #

Initialize with credentials

client = Mailjet::Client.new("my_key", "my_secret")

Or without, if credentials are configured globally:

client = Mailjet::Client.new

[View source]

Class Method Detail

def self.with_credentials(api_key : String | Nil, secret_key : String | Nil) #

Create a new instance with given api credentials


[View source]

Instance Method Detail

def api_key : String | Nil #

[View source]
def handle_api_call(method : String, path : String, query : Hash | NamedTuple = {} of String => String, payload : Hash | NamedTuple = {} of String => String, headers : Hash | NamedTuple = {} of String => String) #

[View source]
def secret_key : String | Nil #

[View source]