class Ovh::Client

Defined in:

ovh/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(endpoint_key : String, app_key : String, app_secret : String, app_consumer_key : String = "") #

[View source]
def self.new(endpoint_key = "") #

Create a new Client from the configuration.


[View source]

Instance Method Detail

def apis #

Retrieve available APIs.


[View source]
def app_consumer_key : String #

[View source]
def app_consumer_key=(app_consumer_key : String) #

[View source]
def app_key : String #

[View source]
def app_key=(app_key : String) #

[View source]
def app_secret : String #

[View source]
def app_secret=(app_secret : String) #

[View source]
def consumer_request #

Create a new consumer request using client's endpoint.


[View source]
def delete(path : String, body : JSON::Any | Nil | Nil = nil) : JSON::Any | Nil #

Execute a DELETE request.


[View source]
def endpoint : String #

[View source]
def endpoint=(endpoint : String) #

[View source]
def get(path : String, body : JSON::Any | Nil | Nil = nil) : JSON::Any | Nil #

Execute a GET request.


[View source]
def head(path : String, body : JSON::Any | Nil | Nil = nil) : JSON::Any | Nil #

Execute a HEAD request.


[View source]
def lose_time : Time::Span #

[View source]
def lose_time=(lose_time : Time::Span) #

[View source]
def post(path : String, body : JSON::Any | Nil | Nil = nil) : JSON::Any | Nil #

Execute a POST request.


[View source]
def put(path : String, body : JSON::Any | Nil | Nil = nil) : JSON::Any | Nil #

Execute a PUT request.


[View source]
def signature(method, path, body, timestamp) #

Return the request signature.


[View source]