struct Mailjet::Client
- Mailjet::Client
- Struct
- Value
- Object
Defined in:
mailjet/client.crConstructors
-
.new(api_key : Nil | String = Config.api_key, secret_key : Nil | String = Config.secret_key)
Initialize with credentials
Class Method Summary
-
.with_credentials(api_key : String | Nil, secret_key : String | Nil)
Create a new instance with given api credentials
Instance Method Summary
- #api_key : String | Nil
- #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)
- #secret_key : String | Nil
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
Class Method Detail
def self.with_credentials(api_key : String | Nil, secret_key : String | Nil)
#
Create a new instance with given api credentials
Instance Method Detail
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)
#