class Dogapi::V1::EmbedService

Overview

================ EMBED API

Defined in:

dogapi/v1/embed.cr

Instance Method Summary

Instance methods inherited from class Dogapi::APIService

handle_response(resp) handle_response, prepare_params(extra_params, with_app_key) prepare_params, request(method, url, extra_params, body, send_json, with_app_key = true) request, suppress_error_if_silent(e) suppress_error_if_silent

Constructor methods inherited from class Dogapi::APIService

new(api_key : String, application_key : Nil | String = nil, silent : Bool = true, timeout : Int32 | Nil = nil, endpoint : Nil | String = nil) new

Instance Method Detail

def create_embed(graph_json, description = {} of String => String) #

Create an embeddable graph

:graph_json => JSON: graph definition :timeframe => String: representing the interval of the graph. Default is "1_hour" :size => String: representing the size of the graph. Default is "medium". :legend => String: flag representing whether a legend is displayed. Default is "no". :title => String: represents title of the graph. Default is "Embed created through API."


[View source]
def enable_embed(embed_id) #

Enable a specific embed

:embed_id => String: embed token for a specific embed


[View source]
def get_all_embeds #

Get all embeds for the API user's org


[View source]
def get_embed(embed_id, description = {} of String => String) #

Get a specific embed

:embed_id => String: embed token for a specific embed :size => String: "small", "medium"(defualt), "large", or "xlarge". :legend => String: "yes" or "no"(default) :template_vars => String: variable name => variable value (any number of template vars)


[View source]
def revoke_embed(embed_id) #

Revoke a specific embed

:embed_id => String: embed token for a specific embed


[View source]