Class: All3DP::API

Inherits:
Object
  • Object
show all
Defined in:
lib/all3dp/api.rb

Overview

Handle all calls to the API.

Defined Under Namespace

Classes: BadGatewayError, Error

Instance Method Summary collapse

Instance Method Details

#create_configuration(items:) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/all3dp/api.rb', line 9

def create_configuration(items:)
  url = "#{BASE_URL}/configuration"
  response = HTTP.post(
    url,
    headers: { "use-model-urls" => true },
    json: { items: items },
  )

  parse_response(response)
end