class

GandiApi::Client

Inherits Reference < Object

Client Gandi LiveDNS v5.

Auth par Personal Access Token (PAT), passé en Authorization: Bearer <token>. Le PAT se génère depuis le compte Gandi (Paramètres du compte → « Personal Access Tokens »), avec la permission « Gérer le DNS » sur l'organisation/le domaine voulu.

client = GandiApi::Client.new(token: ENV["GANDI_PAT"])
client.livedns.ensure_record("quimeo.fr", "A", "www", "203.0.113.7")

Constructors

new(token : String, endpoint : String = DEFAULT_ENDPOINT, transport : HttpTransport = DefaultHttpTransport.new)
Source

Instance methods

call(method : String, path : String, query : Hash(String, String) | Nil = nil, body = nil) : JSON::Any | Nil

Appel API. path est relatif au endpoint (ex. /domains/quimeo.fr/records). body est JSON-sérialisable.

Source
endpoint
Source
livedns

Accès paresseux à l'endpoint LiveDNS (un seul objet par Client).

Source
token
Source
transport
Source
transport=(transport : HttpTransport)
Source