Skip to content

Latest commit

 

History

History
179 lines (113 loc) · 5.15 KB

AssetTypeTemplatesApi.md

File metadata and controls

179 lines (113 loc) · 5.15 KB

BlueprintClient::AssetTypeTemplatesApi

All URIs are relative to http://localhost:10010/1

Method HTTP request Description
add POST /{namespace}/assets/{assetType}/templates
delete DELETE /{namespace}/assets/{assetType}/templates
put PUT /{namespace}/assets/{assetType}/templates

add

TemplateBody add(namespace, asset_type, template_body)

Configure a template for a given asset type

Example

# load the gem
require 'blueprint_ruby_client'
# setup authorization 
BlueprintClient.configure do |config|
  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = BlueprintClient::AssetTypeTemplatesApi.new

namespace = "namespace_example" # String | identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

asset_type = "asset_type_example" # String | subtype of Asset, e.g. 'textbooks', 'digitisations', etc.

template_body = BlueprintClient::TemplateBody.new # TemplateBody | template body


begin
  result = api_instance.add(namespace, asset_type, template_body)
  p result
rescue BlueprintClient::ApiError => e
  puts "Exception when calling AssetTypeTemplatesApi->add: #{e}"
end

Parameters

Name Type Description Notes
namespace String identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
asset_type String subtype of Asset, e.g. 'textbooks', 'digitisations', etc.
template_body TemplateBody template body

Return type

TemplateBody

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.api+json

delete

TemplateBody delete(namespace, asset_type, )

Delete a template for a given asset type

Example

# load the gem
require 'blueprint_ruby_client'
# setup authorization 
BlueprintClient.configure do |config|
  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = BlueprintClient::AssetTypeTemplatesApi.new

namespace = "namespace_example" # String | identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

asset_type = "asset_type_example" # String | subtype of Asset, e.g. 'textbooks', 'digitisations', etc.


begin
  result = api_instance.delete(namespace, asset_type, )
  p result
rescue BlueprintClient::ApiError => e
  puts "Exception when calling AssetTypeTemplatesApi->delete: #{e}"
end

Parameters

Name Type Description Notes
namespace String identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
asset_type String subtype of Asset, e.g. 'textbooks', 'digitisations', etc.

Return type

TemplateBody

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.api+json

put

TemplateBody put(namespace, asset_type, template_body)

update a template for a given asset type

Example

# load the gem
require 'blueprint_ruby_client'
# setup authorization 
BlueprintClient.configure do |config|
  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = BlueprintClient::AssetTypeTemplatesApi.new

namespace = "namespace_example" # String | identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

asset_type = "asset_type_example" # String | subtype of Asset, e.g. 'textbooks', 'digitisations', etc.

template_body = BlueprintClient::TemplateBody.new # TemplateBody | template body


begin
  result = api_instance.put(namespace, asset_type, template_body)
  p result
rescue BlueprintClient::ApiError => e
  puts "Exception when calling AssetTypeTemplatesApi->put: #{e}"
end

Parameters

Name Type Description Notes
namespace String identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
asset_type String subtype of Asset, e.g. 'textbooks', 'digitisations', etc.
template_body TemplateBody template body

Return type

TemplateBody

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.api+json