class

EmailOctopus::Client

Inherits Reference < Object

Constants

API_BASE_URL = "https://api.emailoctopus.com/"
API_KEY_ENV_VAR = "EMAIL_OCTOPUS_API_KEY"
APPLICATION_JSON = "application/json"
POSTABLE_METHODS = [:post, :put, :delete] of ::Symbol

Constructors

new(api_key : String, endpoint : String = API_BASE_URL)
Source

Class methods

from_env_var
Source

Instance methods

delete(resource : String, body : BodyData, content_type : String = APPLICATION_JSON) : String
Source
get(resource : String, query : QueryData = QueryData.new) : String
Source
post(resource : String, body : BodyData, content_type : String = APPLICATION_JSON) : String
Source
put(resource : String, body : BodyData, content_type : String = APPLICATION_JSON) : String
Source

Nested types