Module: Dato::ApiClient::ClassMethods
- Defined in:
- lib/dato/api_client.rb
Instance Method Summary collapse
Instance Method Details
#json_schema(subdomain) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/dato/api_client.rb', line 26 def json_schema(subdomain) define_method(:initialize) do |token, = {}| @token = token @base_url = [:base_url] || "https://#{subdomain}.datocms.com" @environment = [:environment] @extra_headers = [:extra_headers] || {} end define_singleton_method(:subdomain) do subdomain end end |