struct

Packlink::Client

Inherits Struct < Value < Object

Constants

API_VERSION = "v1"
METHODS = ["GET", "POST"] of ::String

Constructors

new(api_key : String | Nil = Config.api_key)
Source
new(require_key : Bool)
Source

Class methods

instance
Source
instance_without_api_key
Source
with_api_key(api_key : String | Nil)
Source
with_api_key(api_key : String | Nil, &)
Source

Instance methods

api_key
Source
api_path(path : String, id : String | Nil = nil)
Source
endpoint
Source
get(path : String, query : Hash | NamedTuple = A::HS2.new, headers : Hash | NamedTuple = A::HS2.new)
Source
perform_http_call(method : String, path : String, body : Hash | NamedTuple = A::HS2.new, query : Hash | NamedTuple = A::HS2.new, headers : Hash | NamedTuple = A::HS2.new)
Source
post(path : String, body : Hash | NamedTuple, query : Hash | NamedTuple = A::HS2.new, headers : Hash | NamedTuple = A::HS2.new)
Source