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 |
TemplateBody add(namespace, asset_type, template_body)
Configure a template for a given asset type
# 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
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 |
- Content-Type: application/json
- Accept: application/vnd.api+json
TemplateBody delete(namespace, asset_type, )
Delete a template for a given asset type
# 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
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. |
- Content-Type: application/json
- Accept: application/vnd.api+json
TemplateBody put(namespace, asset_type, template_body)
update a template for a given asset type
# 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
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 |
- Content-Type: application/json
- Accept: application/vnd.api+json