class Panoptes::Endpoints::JsonEndpoint
Public Class Methods
new(auth: {}, url: nil, prefix: nil) { |faraday| ... }
click to toggle source
Automatically configured connection to use JSON requests/responses @see Panoptes::Endpoints::BaseEndpoint#initialize
Calls superclass method
Panoptes::Endpoints::BaseEndpoint::new
# File lib/panoptes/endpoints/json_endpoint.rb, line 10 def initialize(auth: {}, url: nil, prefix: nil, &config) super auth: auth, url: url, prefix: prefix do |faraday| yield(faraday) if config faraday.request :json faraday.response :json faraday.adapter Faraday.default_adapter end end