blueprint_ruby_client 0.4.1 → 0.5.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 (84) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +65 -0
  3. data/LICENSE +201 -0
  4. data/README.md +25 -11
  5. data/docs/AssetTypeConfigsApi.md +63 -0
  6. data/docs/AssetTypeTemplatesApi.md +179 -0
  7. data/docs/AssetsApi.md +19 -19
  8. data/docs/HierarchyApi.md +35 -35
  9. data/docs/Integration.md +10 -0
  10. data/docs/IntegrationBody.md +9 -0
  11. data/docs/IntegrationTransform.md +11 -0
  12. data/docs/IntegrationTransformExample.md +9 -0
  13. data/docs/IntegrationsApi.md +329 -0
  14. data/docs/LTIApi.md +98 -0
  15. data/docs/Lti1IntegrationAttributes.md +11 -0
  16. data/docs/NodeAttributes.md +2 -0
  17. data/docs/SecurityApi.md +48 -0
  18. data/docs/Template.md +10 -0
  19. data/docs/TemplateAttributes.md +9 -0
  20. data/docs/TemplateBody.md +9 -0
  21. data/docs/{AssetAttributes.md → TemplateVariables.md} +3 -2
  22. data/generate.sh +1 -2
  23. data/git_push.sh +16 -1
  24. data/lib/blueprint_ruby_client/api/asset_type_configs_api.rb +84 -0
  25. data/lib/blueprint_ruby_client/api/asset_type_templates_api.rb +214 -0
  26. data/lib/blueprint_ruby_client/api/assets_api.rb +23 -191
  27. data/lib/blueprint_ruby_client/api/hierarchy_api.rb +49 -409
  28. data/lib/blueprint_ruby_client/api/integrations_api.rb +415 -0
  29. data/lib/blueprint_ruby_client/api/lti_api.rb +156 -0
  30. data/lib/blueprint_ruby_client/api/security_api.rb +75 -0
  31. data/lib/blueprint_ruby_client/api_client.rb +0 -2
  32. data/lib/blueprint_ruby_client/models/asset.rb +2 -59
  33. data/lib/blueprint_ruby_client/models/asset_body.rb +2 -42
  34. data/lib/blueprint_ruby_client/models/asset_relationship.rb +2 -57
  35. data/lib/blueprint_ruby_client/models/asset_result_set.rb +2 -57
  36. data/lib/blueprint_ruby_client/models/error.rb +2 -59
  37. data/lib/blueprint_ruby_client/models/errors.rb +2 -25
  38. data/lib/blueprint_ruby_client/models/integration.rb +225 -0
  39. data/lib/blueprint_ruby_client/models/{mixed_resource_result_set.rb → integration_body.rb} +27 -12
  40. data/lib/blueprint_ruby_client/models/integration_transform.rb +221 -0
  41. data/lib/blueprint_ruby_client/models/integration_transform_example.rb +197 -0
  42. data/lib/blueprint_ruby_client/models/links.rb +2 -57
  43. data/lib/blueprint_ruby_client/models/lti1_integration_attributes.rb +225 -0
  44. data/lib/blueprint_ruby_client/models/meta.rb +2 -57
  45. data/lib/blueprint_ruby_client/models/namespace.rb +2 -43
  46. data/lib/blueprint_ruby_client/models/namespace_relationship.rb +2 -25
  47. data/lib/blueprint_ruby_client/models/node.rb +2 -75
  48. data/lib/blueprint_ruby_client/models/node_attributes.rb +26 -109
  49. data/lib/blueprint_ruby_client/models/node_body.rb +2 -42
  50. data/lib/blueprint_ruby_client/models/node_relationship.rb +2 -57
  51. data/lib/blueprint_ruby_client/models/node_relationships.rb +2 -73
  52. data/lib/blueprint_ruby_client/models/node_result_set.rb +2 -57
  53. data/lib/blueprint_ruby_client/models/resource.rb +2 -59
  54. data/lib/blueprint_ruby_client/models/template.rb +215 -0
  55. data/lib/blueprint_ruby_client/models/template_attributes.rb +217 -0
  56. data/lib/blueprint_ruby_client/models/{asset_attributes.rb → template_body.rb} +23 -33
  57. data/lib/blueprint_ruby_client/models/template_variables.rb +237 -0
  58. data/lib/blueprint_ruby_client/version.rb +1 -1
  59. data/lib/blueprint_ruby_client.rb +14 -0
  60. data/spec/api/asset_type_configs_api_spec.rb +52 -0
  61. data/spec/api/asset_type_templates_api_spec.rb +88 -0
  62. data/spec/api/assets_api_spec.rb +9 -9
  63. data/spec/api/hierarchy_api_spec.rb +17 -17
  64. data/spec/api/integrations_api_spec.rb +141 -0
  65. data/spec/api/lti_api_spec.rb +69 -0
  66. data/spec/api/security_api_spec.rb +50 -0
  67. data/spec/api_client_spec.rb +226 -0
  68. data/spec/configuration_spec.rb +42 -0
  69. data/spec/models/integration_body_spec.rb +56 -0
  70. data/spec/models/integration_spec.rb +66 -0
  71. data/spec/models/integration_transform_example_spec.rb +56 -0
  72. data/spec/models/integration_transform_spec.rb +76 -0
  73. data/spec/models/lti1_integration_attributes_spec.rb +76 -0
  74. data/spec/models/node_attributes_spec.rb +20 -0
  75. data/spec/models/template_attributes_spec.rb +56 -0
  76. data/spec/models/{asset_attributes_spec.rb → template_body_spec.rb} +17 -7
  77. data/spec/models/template_spec.rb +66 -0
  78. data/spec/models/template_variables_spec.rb +56 -0
  79. data/spec/spec_helper.rb +111 -0
  80. data/swagger-codegen-cli.jar +0 -0
  81. data/templates/model.mustache +5 -5
  82. metadata +67 -12
  83. data/docs/MixedResourceResultSet.md +0 -7
  84. data/spec/models/mixed_resource_result_set_spec.rb +0 -36
@@ -0,0 +1,214 @@
1
+ =begin
2
+ Talis Blueprint API
3
+
4
+ This is the API documentation for [Blueprint](https://github.com/talis/blueprint-server), a primitive for institutional structure and time periods
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module BlueprintClient
16
+ class AssetTypeTemplatesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ #
24
+ # Configure a template for a given asset type
25
+ # @param namespace identifier namespacing the blueprint.
26
+ # @param asset_type subtype of Asset, e.g. 'textbooks', 'digitisations', etc.
27
+ # @param template_body template body
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [TemplateBody]
30
+ def add(namespace, asset_type, template_body, opts = {})
31
+ data, _status_code, _headers = add_with_http_info(namespace, asset_type, template_body, opts)
32
+ return data
33
+ end
34
+
35
+ #
36
+ # Configure a template for a given asset type
37
+ # @param namespace identifier namespacing the blueprint.
38
+ # @param asset_type subtype of Asset, e.g. 'textbooks', 'digitisations', etc.
39
+ # @param template_body template body
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [Array<(TemplateBody, Fixnum, Hash)>] TemplateBody data, response status code and response headers
42
+ def add_with_http_info(namespace, asset_type, template_body, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug "Calling API: AssetTypeTemplatesApi.add ..."
45
+ end
46
+ # verify the required parameter 'namespace' is set
47
+ fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetTypeTemplatesApi.add" if namespace.nil?
48
+ # verify the required parameter 'asset_type' is set
49
+ fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetTypeTemplatesApi.add" if asset_type.nil?
50
+ # verify the required parameter 'template_body' is set
51
+ fail ArgumentError, "Missing the required parameter 'template_body' when calling AssetTypeTemplatesApi.add" if template_body.nil?
52
+ # resource path
53
+ local_var_path = "/{namespace}/assets/{assetType}/templates".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'assetType' + '}', asset_type.to_s)
54
+
55
+ # query parameters
56
+ query_params = {}
57
+
58
+ # header parameters
59
+ header_params = {}
60
+
61
+ # HTTP header 'Accept' (if needed)
62
+ local_header_accept = ['application/vnd.api+json']
63
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
64
+
65
+ # HTTP header 'Content-Type'
66
+ local_header_content_type = ['application/json']
67
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
68
+
69
+ # form parameters
70
+ form_params = {}
71
+
72
+ # http body (model)
73
+ post_body = @api_client.object_to_http_body(template_body)
74
+ auth_names = ['oauth2']
75
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => 'TemplateBody')
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: AssetTypeTemplatesApi#add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ #
89
+ # Delete a template for a given asset type
90
+ # @param namespace identifier namespacing the blueprint.
91
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [TemplateBody]
94
+ def delete(namespace, asset_type, opts = {})
95
+ data, _status_code, _headers = delete_with_http_info(namespace, asset_type, opts)
96
+ return data
97
+ end
98
+
99
+ #
100
+ # Delete a template for a given asset type
101
+ # @param namespace identifier namespacing the blueprint.
102
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(TemplateBody, Fixnum, Hash)>] TemplateBody data, response status code and response headers
105
+ def delete_with_http_info(namespace, asset_type, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "Calling API: AssetTypeTemplatesApi.delete ..."
108
+ end
109
+ # verify the required parameter 'namespace' is set
110
+ fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetTypeTemplatesApi.delete" if namespace.nil?
111
+ # verify the required parameter 'asset_type' is set
112
+ fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetTypeTemplatesApi.delete" if asset_type.nil?
113
+ # resource path
114
+ local_var_path = "/{namespace}/assets/{assetType}/templates".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'assetType' + '}', asset_type.to_s)
115
+
116
+ # query parameters
117
+ query_params = {}
118
+
119
+ # header parameters
120
+ header_params = {}
121
+
122
+ # HTTP header 'Accept' (if needed)
123
+ local_header_accept = ['application/vnd.api+json']
124
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
125
+
126
+ # HTTP header 'Content-Type'
127
+ local_header_content_type = ['application/json']
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
129
+
130
+ # form parameters
131
+ form_params = {}
132
+
133
+ # http body (model)
134
+ post_body = nil
135
+ auth_names = ['oauth2']
136
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => 'TemplateBody')
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: AssetTypeTemplatesApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ #
150
+ # update a template for a given asset type
151
+ # @param namespace identifier namespacing the blueprint.
152
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
153
+ # @param template_body template body
154
+ # @param [Hash] opts the optional parameters
155
+ # @return [TemplateBody]
156
+ def put(namespace, asset_type, template_body, opts = {})
157
+ data, _status_code, _headers = put_with_http_info(namespace, asset_type, template_body, opts)
158
+ return data
159
+ end
160
+
161
+ #
162
+ # update a template for a given asset type
163
+ # @param namespace identifier namespacing the blueprint.
164
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
165
+ # @param template_body template body
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(TemplateBody, Fixnum, Hash)>] TemplateBody data, response status code and response headers
168
+ def put_with_http_info(namespace, asset_type, template_body, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "Calling API: AssetTypeTemplatesApi.put ..."
171
+ end
172
+ # verify the required parameter 'namespace' is set
173
+ fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetTypeTemplatesApi.put" if namespace.nil?
174
+ # verify the required parameter 'asset_type' is set
175
+ fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetTypeTemplatesApi.put" if asset_type.nil?
176
+ # verify the required parameter 'template_body' is set
177
+ fail ArgumentError, "Missing the required parameter 'template_body' when calling AssetTypeTemplatesApi.put" if template_body.nil?
178
+ # resource path
179
+ local_var_path = "/{namespace}/assets/{assetType}/templates".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'assetType' + '}', asset_type.to_s)
180
+
181
+ # query parameters
182
+ query_params = {}
183
+
184
+ # header parameters
185
+ header_params = {}
186
+
187
+ # HTTP header 'Accept' (if needed)
188
+ local_header_accept = ['application/vnd.api+json']
189
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
190
+
191
+ # HTTP header 'Content-Type'
192
+ local_header_content_type = ['application/json']
193
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
194
+
195
+ # form parameters
196
+ form_params = {}
197
+
198
+ # http body (model)
199
+ post_body = @api_client.object_to_http_body(template_body)
200
+ auth_names = ['oauth2']
201
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
202
+ :header_params => header_params,
203
+ :query_params => query_params,
204
+ :form_params => form_params,
205
+ :body => post_body,
206
+ :auth_names => auth_names,
207
+ :return_type => 'TemplateBody')
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug "API called: AssetTypeTemplatesApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+ end
214
+ end
@@ -23,9 +23,9 @@ module BlueprintClient
23
23
  #
24
24
  # Add an asset to the node. Body must be empty. Will upsert the asset if it doesn't exist
25
25
  # @param namespace identifier namespacing the blueprint.
26
- # @param type Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
26
+ # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
27
27
  # @param id id identifying a domain model
28
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
28
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
29
29
  # @param asset_id id of an asset
30
30
  # @param [Hash] opts the optional parameters
31
31
  # @return [AssetBody]
@@ -37,9 +37,9 @@ module BlueprintClient
37
37
  #
38
38
  # Add an asset to the node. Body must be empty. Will upsert the asset if it doesn&#39;t exist
39
39
  # @param namespace identifier namespacing the blueprint.
40
- # @param type Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
40
+ # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
41
41
  # @param id id identifying a domain model
42
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
42
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
43
43
  # @param asset_id id of an asset
44
44
  # @param [Hash] opts the optional parameters
45
45
  # @return [Array<(AssetBody, Fixnum, Hash)>] AssetBody data, response status code and response headers
@@ -47,47 +47,16 @@ module BlueprintClient
47
47
  if @api_client.config.debugging
48
48
  @api_client.config.logger.debug "Calling API: AssetsApi.add_asset_to_node ..."
49
49
  end
50
-
51
-
52
50
  # verify the required parameter 'namespace' is set
53
51
  fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetsApi.add_asset_to_node" if namespace.nil?
54
-
55
-
56
-
57
-
58
-
59
-
60
52
  # verify the required parameter 'type' is set
61
53
  fail ArgumentError, "Missing the required parameter 'type' when calling AssetsApi.add_asset_to_node" if type.nil?
62
-
63
-
64
-
65
-
66
-
67
-
68
54
  # verify the required parameter 'id' is set
69
55
  fail ArgumentError, "Missing the required parameter 'id' when calling AssetsApi.add_asset_to_node" if id.nil?
70
-
71
-
72
-
73
-
74
-
75
-
76
56
  # verify the required parameter 'asset_type' is set
77
57
  fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetsApi.add_asset_to_node" if asset_type.nil?
78
-
79
-
80
-
81
-
82
-
83
-
84
58
  # verify the required parameter 'asset_id' is set
85
59
  fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.add_asset_to_node" if asset_id.nil?
86
-
87
-
88
-
89
-
90
-
91
60
  # resource path
92
61
  local_var_path = "/{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'type' + '}', type.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'assetType' + '}', asset_type.to_s).sub('{' + 'assetId' + '}', asset_id.to_s)
93
62
 
@@ -110,8 +79,7 @@ module BlueprintClient
110
79
 
111
80
  # http body (model)
112
81
  post_body = nil
113
-
114
- auth_names = ['oauth2']
82
+ auth_names = ['oauth2']
115
83
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
116
84
  :header_params => header_params,
117
85
  :query_params => query_params,
@@ -129,7 +97,7 @@ module BlueprintClient
129
97
  # Delete an Asset
130
98
  # @param namespace identifier namespacing the blueprint.
131
99
  # @param asset_id id of an asset
132
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
100
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
133
101
  # @param [Hash] opts the optional parameters
134
102
  # @return [nil]
135
103
  def delete_asset(namespace, asset_id, asset_type, opts = {})
@@ -141,38 +109,19 @@ module BlueprintClient
141
109
  # Delete an Asset
142
110
  # @param namespace identifier namespacing the blueprint.
143
111
  # @param asset_id id of an asset
144
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
112
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
145
113
  # @param [Hash] opts the optional parameters
146
114
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
147
115
  def delete_asset_with_http_info(namespace, asset_id, asset_type, opts = {})
148
116
  if @api_client.config.debugging
149
117
  @api_client.config.logger.debug "Calling API: AssetsApi.delete_asset ..."
150
118
  end
151
-
152
-
153
119
  # verify the required parameter 'namespace' is set
154
120
  fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetsApi.delete_asset" if namespace.nil?
155
-
156
-
157
-
158
-
159
-
160
-
161
121
  # verify the required parameter 'asset_id' is set
162
122
  fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.delete_asset" if asset_id.nil?
163
-
164
-
165
-
166
-
167
-
168
-
169
123
  # verify the required parameter 'asset_type' is set
170
124
  fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetsApi.delete_asset" if asset_type.nil?
171
-
172
-
173
-
174
-
175
-
176
125
  # resource path
177
126
  local_var_path = "/{namespace}/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'assetId' + '}', asset_id.to_s).sub('{' + 'assetType' + '}', asset_type.to_s)
178
127
 
@@ -195,8 +144,7 @@ module BlueprintClient
195
144
 
196
145
  # http body (model)
197
146
  post_body = nil
198
-
199
- auth_names = ['oauth2']
147
+ auth_names = ['oauth2']
200
148
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
201
149
  :header_params => header_params,
202
150
  :query_params => query_params,
@@ -212,7 +160,7 @@ module BlueprintClient
212
160
  #
213
161
  # Get details of a given asset
214
162
  # @param namespace identifier namespacing the blueprint.
215
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
163
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
216
164
  # @param asset_id id of an asset
217
165
  # @param [Hash] opts the optional parameters
218
166
  # @return [AssetBody]
@@ -224,7 +172,7 @@ module BlueprintClient
224
172
  #
225
173
  # Get details of a given asset
226
174
  # @param namespace identifier namespacing the blueprint.
227
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
175
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
228
176
  # @param asset_id id of an asset
229
177
  # @param [Hash] opts the optional parameters
230
178
  # @return [Array<(AssetBody, Fixnum, Hash)>] AssetBody data, response status code and response headers
@@ -232,31 +180,12 @@ module BlueprintClient
232
180
  if @api_client.config.debugging
233
181
  @api_client.config.logger.debug "Calling API: AssetsApi.get_asset ..."
234
182
  end
235
-
236
-
237
183
  # verify the required parameter 'namespace' is set
238
184
  fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetsApi.get_asset" if namespace.nil?
239
-
240
-
241
-
242
-
243
-
244
-
245
185
  # verify the required parameter 'asset_type' is set
246
186
  fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetsApi.get_asset" if asset_type.nil?
247
-
248
-
249
-
250
-
251
-
252
-
253
187
  # verify the required parameter 'asset_id' is set
254
188
  fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_asset" if asset_id.nil?
255
-
256
-
257
-
258
-
259
-
260
189
  # resource path
261
190
  local_var_path = "/{namespace}/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'assetType' + '}', asset_type.to_s).sub('{' + 'assetId' + '}', asset_id.to_s)
262
191
 
@@ -279,8 +208,7 @@ module BlueprintClient
279
208
 
280
209
  # http body (model)
281
210
  post_body = nil
282
-
283
- auth_names = ['oauth2']
211
+ auth_names = ['oauth2']
284
212
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
285
213
  :header_params => header_params,
286
214
  :query_params => query_params,
@@ -297,7 +225,7 @@ module BlueprintClient
297
225
  #
298
226
  # Get for assets in the relevant node
299
227
  # @param namespace identifier namespacing the blueprint.
300
- # @param type Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
228
+ # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
301
229
  # @param id id identifying a domain model
302
230
  # @param [Hash] opts the optional parameters
303
231
  # @option opts [Array<String>] :filter_asset_type type of asset to return
@@ -312,7 +240,7 @@ module BlueprintClient
312
240
  #
313
241
  # Get for assets in the relevant node
314
242
  # @param namespace identifier namespacing the blueprint.
315
- # @param type Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
243
+ # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
316
244
  # @param id id identifying a domain model
317
245
  # @param [Hash] opts the optional parameters
318
246
  # @option opts [Array<String>] :filter_asset_type type of asset to return
@@ -323,49 +251,12 @@ module BlueprintClient
323
251
  if @api_client.config.debugging
324
252
  @api_client.config.logger.debug "Calling API: AssetsApi.get_assets_in_node ..."
325
253
  end
326
-
327
-
328
254
  # verify the required parameter 'namespace' is set
329
255
  fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetsApi.get_assets_in_node" if namespace.nil?
330
-
331
-
332
-
333
-
334
-
335
-
336
256
  # verify the required parameter 'type' is set
337
257
  fail ArgumentError, "Missing the required parameter 'type' when calling AssetsApi.get_assets_in_node" if type.nil?
338
-
339
-
340
-
341
-
342
-
343
-
344
258
  # verify the required parameter 'id' is set
345
259
  fail ArgumentError, "Missing the required parameter 'id' when calling AssetsApi.get_assets_in_node" if id.nil?
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
-
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
260
  # resource path
370
261
  local_var_path = "/{namespace}/nodes/{type}/{id}/assets".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'type' + '}', type.to_s).sub('{' + 'id' + '}', id.to_s)
371
262
 
@@ -391,8 +282,7 @@ module BlueprintClient
391
282
 
392
283
  # http body (model)
393
284
  post_body = nil
394
-
395
- auth_names = ['oauth2']
285
+ auth_names = ['oauth2']
396
286
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
397
287
  :header_params => header_params,
398
288
  :query_params => query_params,
@@ -409,9 +299,9 @@ module BlueprintClient
409
299
  #
410
300
  # Remove an asset from the relevant node
411
301
  # @param namespace identifier namespacing the blueprint.
412
- # @param type Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
302
+ # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
413
303
  # @param id id identifying a domain model
414
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
304
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
415
305
  # @param asset_id id of an asset
416
306
  # @param [Hash] opts the optional parameters
417
307
  # @return [nil]
@@ -423,9 +313,9 @@ module BlueprintClient
423
313
  #
424
314
  # Remove an asset from the relevant node
425
315
  # @param namespace identifier namespacing the blueprint.
426
- # @param type Plural form of node type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
316
+ # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
427
317
  # @param id id identifying a domain model
428
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
318
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
429
319
  # @param asset_id id of an asset
430
320
  # @param [Hash] opts the optional parameters
431
321
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
@@ -433,47 +323,16 @@ module BlueprintClient
433
323
  if @api_client.config.debugging
434
324
  @api_client.config.logger.debug "Calling API: AssetsApi.remove_asset_from_node ..."
435
325
  end
436
-
437
-
438
326
  # verify the required parameter 'namespace' is set
439
327
  fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetsApi.remove_asset_from_node" if namespace.nil?
440
-
441
-
442
-
443
-
444
-
445
-
446
328
  # verify the required parameter 'type' is set
447
329
  fail ArgumentError, "Missing the required parameter 'type' when calling AssetsApi.remove_asset_from_node" if type.nil?
448
-
449
-
450
-
451
-
452
-
453
-
454
330
  # verify the required parameter 'id' is set
455
331
  fail ArgumentError, "Missing the required parameter 'id' when calling AssetsApi.remove_asset_from_node" if id.nil?
456
-
457
-
458
-
459
-
460
-
461
-
462
332
  # verify the required parameter 'asset_type' is set
463
333
  fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetsApi.remove_asset_from_node" if asset_type.nil?
464
-
465
-
466
-
467
-
468
-
469
-
470
334
  # verify the required parameter 'asset_id' is set
471
335
  fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.remove_asset_from_node" if asset_id.nil?
472
-
473
-
474
-
475
-
476
-
477
336
  # resource path
478
337
  local_var_path = "/{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'type' + '}', type.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'assetType' + '}', asset_type.to_s).sub('{' + 'assetId' + '}', asset_id.to_s)
479
338
 
@@ -496,8 +355,7 @@ module BlueprintClient
496
355
 
497
356
  # http body (model)
498
357
  post_body = nil
499
-
500
- auth_names = ['oauth2']
358
+ auth_names = ['oauth2']
501
359
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
502
360
  :header_params => header_params,
503
361
  :query_params => query_params,
@@ -511,10 +369,10 @@ module BlueprintClient
511
369
  end
512
370
 
513
371
  # Replaces the Asset with the data sent in the body
514
- # 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
372
+ # Wholesale replacement of Asset data: if you were to PUT to: /1/{namespace}/assets/sometype/someid with a body of: { type: \"someothertype\", id: \"someotherid\" } It would change the Asset's path to: /1/{namespace}/assets/someothertype/someotherid and /1/{namespace}/assets/sometype/someid would return a 404. It would also update the assets associated with any node.
515
373
  # @param namespace identifier namespacing the blueprint.
516
374
  # @param asset_id id of an asset
517
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
375
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
518
376
  # @param [Hash] opts the optional parameters
519
377
  # @option opts [AssetBody] :body asset
520
378
  # @return [AssetBody]
@@ -524,10 +382,10 @@ module BlueprintClient
524
382
  end
525
383
 
526
384
  # Replaces the Asset with the data sent in the body
527
- # Wholesale replacement of Asset data: if you were to PUT to:\n /1/{namespace}/assets/sometype/someid\n\nwith a body of:\n { type: \&quot;someothertype\&quot;, id: \&quot;someotherid\&quot; }\n\nIt would change the Asset&#39;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
385
+ # Wholesale replacement of Asset data: if you were to PUT to: /1/{namespace}/assets/sometype/someid with a body of: { type: \&quot;someothertype\&quot;, id: \&quot;someotherid\&quot; } It would change the Asset&#39;s path to: /1/{namespace}/assets/someothertype/someotherid and /1/{namespace}/assets/sometype/someid would return a 404. It would also update the assets associated with any node.
528
386
  # @param namespace identifier namespacing the blueprint.
529
387
  # @param asset_id id of an asset
530
- # @param asset_type Plural form of asset type (adds an &#39;s&#39; to the end of the type) todo - allow configuration of plurals
388
+ # @param asset_type subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.
531
389
  # @param [Hash] opts the optional parameters
532
390
  # @option opts [AssetBody] :body asset
533
391
  # @return [Array<(AssetBody, Fixnum, Hash)>] AssetBody data, response status code and response headers
@@ -535,37 +393,12 @@ module BlueprintClient
535
393
  if @api_client.config.debugging
536
394
  @api_client.config.logger.debug "Calling API: AssetsApi.replace_asset ..."
537
395
  end
538
-
539
-
540
396
  # verify the required parameter 'namespace' is set
541
397
  fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetsApi.replace_asset" if namespace.nil?
542
-
543
-
544
-
545
-
546
-
547
-
548
398
  # verify the required parameter 'asset_id' is set
549
399
  fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.replace_asset" if asset_id.nil?
550
-
551
-
552
-
553
-
554
-
555
-
556
400
  # verify the required parameter 'asset_type' is set
557
401
  fail ArgumentError, "Missing the required parameter 'asset_type' when calling AssetsApi.replace_asset" if asset_type.nil?
558
-
559
-
560
-
561
-
562
-
563
-
564
-
565
-
566
-
567
-
568
-
569
402
  # resource path
570
403
  local_var_path = "/{namespace}/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'assetId' + '}', asset_id.to_s).sub('{' + 'assetType' + '}', asset_type.to_s)
571
404
 
@@ -588,7 +421,6 @@ module BlueprintClient
588
421
 
589
422
  # http body (model)
590
423
  post_body = @api_client.object_to_http_body(opts[:'body'])
591
-
592
424
  auth_names = ['oauth2']
593
425
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
594
426
  :header_params => header_params,