Module: Reshape::Client::Models

Included in:
Reshape::Client
Defined in:
lib/reshape/client/models.rb

Instance Method Summary collapse

Instance Method Details

#add_model(file, name, rights, terms, options = {}, raw = false) ⇒ Object



13
14
15
# File 'lib/reshape/client/models.rb', line 13

def add_model(file, name, rights, terms, options={}, raw=false)
  post("/models/#{api_version}", options.merge(file: file, fileName: name, hasRightsToModel: rights, acceptTermsAndConditions: terms), raw)
end

#add_model_file(id, file, name, rights, terms, options = {}, raw = false) ⇒ Object



29
30
31
# File 'lib/reshape/client/models.rb', line 29

def add_model_file(id, file, name, rights, terms, options={}, raw=false)
  post("/models/#{id}/files/#{api_version}", options.merge(file: file, fileName: name, hasRightsToModel: rights, acceptTermsAndConditions: terms), raw)
end

#add_model_photo(id, file, options = {}, raw = false) ⇒ Object



37
38
39
# File 'lib/reshape/client/models.rb', line 37

def add_model_photo(id, file, options={}, raw=false)
  post("/models/#{id}/photos/#{api_version}")
end

#delete_model(id, options = {}, raw = false) ⇒ Object



17
18
19
# File 'lib/reshape/client/models.rb', line 17

def delete_model(id, options={}, raw=false)
  delete("/model/#{id}/#{api_version}", options, raw)
end

#model(id, options = {}, raw = false) ⇒ Object



9
10
11
# File 'lib/reshape/client/models.rb', line 9

def model(id, options={}, raw=false)
  get("/models/#{id}/#{api_version}", options, raw)
end

#model_file_by_version(id, fileVersion, options = {}, raw = false) ⇒ Object



33
34
35
# File 'lib/reshape/client/models.rb', line 33

def model_file_by_version(id, fileVersion, options={}, raw=false)
  get("/models/#{id}/files/#{fileVersion}/v1")
end

#model_info(id, options = {}, raw = false) ⇒ Object



21
22
23
# File 'lib/reshape/client/models.rb', line 21

def model_info(id, options={}, raw=false)
  get("/models/#{id}/info/#{api_version}", options, raw)
end

#models(options = {}, raw = false) ⇒ Object



5
6
7
# File 'lib/reshape/client/models.rb', line 5

def models(options={}, raw=false)
  get("/models/#{api_version}", options, raw)
end

#update_model_info(id, options = {}, raw = false) ⇒ Object



25
26
27
# File 'lib/reshape/client/models.rb', line 25

def update_model_info(id, options={}, raw=false)
  put("/models/#{id}/info/#{api_version}", options, raw)
end