blueprint_ruby_client

BlueprintClient - the Ruby gem for the Talis Blueprint API

This is the API documentation for Blueprint, a primitive for institutional structure and time periods

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 0.5.1
  • Build date: 2016-11-02T13:51:34.555-04:00
  • Build package: class io.swagger.codegen.languages.RubyClientCodegen

Installation

Generating the code

To update the gem code to the latest API specification:

sh generate.sh

Customise the code generation by modifying the template files.

Build a gem

To build the Ruby code into a gem:

gem build blueprint_ruby_client.gemspec

Then either install the gem locally:

gem install ./blueprint_ruby_client-0.5.1.gem

(for development, run gem install --dev ./blueprint_ruby_client-0.5.1.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'blueprint_ruby_client', '~> 0.5.1'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/talis/blueprint_rb, then add the following in the Gemfile:

gem 'blueprint_ruby_client', :git => 'https://github.com/talis/blueprint_rb.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# 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::AssetTypeConfigsApi.new

namespace = "namespace_example" # String | identifier namespacing the blueprint.

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


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

Documentation for API Endpoints

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

Class Method HTTP request Description
BlueprintClient::AssetTypeConfigsApi get GET /namespace/assets/assetType/templates
BlueprintClient::AssetTypeTemplatesApi add POST /namespace/assets/assetType/templates
BlueprintClient::AssetTypeTemplatesApi delete DELETE /namespace/assets/assetType/templates
BlueprintClient::AssetTypeTemplatesApi put PUT /namespace/assets/assetType/templates
BlueprintClient::AssetsApi add_asset_to_node PUT /namespace/nodes/type/id/assets/assetType/assetId
BlueprintClient::AssetsApi delete_asset DELETE /namespace/assets/assetType/assetId
BlueprintClient::AssetsApi get_asset GET /namespace/assets/assetType/assetId
BlueprintClient::AssetsApi get_assets_in_node GET /namespace/nodes/type/id/assets
BlueprintClient::AssetsApi remove_asset_from_node DELETE /namespace/nodes/type/id/assets/assetType/assetId
BlueprintClient::AssetsApi replace_asset PUT /namespace/assets/assetType/assetId Replaces the Asset with the data sent in the body
BlueprintClient::HierarchyApi add_node POST /namespaceIncGlobal/nodes
BlueprintClient::HierarchyApi bulk_upload POST /namespace/nodes.csv
BlueprintClient::HierarchyApi delete_node DELETE /namespace/nodes/type/id
BlueprintClient::HierarchyApi export_hierarchy GET /namespace/nodes.csv
BlueprintClient::HierarchyApi get_ancestors GET /namespace/nodes/type/id/ancestors Get ancestor nodes
BlueprintClient::HierarchyApi get_children GET /namespace/nodes/type/id/children Get child nodes
BlueprintClient::HierarchyApi get_descendants GET /namespace/nodes/type/id/descendants Get descendant nodes
BlueprintClient::HierarchyApi get_node GET /namespace/nodes/type/id
BlueprintClient::HierarchyApi get_parents GET /namespace/nodes/type/id/parents Get parent nodes
BlueprintClient::HierarchyApi replace_node PUT /namespace/nodes/type/id
BlueprintClient::HierarchyApi search_nodes GET /namespaceIncGlobal/nodes Search nodes
BlueprintClient::HierarchyApi update_node PATCH /namespace/nodes/type/id
BlueprintClient::IntegrationsApi add_integration POST /namespace/integrations
BlueprintClient::IntegrationsApi delete_integration DELETE /namespace/integrations/integrationType/integrationId
BlueprintClient::IntegrationsApi get_integration GET /namespace/integrations/integrationType/integrationId
BlueprintClient::IntegrationsApi namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post POST /namespace/integrations/lti1/integrationId/assets/assetType/assetId
BlueprintClient::IntegrationsApi replace_integration PUT /namespace/integrations/integrationType/integrationId
BlueprintClient::LTIApi namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post POST /namespace/integrations/lti1/integrationId/assets/assetType/assetId
BlueprintClient::SecurityApi get_public_certificate GET /keys/public

Documentation for Models

Documentation for Authorization

oauth2

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • su: Talis super user
    • su@namespace: Super user for a specific blueprint