blueprint_ruby_client 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +65 -0
  4. data/README.md +152 -0
  5. data/blueprint_ruby_client.gemspec +31 -0
  6. data/config.json +13 -0
  7. data/docs/Asset.md +9 -0
  8. data/docs/AssetBody.md +9 -0
  9. data/docs/AssetResultSet.md +9 -0
  10. data/docs/AssetsApi.md +376 -0
  11. data/docs/Error.md +10 -0
  12. data/docs/Errors.md +8 -0
  13. data/docs/HierarchyApi.md +745 -0
  14. data/docs/Links.md +10 -0
  15. data/docs/Meta.md +10 -0
  16. data/docs/Namespace.md +9 -0
  17. data/docs/NamespaceRelationship.md +8 -0
  18. data/docs/Node.md +11 -0
  19. data/docs/NodeAttributes.md +13 -0
  20. data/docs/NodeBody.md +9 -0
  21. data/docs/NodeRelationship.md +10 -0
  22. data/docs/NodeRelationships.md +10 -0
  23. data/docs/NodeResultSet.md +10 -0
  24. data/generate.sh +7 -0
  25. data/git_push.sh +52 -0
  26. data/lib/blueprint_ruby_client/api/assets_api.rb +598 -0
  27. data/lib/blueprint_ruby_client/api/hierarchy_api.rb +1174 -0
  28. data/lib/blueprint_ruby_client/api_client.rb +365 -0
  29. data/lib/blueprint_ruby_client/api_error.rb +36 -0
  30. data/lib/blueprint_ruby_client/configuration.rb +170 -0
  31. data/lib/blueprint_ruby_client/models/asset.rb +242 -0
  32. data/lib/blueprint_ruby_client/models/asset_body.rb +237 -0
  33. data/lib/blueprint_ruby_client/models/asset_result_set.rb +234 -0
  34. data/lib/blueprint_ruby_client/models/error.rb +267 -0
  35. data/lib/blueprint_ruby_client/models/errors.rb +209 -0
  36. data/lib/blueprint_ruby_client/models/links.rb +257 -0
  37. data/lib/blueprint_ruby_client/models/meta.rb +260 -0
  38. data/lib/blueprint_ruby_client/models/namespace.rb +242 -0
  39. data/lib/blueprint_ruby_client/models/namespace_relationship.rb +207 -0
  40. data/lib/blueprint_ruby_client/models/node.rb +293 -0
  41. data/lib/blueprint_ruby_client/models/node_attributes.rb +338 -0
  42. data/lib/blueprint_ruby_client/models/node_body.rb +237 -0
  43. data/lib/blueprint_ruby_client/models/node_relationship.rb +259 -0
  44. data/lib/blueprint_ruby_client/models/node_relationships.rb +257 -0
  45. data/lib/blueprint_ruby_client/models/node_result_set.rb +261 -0
  46. data/lib/blueprint_ruby_client/version.rb +15 -0
  47. data/lib/blueprint_ruby_client.rb +56 -0
  48. data/spec/api/assets_api_spec.rb +150 -0
  49. data/spec/api/hierarchy_api_spec.rb +266 -0
  50. data/spec/models/asset_body_spec.rb +56 -0
  51. data/spec/models/asset_result_set_spec.rb +56 -0
  52. data/spec/models/asset_spec.rb +56 -0
  53. data/spec/models/error_spec.rb +66 -0
  54. data/spec/models/errors_spec.rb +46 -0
  55. data/spec/models/links_spec.rb +66 -0
  56. data/spec/models/meta_spec.rb +66 -0
  57. data/spec/models/namespace_relationship_spec.rb +46 -0
  58. data/spec/models/namespace_spec.rb +56 -0
  59. data/spec/models/node_attributes_spec.rb +96 -0
  60. data/spec/models/node_body_spec.rb +56 -0
  61. data/spec/models/node_relationship_spec.rb +66 -0
  62. data/spec/models/node_relationships_spec.rb +66 -0
  63. data/spec/models/node_result_set_spec.rb +66 -0
  64. data/spec/models/node_spec.rb +76 -0
  65. data/swagger-codegen-cli.jar +0 -0
  66. data/templates/Gemfile.mustache +4 -0
  67. data/templates/README.mustache +139 -0
  68. data/templates/api.mustache +135 -0
  69. data/templates/api_client.mustache +357 -0
  70. data/templates/api_doc.mustache +79 -0
  71. data/templates/api_error.mustache +28 -0
  72. data/templates/api_info.mustache +18 -0
  73. data/templates/api_test.mustache +47 -0
  74. data/templates/base_object.mustache +103 -0
  75. data/templates/configuration.mustache +192 -0
  76. data/templates/gem.mustache +40 -0
  77. data/templates/gemspec.mustache +31 -0
  78. data/templates/gitignore.mustache +40 -0
  79. data/templates/model.mustache +242 -0
  80. data/templates/model_doc.mustache +9 -0
  81. data/templates/model_test.mustache +40 -0
  82. data/templates/version.mustache +7 -0
  83. metadata +322 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b3ecc2e00660942c6cbcae756042cb7e190dd961
4
+ data.tar.gz: 0d914e081bd68253b72afab0496a8ff08ff1b338
5
+ SHA512:
6
+ metadata.gz: c76c98f1c6743a584d04c07526400ed30cf1d8560199d1293b05aefcb4cf687fe24f3e9c37999c2cdca05f040af4566c11aa5f71e85034b7461d7d4fd4e4ad2f
7
+ data.tar.gz: 8ca12a1f09bda926520511e0f1b4f4cbeaacc2674fc3583e27423385a4b6ebd7ebc9cd7c2bfdad30577ad1d270bb81de21f7159e9cce9b77a373aeda29059471
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in blueprint_ruby_client.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,65 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ blueprint_ruby_client (0.1.0)
5
+ json (~> 1.8, >= 1.8.3)
6
+ typhoeus (~> 1.0, >= 1.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ZenTest (4.11.0)
12
+ addressable (2.4.0)
13
+ autotest (4.4.6)
14
+ ZenTest (>= 4.4.1)
15
+ autotest-fsevent (0.2.11)
16
+ sys-uname
17
+ autotest-growl (0.2.16)
18
+ autotest-rails-pure (4.1.2)
19
+ crack (0.4.3)
20
+ safe_yaml (~> 1.0.0)
21
+ diff-lcs (1.2.5)
22
+ ethon (0.9.0)
23
+ ffi (>= 1.3.0)
24
+ ffi (1.9.10)
25
+ hashdiff (0.3.0)
26
+ json (1.8.3)
27
+ rspec (3.4.0)
28
+ rspec-core (~> 3.4.0)
29
+ rspec-expectations (~> 3.4.0)
30
+ rspec-mocks (~> 3.4.0)
31
+ rspec-core (3.4.4)
32
+ rspec-support (~> 3.4.0)
33
+ rspec-expectations (3.4.0)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.4.0)
36
+ rspec-mocks (3.4.1)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.4.0)
39
+ rspec-support (3.4.1)
40
+ safe_yaml (1.0.4)
41
+ sys-uname (1.0.2)
42
+ ffi (>= 1.0.0)
43
+ typhoeus (1.0.2)
44
+ ethon (>= 0.9.0)
45
+ vcr (3.0.1)
46
+ webmock (1.24.6)
47
+ addressable (>= 2.3.6)
48
+ crack (>= 0.3.2)
49
+ hashdiff
50
+
51
+ PLATFORMS
52
+ ruby
53
+
54
+ DEPENDENCIES
55
+ autotest (~> 4.4, >= 4.4.6)
56
+ autotest-fsevent (~> 0.2, >= 0.2.11)
57
+ autotest-growl (~> 0.2, >= 0.2.16)
58
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
59
+ blueprint_ruby_client!
60
+ rspec (~> 3.4, >= 3.4.0)
61
+ vcr (~> 3.0, >= 3.0.1)
62
+ webmock (~> 1.24, >= 1.24.3)
63
+
64
+ BUNDLED WITH
65
+ 1.11.2
data/README.md ADDED
@@ -0,0 +1,152 @@
1
+ # blueprint_ruby_client
2
+
3
+ BlueprintClient - the Ruby gem for the Talis Blueprint API
4
+
5
+ This is the API documentation for [Blueprint](https://github.com/talis/blueprint-server), a primitive for institutional structure and time periods
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: 1.0.0
10
+ - Package version: 0.1.0
11
+ - Build date: 2016-05-03T09:58:50.059+01:00
12
+ - Build package: class io.swagger.codegen.languages.RubyClientCodegen
13
+
14
+ ## Installation
15
+
16
+ ### Generating the code
17
+
18
+ To update the gem code to the latest API specification:
19
+
20
+ ```shell
21
+ sh generate.sh
22
+ ```
23
+
24
+ Customise the code generation by modifying the template files.
25
+
26
+ ### Build a gem
27
+
28
+ To build the Ruby code into a gem:
29
+
30
+ ```shell
31
+ gem build blueprint_ruby_client.gemspec
32
+ ```
33
+
34
+ Then either install the gem locally:
35
+
36
+ ```shell
37
+ gem install ./blueprint_ruby_client-0.1.0.gem
38
+ ```
39
+ (for development, run `gem install --dev ./blueprint_ruby_client-0.1.0.gem` to install the development dependencies)
40
+
41
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
42
+
43
+ Finally add this to the Gemfile:
44
+
45
+ gem 'blueprint_ruby_client', '~> 0.1.0'
46
+
47
+ ### Install from Git
48
+
49
+ If the Ruby gem is hosted at a git repository: https://github.com/talis/blueprint_rb, then add the following in the Gemfile:
50
+
51
+ gem 'blueprint_ruby_client', :git => 'https://github.com/talis/blueprint_rb.git'
52
+
53
+ ### Include the Ruby code directly
54
+
55
+ Include the Ruby code directly using `-I` as follows:
56
+
57
+ ```shell
58
+ ruby -Ilib script.rb
59
+ ```
60
+
61
+ ## Getting Started
62
+
63
+ Please follow the [installation](#installation) procedure and then run the following code:
64
+ ```ruby
65
+ # Load the gem
66
+ require 'blueprint_ruby_client'
67
+
68
+ # Setup authorization
69
+ BlueprintClient.configure do |config|
70
+ # Configure OAuth2 access token for authorization: oauth2
71
+ config.access_token = 'YOUR ACCESS TOKEN'
72
+ end
73
+
74
+ api_instance = BlueprintClient::AssetsApi.new
75
+
76
+ namespace = "namespace_example" # String | identifier namespacing the blueprint.
77
+
78
+ type = "type_example" # String | Plural form of node type (adds an 's' to the end of the type) todo - allow configuration of plurals
79
+
80
+ id = "id_example" # String | id identifying a domain model
81
+
82
+ asset_type = "asset_type_example" # String | Plural form of asset type (adds an 's' to the end of the type) todo - allow configuration of plurals
83
+
84
+ asset_id = "asset_id_example" # String | id of an asset
85
+
86
+
87
+ begin
88
+ result = api_instance.add_asset_to_node(namespace, typeid, asset_type, asset_id)
89
+ p result
90
+ rescue BlueprintClient::ApiError => e
91
+ puts "Exception when calling AssetsApi->add_asset_to_node: #{e}"
92
+ end
93
+
94
+ ```
95
+
96
+ ## Documentation for API Endpoints
97
+
98
+ All URIs are relative to *http://localhost:10010/1*
99
+
100
+ Class | Method | HTTP request | Description
101
+ ------------ | ------------- | ------------- | -------------
102
+ *BlueprintClient::AssetsApi* | [**add_asset_to_node**](docs/AssetsApi.md#add_asset_to_node) | **PUT** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
103
+ *BlueprintClient::AssetsApi* | [**delete_asset**](docs/AssetsApi.md#delete_asset) | **DELETE** /{namespace}/assets/{assetType}/{assetId} |
104
+ *BlueprintClient::AssetsApi* | [**get_asset**](docs/AssetsApi.md#get_asset) | **GET** /{namespace}/assets/{assetType}/{assetId} |
105
+ *BlueprintClient::AssetsApi* | [**get_assets_in_node**](docs/AssetsApi.md#get_assets_in_node) | **GET** /{namespace}/nodes/{type}/{id}/assets |
106
+ *BlueprintClient::AssetsApi* | [**remove_asset_from_node**](docs/AssetsApi.md#remove_asset_from_node) | **DELETE** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
107
+ *BlueprintClient::AssetsApi* | [**replace_asset**](docs/AssetsApi.md#replace_asset) | **PUT** /{namespace}/assets/{assetType}/{assetId} | Replaces the Asset with the data sent in the body
108
+ *BlueprintClient::HierarchyApi* | [**add_node**](docs/HierarchyApi.md#add_node) | **POST** /{namespaceIncGlobal}/nodes |
109
+ *BlueprintClient::HierarchyApi* | [**bulk_upload**](docs/HierarchyApi.md#bulk_upload) | **POST** /{namespace}/nodes.csv |
110
+ *BlueprintClient::HierarchyApi* | [**delete_node**](docs/HierarchyApi.md#delete_node) | **DELETE** /{namespace}/nodes/{type}/{id} |
111
+ *BlueprintClient::HierarchyApi* | [**export_hierarchy**](docs/HierarchyApi.md#export_hierarchy) | **GET** /{namespace}/nodes.csv |
112
+ *BlueprintClient::HierarchyApi* | [**get_ancestors**](docs/HierarchyApi.md#get_ancestors) | **GET** /{namespace}/nodes/{type}/{id}/ancestors | Get ancestor nodes
113
+ *BlueprintClient::HierarchyApi* | [**get_children**](docs/HierarchyApi.md#get_children) | **GET** /{namespace}/nodes/{type}/{id}/children | Get child nodes
114
+ *BlueprintClient::HierarchyApi* | [**get_descendants**](docs/HierarchyApi.md#get_descendants) | **GET** /{namespace}/nodes/{type}/{id}/descendants | Get descendant nodes
115
+ *BlueprintClient::HierarchyApi* | [**get_node**](docs/HierarchyApi.md#get_node) | **GET** /{namespace}/nodes/{type}/{id} |
116
+ *BlueprintClient::HierarchyApi* | [**get_parents**](docs/HierarchyApi.md#get_parents) | **GET** /{namespace}/nodes/{type}/{id}/parents | Get parent nodes
117
+ *BlueprintClient::HierarchyApi* | [**replace_node**](docs/HierarchyApi.md#replace_node) | **PUT** /{namespace}/nodes/{type}/{id} |
118
+ *BlueprintClient::HierarchyApi* | [**search_nodes**](docs/HierarchyApi.md#search_nodes) | **GET** /{namespaceIncGlobal}/nodes | Search nodes
119
+ *BlueprintClient::HierarchyApi* | [**update_node**](docs/HierarchyApi.md#update_node) | **PATCH** /{namespace}/nodes/{type}/{id} |
120
+
121
+
122
+ ## Documentation for Models
123
+
124
+ - [BlueprintClient::Asset](docs/Asset.md)
125
+ - [BlueprintClient::AssetBody](docs/AssetBody.md)
126
+ - [BlueprintClient::AssetResultSet](docs/AssetResultSet.md)
127
+ - [BlueprintClient::Error](docs/Error.md)
128
+ - [BlueprintClient::Errors](docs/Errors.md)
129
+ - [BlueprintClient::Links](docs/Links.md)
130
+ - [BlueprintClient::Meta](docs/Meta.md)
131
+ - [BlueprintClient::Namespace](docs/Namespace.md)
132
+ - [BlueprintClient::NamespaceRelationship](docs/NamespaceRelationship.md)
133
+ - [BlueprintClient::Node](docs/Node.md)
134
+ - [BlueprintClient::NodeAttributes](docs/NodeAttributes.md)
135
+ - [BlueprintClient::NodeBody](docs/NodeBody.md)
136
+ - [BlueprintClient::NodeRelationship](docs/NodeRelationship.md)
137
+ - [BlueprintClient::NodeRelationships](docs/NodeRelationships.md)
138
+ - [BlueprintClient::NodeResultSet](docs/NodeResultSet.md)
139
+
140
+
141
+ ## Documentation for Authorization
142
+
143
+
144
+ ### oauth2
145
+
146
+ - **Type**: OAuth
147
+ - **Flow**: application
148
+ - **Authorization URL**:
149
+ - **Scopes**:
150
+ - su: Talis super user
151
+ - su@{namespace}: Super user for a specific blueprint
152
+
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "blueprint_ruby_client/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "blueprint_ruby_client"
7
+ s.version = BlueprintClient::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Ben Paddock"]
10
+ s.email = ["bp@talis.com"]
11
+ s.homepage = "https://github.com/talis/blueprint_rb"
12
+ s.summary = "A ruby API wrapper for Blueprint"
13
+ s.description = "A client to utilise the hierarchy modelling abilities of Blueprint"
14
+ s.license = "Copyright Talis Education Ltd"
15
+
16
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
17
+ s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
18
+
19
+ s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
20
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
21
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
22
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
23
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
24
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
25
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
26
+
27
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
28
+ s.test_files = `find spec/*`.split("\n")
29
+ s.executables = []
30
+ s.require_paths = ["lib"]
31
+ end
data/config.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "gemName": "blueprint_ruby_client",
3
+ "moduleName": "BlueprintClient",
4
+ "gemVersion": "0.1.0",
5
+ "gemLicense": "Copyright Talis Education Ltd",
6
+ "gemHomepage": "https://github.com/talis/blueprint_rb",
7
+ "gemSummary": "A ruby API wrapper for Blueprint",
8
+ "gemDescription": "A client to utilise the hierarchy modelling abilities of Blueprint",
9
+ "gemAuthor": "Ben Paddock",
10
+ "gemAuthorEmail": "bp@talis.com",
11
+ "gitUserId": "talis",
12
+ "gitRepoId": "blueprint_rb"
13
+ }
data/docs/Asset.md ADDED
@@ -0,0 +1,9 @@
1
+ # BlueprintClient::Asset
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | |
7
+ **type** | **String** | |
8
+
9
+
data/docs/AssetBody.md ADDED
@@ -0,0 +1,9 @@
1
+ # BlueprintClient::AssetBody
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **meta** | [**Meta**](Meta.md) | | [optional]
7
+ **data** | [**Asset**](Asset.md) | |
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # BlueprintClient::AssetResultSet
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **meta** | [**Meta**](Meta.md) | | [optional]
7
+ **data** | [**Array&lt;Asset&gt;**](Asset.md) | | [optional]
8
+
9
+
data/docs/AssetsApi.md ADDED
@@ -0,0 +1,376 @@
1
+ # BlueprintClient::AssetsApi
2
+
3
+ All URIs are relative to *http://localhost:10010/1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**add_asset_to_node**](AssetsApi.md#add_asset_to_node) | **PUT** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
8
+ [**delete_asset**](AssetsApi.md#delete_asset) | **DELETE** /{namespace}/assets/{assetType}/{assetId} |
9
+ [**get_asset**](AssetsApi.md#get_asset) | **GET** /{namespace}/assets/{assetType}/{assetId} |
10
+ [**get_assets_in_node**](AssetsApi.md#get_assets_in_node) | **GET** /{namespace}/nodes/{type}/{id}/assets |
11
+ [**remove_asset_from_node**](AssetsApi.md#remove_asset_from_node) | **DELETE** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
12
+ [**replace_asset**](AssetsApi.md#replace_asset) | **PUT** /{namespace}/assets/{assetType}/{assetId} | Replaces the Asset with the data sent in the body
13
+
14
+
15
+ # **add_asset_to_node**
16
+ > AssetBody add_asset_to_node(namespace, typeid, asset_type, asset_id)
17
+
18
+
19
+
20
+ Add an asset to the node. Body must be empty. Will upsert the asset if it doesn't exist
21
+
22
+ ### Example
23
+ ```ruby
24
+ # load the gem
25
+ require 'blueprint_ruby_client'
26
+ # setup authorization
27
+ BlueprintClient.configure do |config|
28
+ # Configure OAuth2 access token for authorization: oauth2
29
+ config.access_token = 'YOUR ACCESS TOKEN'
30
+ end
31
+
32
+ api_instance = BlueprintClient::AssetsApi.new
33
+
34
+ namespace = "namespace_example" # String | identifier namespacing the blueprint.
35
+
36
+ type = "type_example" # String | Plural form of node type (adds an 's' to the end of the type) todo - allow configuration of plurals
37
+
38
+ id = "id_example" # String | id identifying a domain model
39
+
40
+ asset_type = "asset_type_example" # String | Plural form of asset type (adds an 's' to the end of the type) todo - allow configuration of plurals
41
+
42
+ asset_id = "asset_id_example" # String | id of an asset
43
+
44
+
45
+ begin
46
+ result = api_instance.add_asset_to_node(namespace, typeid, asset_type, asset_id)
47
+ p result
48
+ rescue BlueprintClient::ApiError => e
49
+ puts "Exception when calling AssetsApi->add_asset_to_node: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ Name | Type | Description | Notes
56
+ ------------- | ------------- | ------------- | -------------
57
+ **namespace** | **String**| identifier namespacing the blueprint. |
58
+ **type** | **String**| Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
59
+ **id** | **String**| id identifying a domain model |
60
+ **asset_type** | **String**| Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
61
+ **asset_id** | **String**| id of an asset |
62
+
63
+ ### Return type
64
+
65
+ [**AssetBody**](AssetBody.md)
66
+
67
+ ### Authorization
68
+
69
+ [oauth2](../README.md#oauth2)
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: application/json
74
+ - **Accept**: application/vnd.api+json
75
+
76
+
77
+
78
+ # **delete_asset**
79
+ > delete_asset(namespace, asset_idasset_type, )
80
+
81
+
82
+
83
+ Delete an Asset
84
+
85
+ ### Example
86
+ ```ruby
87
+ # load the gem
88
+ require 'blueprint_ruby_client'
89
+ # setup authorization
90
+ BlueprintClient.configure do |config|
91
+ # Configure OAuth2 access token for authorization: oauth2
92
+ config.access_token = 'YOUR ACCESS TOKEN'
93
+ end
94
+
95
+ api_instance = BlueprintClient::AssetsApi.new
96
+
97
+ namespace = "namespace_example" # String | identifier namespacing the blueprint.
98
+
99
+ asset_id = "asset_id_example" # String | id of an asset
100
+
101
+ asset_type = "asset_type_example" # String | Plural form of asset type (adds an 's' to the end of the type) todo - allow configuration of plurals
102
+
103
+
104
+ begin
105
+ api_instance.delete_asset(namespace, asset_idasset_type, )
106
+ rescue BlueprintClient::ApiError => e
107
+ puts "Exception when calling AssetsApi->delete_asset: #{e}"
108
+ end
109
+ ```
110
+
111
+ ### Parameters
112
+
113
+ Name | Type | Description | Notes
114
+ ------------- | ------------- | ------------- | -------------
115
+ **namespace** | **String**| identifier namespacing the blueprint. |
116
+ **asset_id** | **String**| id of an asset |
117
+ **asset_type** | **String**| Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
118
+
119
+ ### Return type
120
+
121
+ nil (empty response body)
122
+
123
+ ### Authorization
124
+
125
+ [oauth2](../README.md#oauth2)
126
+
127
+ ### HTTP request headers
128
+
129
+ - **Content-Type**: application/json
130
+ - **Accept**: application/vnd.api+json
131
+
132
+
133
+
134
+ # **get_asset**
135
+ > AssetBody get_asset(namespace, asset_type, asset_id)
136
+
137
+
138
+
139
+ Get details of a given asset
140
+
141
+ ### Example
142
+ ```ruby
143
+ # load the gem
144
+ require 'blueprint_ruby_client'
145
+ # setup authorization
146
+ BlueprintClient.configure do |config|
147
+ # Configure OAuth2 access token for authorization: oauth2
148
+ config.access_token = 'YOUR ACCESS TOKEN'
149
+ end
150
+
151
+ api_instance = BlueprintClient::AssetsApi.new
152
+
153
+ namespace = "namespace_example" # String | identifier namespacing the blueprint.
154
+
155
+ asset_type = "asset_type_example" # String | Plural form of asset type (adds an 's' to the end of the type) todo - allow configuration of plurals
156
+
157
+ asset_id = "asset_id_example" # String | id of an asset
158
+
159
+
160
+ begin
161
+ #
162
+ result = api_instance.get_asset(namespace, asset_type, asset_id)
163
+ p result
164
+ rescue BlueprintClient::ApiError => e
165
+ puts "Exception when calling AssetsApi->get_asset: #{e}"
166
+ end
167
+ ```
168
+
169
+ ### Parameters
170
+
171
+ Name | Type | Description | Notes
172
+ ------------- | ------------- | ------------- | -------------
173
+ **namespace** | **String**| identifier namespacing the blueprint. |
174
+ **asset_type** | **String**| Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
175
+ **asset_id** | **String**| id of an asset |
176
+
177
+ ### Return type
178
+
179
+ [**AssetBody**](AssetBody.md)
180
+
181
+ ### Authorization
182
+
183
+ [oauth2](../README.md#oauth2)
184
+
185
+ ### HTTP request headers
186
+
187
+ - **Content-Type**: application/json
188
+ - **Accept**: application/vnd.api+json
189
+
190
+
191
+
192
+ # **get_assets_in_node**
193
+ > AssetResultSet get_assets_in_node(namespace, typeid, , opts)
194
+
195
+
196
+
197
+ Get for assets in the relevant node
198
+
199
+ ### Example
200
+ ```ruby
201
+ # load the gem
202
+ require 'blueprint_ruby_client'
203
+ # setup authorization
204
+ BlueprintClient.configure do |config|
205
+ # Configure OAuth2 access token for authorization: oauth2
206
+ config.access_token = 'YOUR ACCESS TOKEN'
207
+ end
208
+
209
+ api_instance = BlueprintClient::AssetsApi.new
210
+
211
+ namespace = "namespace_example" # String | identifier namespacing the blueprint.
212
+
213
+ type = "type_example" # String | Plural form of node type (adds an 's' to the end of the type) todo - allow configuration of plurals
214
+
215
+ id = "id_example" # String | id identifying a domain model
216
+
217
+ opts = {
218
+ filter_asset_type: "filter_asset_type_example", # String | type of asset to return
219
+ offset: 3.4, # Float | index to start result set from
220
+ limit: 3.4 # Float | number of records to return
221
+ }
222
+
223
+ begin
224
+ result = api_instance.get_assets_in_node(namespace, typeid, , opts)
225
+ p result
226
+ rescue BlueprintClient::ApiError => e
227
+ puts "Exception when calling AssetsApi->get_assets_in_node: #{e}"
228
+ end
229
+ ```
230
+
231
+ ### Parameters
232
+
233
+ Name | Type | Description | Notes
234
+ ------------- | ------------- | ------------- | -------------
235
+ **namespace** | **String**| identifier namespacing the blueprint. |
236
+ **type** | **String**| Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
237
+ **id** | **String**| id identifying a domain model |
238
+ **filter_asset_type** | **String**| type of asset to return | [optional]
239
+ **offset** | [**Float**](.md)| index to start result set from | [optional]
240
+ **limit** | [**Float**](.md)| number of records to return | [optional]
241
+
242
+ ### Return type
243
+
244
+ [**AssetResultSet**](AssetResultSet.md)
245
+
246
+ ### Authorization
247
+
248
+ [oauth2](../README.md#oauth2)
249
+
250
+ ### HTTP request headers
251
+
252
+ - **Content-Type**: application/json
253
+ - **Accept**: application/vnd.api+json
254
+
255
+
256
+
257
+ # **remove_asset_from_node**
258
+ > remove_asset_from_node(namespace, typeid, asset_type, asset_id)
259
+
260
+
261
+
262
+ Remove an asset from the relevant node
263
+
264
+ ### Example
265
+ ```ruby
266
+ # load the gem
267
+ require 'blueprint_ruby_client'
268
+ # setup authorization
269
+ BlueprintClient.configure do |config|
270
+ # Configure OAuth2 access token for authorization: oauth2
271
+ config.access_token = 'YOUR ACCESS TOKEN'
272
+ end
273
+
274
+ api_instance = BlueprintClient::AssetsApi.new
275
+
276
+ namespace = "namespace_example" # String | identifier namespacing the blueprint.
277
+
278
+ type = "type_example" # String | Plural form of node type (adds an 's' to the end of the type) todo - allow configuration of plurals
279
+
280
+ id = "id_example" # String | id identifying a domain model
281
+
282
+ asset_type = "asset_type_example" # String | Plural form of asset type (adds an 's' to the end of the type) todo - allow configuration of plurals
283
+
284
+ asset_id = "asset_id_example" # String | id of an asset
285
+
286
+
287
+ begin
288
+ api_instance.remove_asset_from_node(namespace, typeid, asset_type, asset_id)
289
+ rescue BlueprintClient::ApiError => e
290
+ puts "Exception when calling AssetsApi->remove_asset_from_node: #{e}"
291
+ end
292
+ ```
293
+
294
+ ### Parameters
295
+
296
+ Name | Type | Description | Notes
297
+ ------------- | ------------- | ------------- | -------------
298
+ **namespace** | **String**| identifier namespacing the blueprint. |
299
+ **type** | **String**| Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
300
+ **id** | **String**| id identifying a domain model |
301
+ **asset_type** | **String**| Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
302
+ **asset_id** | **String**| id of an asset |
303
+
304
+ ### Return type
305
+
306
+ nil (empty response body)
307
+
308
+ ### Authorization
309
+
310
+ [oauth2](../README.md#oauth2)
311
+
312
+ ### HTTP request headers
313
+
314
+ - **Content-Type**: application/json
315
+ - **Accept**: application/vnd.api+json
316
+
317
+
318
+
319
+ # **replace_asset**
320
+ > AssetBody replace_asset(namespace, asset_idasset_type, )
321
+
322
+ Replaces the Asset with the data sent in the body
323
+
324
+ Wholesale replacement of Asset data: if you were to PUT to:\n /1/{namespace}/assets/sometype/someid\n\nwith a body of:\n { type: \"someothertype\", id: \"someotherid\" }\n\nIt would change the Asset's path to:\n /1/{namespace}/assets/someothertype/someotherid\n\nand\n /1/{namespace}/assets/sometype/someid\nwould return a 404.\nIt would also update the assets associated with any node.\n
325
+
326
+ ### Example
327
+ ```ruby
328
+ # load the gem
329
+ require 'blueprint_ruby_client'
330
+ # setup authorization
331
+ BlueprintClient.configure do |config|
332
+ # Configure OAuth2 access token for authorization: oauth2
333
+ config.access_token = 'YOUR ACCESS TOKEN'
334
+ end
335
+
336
+ api_instance = BlueprintClient::AssetsApi.new
337
+
338
+ namespace = "namespace_example" # String | identifier namespacing the blueprint.
339
+
340
+ asset_id = "asset_id_example" # String | id of an asset
341
+
342
+ asset_type = "asset_type_example" # String | Plural form of asset type (adds an 's' to the end of the type) todo - allow configuration of plurals
343
+
344
+
345
+ begin
346
+ #Replaces the Asset with the data sent in the body
347
+ result = api_instance.replace_asset(namespace, asset_idasset_type, )
348
+ p result
349
+ rescue BlueprintClient::ApiError => e
350
+ puts "Exception when calling AssetsApi->replace_asset: #{e}"
351
+ end
352
+ ```
353
+
354
+ ### Parameters
355
+
356
+ Name | Type | Description | Notes
357
+ ------------- | ------------- | ------------- | -------------
358
+ **namespace** | **String**| identifier namespacing the blueprint. |
359
+ **asset_id** | **String**| id of an asset |
360
+ **asset_type** | **String**| Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals |
361
+
362
+ ### Return type
363
+
364
+ [**AssetBody**](AssetBody.md)
365
+
366
+ ### Authorization
367
+
368
+ [oauth2](../README.md#oauth2)
369
+
370
+ ### HTTP request headers
371
+
372
+ - **Content-Type**: application/json
373
+ - **Accept**: application/vnd.api+json
374
+
375
+
376
+