class Dagpi::Client
Attributes
__version__[R]
token[R]
Public Class Methods
new(token)
click to toggle source
# File lib/dagpirb.rb, line 7 def initialize(token) @token = token @client = Dagpi::HTTPClient.new @token @__version__ = VERSION end
Public Instance Methods
get_data(endpoint)
click to toggle source
Request data from Data API @param {String} endpoint: The endpoint to request with @return {Hash}
# File lib/dagpirb.rb, line 17 def get_data(endpoint) @client.get_data(endpoint) end
get_image(endpoint, url)
click to toggle source
Request image data from Image API @param {String} endpoint: The endpoint to request with @param {String} url: The image url to manipulate @return {bytes}
# File lib/dagpirb.rb, line 26 def get_image(endpoint, url) @client.get_image(endpoint, url) end