blueprint_ruby_client 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cae5fd8293fbf977218f123f1eba948f86aabe1d
4
- data.tar.gz: 6c34d8cd923e376caadf74b3f3c22263000ced95
3
+ metadata.gz: f233545e7325241fb03b1e21f5df889affebe000
4
+ data.tar.gz: 60977f739e375ae4443609990946f58e54346a2b
5
5
  SHA512:
6
- metadata.gz: 0dc170f6077cae862957023528800b43cefd2daec63f414c561dd1406e25336cf4669604e68fd63e9e3f2a03777344daf24733766c1eca07978fc910b53d74ee
7
- data.tar.gz: 01e33c3ac6d8a2ce4a4a5875f0c36806d8e2241acc4c24c12535e762f948ef7bad811b5e02293c24fdec02c9497ef50fe8a642d6d0d56e68fb1be8d6f7f27320
6
+ metadata.gz: ccb12b1578367f620dfa24e18878796d134c207c94b99cf96db578a7247985ee61a38339136ab77b2b676e6f20082a0da484ee75f9351a81f08623e899238d4c
7
+ data.tar.gz: c5110bca9153e224f2731413474ce26470ccaa2142fa73a0b2a65123d51d92f6b1beb408d0baaacbb3dfdf2bd354d0c30dfe3e0059dc1dfdafab5cbbb50cff25
data/Gemfile.lock ADDED
@@ -0,0 +1,67 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ blueprint_ruby_client (0.5.2)
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.1)
12
+ addressable (2.5.0)
13
+ public_suffix (~> 2.0, >= 2.0.2)
14
+ autotest (4.4.6)
15
+ ZenTest (>= 4.4.1)
16
+ autotest-fsevent (0.2.12)
17
+ sys-uname
18
+ autotest-growl (0.2.16)
19
+ autotest-rails-pure (4.1.2)
20
+ crack (0.4.3)
21
+ safe_yaml (~> 1.0.0)
22
+ diff-lcs (1.3)
23
+ ethon (0.10.1)
24
+ ffi (>= 1.3.0)
25
+ ffi (1.9.18)
26
+ hashdiff (0.3.2)
27
+ json (1.8.6)
28
+ public_suffix (2.0.5)
29
+ rspec (3.5.0)
30
+ rspec-core (~> 3.5.0)
31
+ rspec-expectations (~> 3.5.0)
32
+ rspec-mocks (~> 3.5.0)
33
+ rspec-core (3.5.4)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-expectations (3.5.0)
36
+ diff-lcs (>= 1.2.0, < 2.0)
37
+ rspec-support (~> 3.5.0)
38
+ rspec-mocks (3.5.0)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.5.0)
41
+ rspec-support (3.5.0)
42
+ safe_yaml (1.0.4)
43
+ sys-uname (1.0.3)
44
+ ffi (>= 1.0.0)
45
+ typhoeus (1.1.2)
46
+ ethon (>= 0.9.0)
47
+ vcr (3.0.3)
48
+ webmock (1.24.6)
49
+ addressable (>= 2.3.6)
50
+ crack (>= 0.3.2)
51
+ hashdiff
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ autotest (~> 4.4, >= 4.4.6)
58
+ autotest-fsevent (~> 0.2, >= 0.2.11)
59
+ autotest-growl (~> 0.2, >= 0.2.16)
60
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
61
+ blueprint_ruby_client!
62
+ rspec (~> 3.4, >= 3.4.0)
63
+ vcr (~> 3.0, >= 3.0.1)
64
+ webmock (~> 1.24, >= 1.24.3)
65
+
66
+ BUNDLED WITH
67
+ 1.14.6
data/README.md CHANGED
@@ -7,8 +7,8 @@ This is the API documentation for [Blueprint](https://github.com/talis/blueprint
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 1.0.0
10
- - Package version: 0.5.2
11
- - Build date: 2017-03-29T15:28:48.629+01:00
10
+ - Package version: 0.5.4
11
+ - Build date: 2017-04-21T08:35:10.351+01:00
12
12
  - Build package: class io.swagger.codegen.languages.RubyClientCodegen
13
13
 
14
14
  ## Installation
@@ -34,15 +34,15 @@ gem build blueprint_ruby_client.gemspec
34
34
  Then either install the gem locally:
35
35
 
36
36
  ```shell
37
- gem install ./blueprint_ruby_client-0.5.2.gem
37
+ gem install ./blueprint_ruby_client-0.5.4.gem
38
38
  ```
39
- (for development, run `gem install --dev ./blueprint_ruby_client-0.5.2.gem` to install the development dependencies)
39
+ (for development, run `gem install --dev ./blueprint_ruby_client-0.5.4.gem` to install the development dependencies)
40
40
 
41
41
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
42
42
 
43
43
  Finally add this to the Gemfile:
44
44
 
45
- gem 'blueprint_ruby_client', '~> 0.5.2'
45
+ gem 'blueprint_ruby_client', '~> 0.5.4'
46
46
 
47
47
  ### Install from Git
48
48
 
@@ -99,6 +99,7 @@ Class | Method | HTTP request | Description
99
99
  *BlueprintClient::AssetTypeTemplatesApi* | [**put**](docs/AssetTypeTemplatesApi.md#put) | **PUT** /{namespace}/assets/{assetType}/templates |
100
100
  *BlueprintClient::AssetsApi* | [**add_asset_to_node**](docs/AssetsApi.md#add_asset_to_node) | **PUT** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
101
101
  *BlueprintClient::AssetsApi* | [**delete_asset**](docs/AssetsApi.md#delete_asset) | **DELETE** /{namespace}/assets/{assetType}/{assetId} |
102
+ *BlueprintClient::AssetsApi* | [**delete_assets**](docs/AssetsApi.md#delete_assets) | **DELETE** /{namespace}/assets | Delete assets
102
103
  *BlueprintClient::AssetsApi* | [**get_asset**](docs/AssetsApi.md#get_asset) | **GET** /{namespace}/assets/{assetType}/{assetId} |
103
104
  *BlueprintClient::AssetsApi* | [**get_assets_in_node**](docs/AssetsApi.md#get_assets_in_node) | **GET** /{namespace}/nodes/{type}/{id}/assets |
104
105
  *BlueprintClient::AssetsApi* | [**remove_asset_from_node**](docs/AssetsApi.md#remove_asset_from_node) | **DELETE** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
@@ -107,6 +108,7 @@ Class | Method | HTTP request | Description
107
108
  *BlueprintClient::HierarchyApi* | [**add_node**](docs/HierarchyApi.md#add_node) | **POST** /{namespaceIncGlobal}/nodes |
108
109
  *BlueprintClient::HierarchyApi* | [**bulk_upload**](docs/HierarchyApi.md#bulk_upload) | **POST** /{namespace}/nodes.csv |
109
110
  *BlueprintClient::HierarchyApi* | [**delete_node**](docs/HierarchyApi.md#delete_node) | **DELETE** /{namespace}/nodes/{type}/{id} |
111
+ *BlueprintClient::HierarchyApi* | [**delete_nodes**](docs/HierarchyApi.md#delete_nodes) | **DELETE** /{namespaceIncGlobal}/nodes | Delete nodes
110
112
  *BlueprintClient::HierarchyApi* | [**export_hierarchy**](docs/HierarchyApi.md#export_hierarchy) | **GET** /{namespace}/nodes.csv |
111
113
  *BlueprintClient::HierarchyApi* | [**get_ancestors**](docs/HierarchyApi.md#get_ancestors) | **GET** /{namespace}/nodes/{type}/{id}/ancestors | Get ancestor nodes
112
114
  *BlueprintClient::HierarchyApi* | [**get_children**](docs/HierarchyApi.md#get_children) | **GET** /{namespace}/nodes/{type}/{id}/children | Get child nodes
data/config.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "gemName": "blueprint_ruby_client",
3
3
  "moduleName": "BlueprintClient",
4
- "gemVersion": "0.5.3",
4
+ "gemVersion": "0.5.4",
5
5
  "gemLicense": "Copyright Talis Education Ltd",
6
6
  "gemHomepage": "https://github.com/talis/blueprint_rb",
7
7
  "gemSummary": "A ruby API wrapper for Blueprint",
data/docs/AssetsApi.md CHANGED
@@ -6,6 +6,7 @@ Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**add_asset_to_node**](AssetsApi.md#add_asset_to_node) | **PUT** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
8
8
  [**delete_asset**](AssetsApi.md#delete_asset) | **DELETE** /{namespace}/assets/{assetType}/{assetId} |
9
+ [**delete_assets**](AssetsApi.md#delete_assets) | **DELETE** /{namespace}/assets | Delete assets
9
10
  [**get_asset**](AssetsApi.md#get_asset) | **GET** /{namespace}/assets/{assetType}/{assetId} |
10
11
  [**get_assets_in_node**](AssetsApi.md#get_assets_in_node) | **GET** /{namespace}/nodes/{type}/{id}/assets |
11
12
  [**remove_asset_from_node**](AssetsApi.md#remove_asset_from_node) | **DELETE** /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId} |
@@ -132,6 +133,57 @@ nil (empty response body)
132
133
 
133
134
 
134
135
 
136
+ # **delete_assets**
137
+ > delete_assets(namespace, )
138
+
139
+ Delete assets
140
+
141
+ Delete all assets belonging to the given namespace.
142
+
143
+ ### Example
144
+ ```ruby
145
+ # load the gem
146
+ require 'blueprint_ruby_client'
147
+ # setup authorization
148
+ BlueprintClient.configure do |config|
149
+ # Configure OAuth2 access token for authorization: oauth2
150
+ config.access_token = 'YOUR ACCESS TOKEN'
151
+ end
152
+
153
+ api_instance = BlueprintClient::AssetsApi.new
154
+
155
+ 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.
156
+
157
+
158
+ begin
159
+ #Delete assets
160
+ api_instance.delete_assets(namespace, )
161
+ rescue BlueprintClient::ApiError => e
162
+ puts "Exception when calling AssetsApi->delete_assets: #{e}"
163
+ end
164
+ ```
165
+
166
+ ### Parameters
167
+
168
+ Name | Type | Description | Notes
169
+ ------------- | ------------- | ------------- | -------------
170
+ **namespace** | **String**| identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores. |
171
+
172
+ ### Return type
173
+
174
+ nil (empty response body)
175
+
176
+ ### Authorization
177
+
178
+ [oauth2](../README.md#oauth2)
179
+
180
+ ### HTTP request headers
181
+
182
+ - **Content-Type**: application/json
183
+ - **Accept**: application/vnd.api+json
184
+
185
+
186
+
135
187
  # **get_asset**
136
188
  > AssetBody get_asset(namespace, asset_type, asset_id)
137
189
 
@@ -216,7 +268,7 @@ type = "type_example" # String | subtype of Node, e.g. 'modules', 'departments',
216
268
  id = "id_example" # String | id identifying a domain model
217
269
 
218
270
  opts = {
219
- filter_asset_type: ["filter_asset_type_example"], # Array<String> | type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
271
+ filter_asset_type: ["filter_asset_type_example"], # Array<String> | type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
220
272
  offset: 3.4, # Float | index to start result set from
221
273
  limit: 3.4 # Float | number of records to return
222
274
  }
@@ -236,7 +288,7 @@ Name | Type | Description | Notes
236
288
  **namespace** | **String**| identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores. |
237
289
  **type** | **String**| subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc. |
238
290
  **id** | **String**| id identifying a domain model |
239
- **filter_asset_type** | [**Array&lt;String&gt;**](String.md)| type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2 | [optional]
291
+ **filter_asset_type** | [**Array&lt;String&gt;**](String.md)| type of asset to return. This filters the results by asset type, but returns all the assets associated with the result. | [optional]
240
292
  **offset** | [**Float**](.md)| index to start result set from | [optional]
241
293
  **limit** | [**Float**](.md)| number of records to return | [optional]
242
294
 
@@ -405,7 +457,7 @@ opts = {
405
457
  limit: 3.4 # Float | number of records to return
406
458
  include: ["include_example"] # Array<String> | comma separated list of elements to hydrate. Can include children, parents, nodes, and/or assets
407
459
  filter_node: ["filter_node_example"], # Array<String> | limit to assets that are related to a node matching type/code
408
- filter_asset_type: ["filter_asset_type_example"], # Array<String> | type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
460
+ filter_asset_type: ["filter_asset_type_example"], # Array<String> | type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
409
461
  }
410
462
 
411
463
  begin
@@ -426,7 +478,7 @@ Name | Type | Description | Notes
426
478
  **limit** | [**Float**](.md)| number of records to return | [optional]
427
479
  **include** | [**Array&lt;String&gt;**](String.md)| comma separated list of elements to hydrate. Can include children, parents, nodes, and/or assets | [optional]
428
480
  **filter_node** | [**Array&lt;String&gt;**](String.md)| limit to assets that are related to a node matching type/code | [optional]
429
- **filter_asset_type** | [**Array&lt;String&gt;**](String.md)| type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2 | [optional]
481
+ **filter_asset_type** | [**Array&lt;String&gt;**](String.md)| type of asset to return. This filters the results by asset type, but returns all the assets associated with the result. | [optional]
430
482
 
431
483
  ### Return type
432
484
 
data/docs/HierarchyApi.md CHANGED
@@ -7,6 +7,7 @@ Method | HTTP request | Description
7
7
  [**add_node**](HierarchyApi.md#add_node) | **POST** /{namespaceIncGlobal}/nodes |
8
8
  [**bulk_upload**](HierarchyApi.md#bulk_upload) | **POST** /{namespace}/nodes.csv |
9
9
  [**delete_node**](HierarchyApi.md#delete_node) | **DELETE** /{namespace}/nodes/{type}/{id} |
10
+ [**delete_nodes**](HierarchyApi.md#delete_nodes) | **DELETE** /{namespaceIncGlobal}/nodes | Delete nodes
10
11
  [**export_hierarchy**](HierarchyApi.md#export_hierarchy) | **GET** /{namespace}/nodes.csv |
11
12
  [**get_ancestors**](HierarchyApi.md#get_ancestors) | **GET** /{namespace}/nodes/{type}/{id}/ancestors | Get ancestor nodes
12
13
  [**get_children**](HierarchyApi.md#get_children) | **GET** /{namespace}/nodes/{type}/{id}/children | Get child nodes
@@ -19,7 +20,7 @@ Method | HTTP request | Description
19
20
 
20
21
 
21
22
  # **add_node**
22
- > NodeBody add_node(namespace_inc_global, body, )
23
+ > NodeBody add_node(namespace_inc_globalbody, )
23
24
 
24
25
 
25
26
 
@@ -43,7 +44,7 @@ body = BlueprintClient::NodeBody.new # NodeBody | node
43
44
 
44
45
 
45
46
  begin
46
- result = api_instance.add_node(namespace_inc_global, body, )
47
+ result = api_instance.add_node(namespace_inc_globalbody, )
47
48
  p result
48
49
  rescue BlueprintClient::ApiError => e
49
50
  puts "Exception when calling HierarchyApi->add_node: #{e}"
@@ -178,6 +179,57 @@ nil (empty response body)
178
179
 
179
180
 
180
181
 
182
+ # **delete_nodes**
183
+ > delete_nodes(namespace_inc_global)
184
+
185
+ Delete nodes
186
+
187
+ Delete all nodes belonging to the given namespace.
188
+
189
+ ### Example
190
+ ```ruby
191
+ # load the gem
192
+ require 'blueprint_ruby_client'
193
+ # setup authorization
194
+ BlueprintClient.configure do |config|
195
+ # Configure OAuth2 access token for authorization: oauth2
196
+ config.access_token = 'YOUR ACCESS TOKEN'
197
+ end
198
+
199
+ api_instance = BlueprintClient::HierarchyApi.new
200
+
201
+ namespace_inc_global = "namespace_inc_global_example" # String | identifier namespacing the blueprint. `global` is a special namespace which references data from all blueprints in the call.
202
+
203
+
204
+ begin
205
+ #Delete nodes
206
+ api_instance.delete_nodes(namespace_inc_global)
207
+ rescue BlueprintClient::ApiError => e
208
+ puts "Exception when calling HierarchyApi->delete_nodes: #{e}"
209
+ end
210
+ ```
211
+
212
+ ### Parameters
213
+
214
+ Name | Type | Description | Notes
215
+ ------------- | ------------- | ------------- | -------------
216
+ **namespace_inc_global** | **String**| identifier namespacing the blueprint. `global` is a special namespace which references data from all blueprints in the call. |
217
+
218
+ ### Return type
219
+
220
+ nil (empty response body)
221
+
222
+ ### Authorization
223
+
224
+ [oauth2](../README.md#oauth2)
225
+
226
+ ### HTTP request headers
227
+
228
+ - **Content-Type**: application/json
229
+ - **Accept**: application/vnd.api+json
230
+
231
+
232
+
181
233
  # **export_hierarchy**
182
234
  > export_hierarchy(namespace, )
183
235
 
@@ -608,7 +660,7 @@ Name | Type | Description | Notes
608
660
 
609
661
 
610
662
  # **search_nodes**
611
- > NodeResultSet search_nodes(namespace_inc_global, , opts)
663
+ > NodeResultSet search_nodes(namespace_inc_global, opts)
612
664
 
613
665
  Search nodes
614
666
 
@@ -639,8 +691,7 @@ opts = {
639
691
  filter_ancestor: ["filter_ancestor_example"], # Array<String> | limit to nodes with ancestor matching type/code
640
692
  filter_descendant: ["filter_descendant_example"], # Array<String> | limit to nodes with descendant matching type/code
641
693
  filter_has_assets: true, # BOOLEAN | limit to either nodes that have assets (true) nodes that have no assets (false) or omit to consider both nodes with and without assets
642
- filter_asset_type: ["filter_asset_type_example"], # Array<String> | type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
643
- filter_asset_type2: ["filter_asset_type_example"], # Array<String> | type of asset to return. Version 2. This filters the results by asset type, but returns all the assets associated with the result.
694
+ filter_asset_type: ["filter_asset_type_example"], # Array<String> | type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
644
695
  filter_from: Date.parse("2013-10-20"), # Date | limit to results valid after this date, format is ISO8601 date
645
696
  filter_to: Date.parse("2013-10-20"), # Date | limit to results valid before this date, format is ISO8601
646
697
  q_node: "q_node_example", # String | query term(s) to search for nodes. Allows wildcard searching with '*'
@@ -653,7 +704,7 @@ opts = {
653
704
 
654
705
  begin
655
706
  #Search nodes
656
- result = api_instance.search_nodes(namespace_inc_global, , opts)
707
+ result = api_instance.search_nodes(namespace_inc_global, opts)
657
708
  p result
658
709
  rescue BlueprintClient::ApiError => e
659
710
  puts "Exception when calling HierarchyApi->search_nodes: #{e}"
@@ -675,8 +726,7 @@ Name | Type | Description | Notes
675
726
  **filter_ancestor** | [**Array&lt;String&gt;**](String.md)| limit to nodes with ancestor matching type/code | [optional]
676
727
  **filter_descendant** | [**Array&lt;String&gt;**](String.md)| limit to nodes with descendant matching type/code | [optional]
677
728
  **filter_has_assets** | **BOOLEAN**| limit to either nodes that have assets (true) nodes that have no assets (false) or omit to consider both nodes with and without assets | [optional]
678
- **filter_asset_type** | [**Array&lt;String&gt;**](String.md)| type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2 | [optional]
679
- **filter_asset_type2** | [**Array&lt;String&gt;**](String.md)| type of asset to return. Version 2. This filters the results by asset type, but returns all the assets associated with the result. | [optional]
729
+ **filter_asset_type** | [**Array&lt;String&gt;**](String.md)| type of asset to return. This filters the results by asset type, but returns all the assets associated with the result. | [optional]
680
730
  **filter_from** | **Date**| limit to results valid after this date, format is ISO8601 date | [optional]
681
731
  **filter_to** | **Date**| limit to results valid before this date, format is ISO8601 | [optional]
682
732
  **q_node** | **String**| query term(s) to search for nodes. Allows wildcard searching with &#39;*&#39; | [optional]
@@ -209,6 +209,70 @@ module BlueprintClient
209
209
  return data, status_code, headers
210
210
  end
211
211
 
212
+ # Delete assets
213
+ # Delete all assets belonging to the given namespace.
214
+ # @param namespace identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [nil]
217
+ def delete_assets(namespace, opts = {})
218
+ delete_assets_with_http_info(namespace, opts)
219
+ return nil
220
+ end
221
+
222
+ # Delete assets
223
+ # Delete all assets belonging to the given namespace.
224
+ # @param namespace identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
227
+ def delete_assets_with_http_info(namespace, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "Calling API: AssetsApi.delete_assets ..."
230
+ end
231
+
232
+
233
+ # verify the required parameter 'namespace' is set
234
+ fail ArgumentError, "Missing the required parameter 'namespace' when calling AssetsApi.delete_assets" if namespace.nil?
235
+
236
+
237
+
238
+
239
+
240
+ # resource path
241
+ local_var_path = "/{namespace}/assets".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s)
242
+
243
+ # query parameters
244
+ query_params = {}
245
+
246
+ # header parameters
247
+ header_params = {}
248
+
249
+ # HTTP header 'Accept' (if needed)
250
+ local_header_accept = ['application/vnd.api+json']
251
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
252
+
253
+ # HTTP header 'Content-Type'
254
+ local_header_content_type = ['application/json']
255
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
256
+
257
+ # form parameters
258
+ form_params = {}
259
+
260
+ # http body (model)
261
+ post_body = nil
262
+
263
+ auth_names = ['oauth2']
264
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
265
+ :header_params => header_params,
266
+ :query_params => query_params,
267
+ :form_params => form_params,
268
+ :body => post_body,
269
+ :auth_names => auth_names)
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug "API called: AssetsApi#delete_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
272
+ end
273
+ return data, status_code, headers
274
+ end
275
+
212
276
  #
213
277
  # Get details of a given asset
214
278
  # @param namespace identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
@@ -300,7 +364,7 @@ module BlueprintClient
300
364
  # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
301
365
  # @param id id identifying a domain model
302
366
  # @param [Hash] opts the optional parameters
303
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
367
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
304
368
  # @option opts [Float] :offset index to start result set from
305
369
  # @option opts [Float] :limit number of records to return
306
370
  # @return [AssetResultSet]
@@ -315,7 +379,7 @@ module BlueprintClient
315
379
  # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
316
380
  # @param id id identifying a domain model
317
381
  # @param [Hash] opts the optional parameters
318
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
382
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
319
383
  # @option opts [Float] :offset index to start result set from
320
384
  # @option opts [Float] :limit number of records to return
321
385
  # @return [Array<(AssetResultSet, Fixnum, Hash)>] AssetResultSet data, response status code and response headers
@@ -611,7 +675,7 @@ module BlueprintClient
611
675
  # @option opts [Float] :limit number of records to return
612
676
  # @option opts [Array<String>] :include comma separated list of elements to hydrate. Can include children, parents, nodes, and/or assets
613
677
  # @option opts [Array<String>] :filter_node limit to assets that are related to a node matching type/code
614
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
678
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
615
679
  # @return [AssetResultSet]
616
680
  def search_assets(namespace, opts = {})
617
681
  data, _status_code, _headers = search_assets_with_http_info(namespace, opts)
@@ -626,7 +690,7 @@ module BlueprintClient
626
690
  # @option opts [Float] :limit number of records to return
627
691
  # @option opts [Array<String>] :include comma separated list of elements to hydrate. Can include children, parents, nodes, and/or assets
628
692
  # @option opts [Array<String>] :filter_node limit to assets that are related to a node matching type/code
629
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
693
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
630
694
  # @return [Array<(AssetResultSet, Fixnum, Hash)>] AssetResultSet data, response status code and response headers
631
695
  def search_assets_with_http_info(namespace, opts = {})
632
696
  if @api_client.config.debugging
@@ -243,6 +243,70 @@ module BlueprintClient
243
243
  return data, status_code, headers
244
244
  end
245
245
 
246
+ # Delete nodes
247
+ # Delete all nodes belonging to the given namespace.
248
+ # @param namespace_inc_global identifier namespacing the blueprint. `global` is a special namespace which references data from all blueprints in the call.
249
+ # @param [Hash] opts the optional parameters
250
+ # @return [nil]
251
+ def delete_nodes(namespace_inc_global, opts = {})
252
+ delete_nodes_with_http_info(namespace_inc_global, opts)
253
+ return nil
254
+ end
255
+
256
+ # Delete nodes
257
+ # Delete all nodes belonging to the given namespace.
258
+ # @param namespace_inc_global identifier namespacing the blueprint. `global` is a special namespace which references data from all blueprints in the call.
259
+ # @param [Hash] opts the optional parameters
260
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
261
+ def delete_nodes_with_http_info(namespace_inc_global, opts = {})
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "Calling API: HierarchyApi.delete_nodes ..."
264
+ end
265
+
266
+
267
+ # verify the required parameter 'namespace_inc_global' is set
268
+ fail ArgumentError, "Missing the required parameter 'namespace_inc_global' when calling HierarchyApi.delete_nodes" if namespace_inc_global.nil?
269
+
270
+
271
+
272
+
273
+
274
+ # resource path
275
+ local_var_path = "/{namespaceIncGlobal}/nodes".sub('{format}','json').sub('{' + 'namespaceIncGlobal' + '}', namespace_inc_global.to_s)
276
+
277
+ # query parameters
278
+ query_params = {}
279
+
280
+ # header parameters
281
+ header_params = {}
282
+
283
+ # HTTP header 'Accept' (if needed)
284
+ local_header_accept = ['application/vnd.api+json']
285
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
286
+
287
+ # HTTP header 'Content-Type'
288
+ local_header_content_type = ['application/json']
289
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
290
+
291
+ # form parameters
292
+ form_params = {}
293
+
294
+ # http body (model)
295
+ post_body = nil
296
+
297
+ auth_names = ['oauth2']
298
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
299
+ :header_params => header_params,
300
+ :query_params => query_params,
301
+ :form_params => form_params,
302
+ :body => post_body,
303
+ :auth_names => auth_names)
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug "API called: HierarchyApi#delete_nodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
306
+ end
307
+ return data, status_code, headers
308
+ end
309
+
246
310
  #
247
311
  # Download the blueprint's nodes in CSV format\nFormat will be:\n\n OLD NODE TYPE, OLD NODE ID, NEW NODE TYPE, NEW NODE ID, PARENTS, TITLE, DESCRIPTION, DOMAIN IDS, STUDENT NUMBERS\n\nOLD NODE TYPE and OLD NODE ID are left intentionally blank to allow direct upload of the output back into the bulk importer\n
248
312
  # @param namespace identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
@@ -922,8 +986,7 @@ module BlueprintClient
922
986
  # @option opts [Array<String>] :filter_ancestor limit to nodes with ancestor matching type/code
923
987
  # @option opts [Array<String>] :filter_descendant limit to nodes with descendant matching type/code
924
988
  # @option opts [BOOLEAN] :filter_has_assets limit to either nodes that have assets (true) nodes that have no assets (false) or omit to consider both nodes with and without assets
925
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
926
- # @option opts [Array<String>] :filter_asset_type2 type of asset to return. Version 2. This filters the results by asset type, but returns all the assets associated with the result.
989
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
927
990
  # @option opts [Date] :filter_from limit to results valid after this date, format is ISO8601 date
928
991
  # @option opts [Date] :filter_to limit to results valid before this date, format is ISO8601
929
992
  # @option opts [String] :q_node query term(s) to search for nodes. Allows wildcard searching with &#39;*&#39;
@@ -952,8 +1015,7 @@ module BlueprintClient
952
1015
  # @option opts [Array<String>] :filter_ancestor limit to nodes with ancestor matching type/code
953
1016
  # @option opts [Array<String>] :filter_descendant limit to nodes with descendant matching type/code
954
1017
  # @option opts [BOOLEAN] :filter_has_assets limit to either nodes that have assets (true) nodes that have no assets (false) or omit to consider both nodes with and without assets
955
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
956
- # @option opts [Array<String>] :filter_asset_type2 type of asset to return. Version 2. This filters the results by asset type, but returns all the assets associated with the result.
1018
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
957
1019
  # @option opts [Date] :filter_from limit to results valid after this date, format is ISO8601 date
958
1020
  # @option opts [Date] :filter_to limit to results valid before this date, format is ISO8601
959
1021
  # @option opts [String] :q_node query term(s) to search for nodes. Allows wildcard searching with &#39;*&#39;
@@ -1083,12 +1145,6 @@ module BlueprintClient
1083
1145
 
1084
1146
 
1085
1147
 
1086
-
1087
-
1088
-
1089
-
1090
-
1091
-
1092
1148
 
1093
1149
 
1094
1150
 
@@ -1112,7 +1168,6 @@ module BlueprintClient
1112
1168
  query_params[:'filter[descendant]'] = @api_client.build_collection_param(opts[:'filter_descendant'], :csv) if opts[:'filter_descendant']
1113
1169
  query_params[:'filter[hasAssets]'] = opts[:'filter_has_assets'] if opts[:'filter_has_assets']
1114
1170
  query_params[:'filter[assetType]'] = @api_client.build_collection_param(opts[:'filter_asset_type'], :csv) if opts[:'filter_asset_type']
1115
- query_params[:'filter[asset.type]'] = @api_client.build_collection_param(opts[:'filter_asset_type2'], :csv) if opts[:'filter_asset_type2']
1116
1171
  query_params[:'filter[from]'] = opts[:'filter_from'] if opts[:'filter_from']
1117
1172
  query_params[:'filter[to]'] = opts[:'filter_to'] if opts[:'filter_to']
1118
1173
  query_params[:'q[node]'] = opts[:'q_node'] if opts[:'q_node']
@@ -11,5 +11,5 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
11
  =end
12
12
 
13
13
  module BlueprintClient
14
- VERSION = "0.5.3"
14
+ VERSION = "0.5.4"
15
15
  end
@@ -70,6 +70,22 @@ describe 'AssetsApi' do
70
70
  end
71
71
  end
72
72
 
73
+ # unit tests for delete_assets
74
+ # Delete assets
75
+ # Delete all assets belonging to the given namespace.
76
+ # @param namespace identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
77
+ # @param [Hash] opts the optional parameters
78
+ # @return [nil]
79
+ describe 'delete_assets test' do
80
+ it "should work" do
81
+ # assertion here
82
+ # should be_a()
83
+ # should be_nil
84
+ # should ==
85
+ # should_not ==
86
+ end
87
+ end
88
+
73
89
  # unit tests for get_asset
74
90
  #
75
91
  # Get details of a given asset
@@ -95,7 +111,7 @@ describe 'AssetsApi' do
95
111
  # @param type subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.
96
112
  # @param id id identifying a domain model
97
113
  # @param [Hash] opts the optional parameters
98
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
114
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
99
115
  # @option opts [Float] :offset index to start result set from
100
116
  # @option opts [Float] :limit number of records to return
101
117
  # @return [AssetResultSet]
@@ -157,7 +173,7 @@ describe 'AssetsApi' do
157
173
  # @option opts [Float] :limit number of records to return
158
174
  # @option opts [Array<String>] :include comma separated list of elements to hydrate. Can include children, parents, nodes, and/or assets
159
175
  # @option opts [Array<String>] :filter_node limit to assets that are related to a node matching type/code
160
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
176
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
161
177
  # @return [AssetResultSet]
162
178
  describe 'search_assets test' do
163
179
  it "should work" do
@@ -83,6 +83,22 @@ describe 'HierarchyApi' do
83
83
  end
84
84
  end
85
85
 
86
+ # unit tests for delete_nodes
87
+ # Delete nodes
88
+ # Delete all nodes belonging to the given namespace.
89
+ # @param namespace_inc_global identifier namespacing the blueprint. `global` is a special namespace which references data from all blueprints in the call.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [nil]
92
+ describe 'delete_nodes test' do
93
+ it "should work" do
94
+ # assertion here
95
+ # should be_a()
96
+ # should be_nil
97
+ # should ==
98
+ # should_not ==
99
+ end
100
+ end
101
+
86
102
  # unit tests for export_hierarchy
87
103
  #
88
104
  # Download the blueprint&#39;s nodes in CSV format\nFormat will be:\n\n OLD NODE TYPE, OLD NODE ID, NEW NODE TYPE, NEW NODE ID, PARENTS, TITLE, DESCRIPTION, DOMAIN IDS, STUDENT NUMBERS\n\nOLD NODE TYPE and OLD NODE ID are left intentionally blank to allow direct upload of the output back into the bulk importer\n
@@ -232,8 +248,7 @@ describe 'HierarchyApi' do
232
248
  # @option opts [Array<String>] :filter_ancestor limit to nodes with ancestor matching type/code
233
249
  # @option opts [Array<String>] :filter_descendant limit to nodes with descendant matching type/code
234
250
  # @option opts [BOOLEAN] :filter_has_assets limit to either nodes that have assets (true) nodes that have no assets (false) or omit to consider both nodes with and without assets
235
- # @option opts [Array<String>] :filter_asset_type type of asset to return. Depricated. This filters the results by asset type, but incorrectly only returns the assets of thay type. Use asset.type.2
236
- # @option opts [Array<String>] :filter_asset_type2 type of asset to return. Version 2. This filters the results by asset type, but returns all the assets associated with the result.
251
+ # @option opts [Array<String>] :filter_asset_type type of asset to return. This filters the results by asset type, but returns all the assets associated with the result.
237
252
  # @option opts [Date] :filter_from limit to results valid after this date, format is ISO8601 date
238
253
  # @option opts [Date] :filter_to limit to results valid before this date, format is ISO8601
239
254
  # @option opts [String] :q_node query term(s) to search for nodes. Allows wildcard searching with &#39;*&#39;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueprint_ruby_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Paddock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-29 00:00:00.000000000 Z
11
+ date: 2017-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -198,6 +198,7 @@ extensions: []
198
198
  extra_rdoc_files: []
199
199
  files:
200
200
  - Gemfile
201
+ - Gemfile.lock
201
202
  - LICENSE
202
203
  - README.md
203
204
  - blueprint_ruby_client.gemspec
@@ -349,42 +350,42 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
350
  version: '0'
350
351
  requirements: []
351
352
  rubyforge_project:
352
- rubygems_version: 2.5.1
353
+ rubygems_version: 2.5.2
353
354
  signing_key:
354
355
  specification_version: 4
355
356
  summary: A ruby API wrapper for Blueprint
356
357
  test_files:
358
+ - spec/api/security_api_spec.rb
357
359
  - spec/api/assets_api_spec.rb
358
- - spec/api/asset_type_configs_api_spec.rb
359
- - spec/api/asset_type_templates_api_spec.rb
360
360
  - spec/api/hierarchy_api_spec.rb
361
- - spec/api/integrations_api_spec.rb
362
361
  - spec/api/lti_api_spec.rb
363
- - spec/api/security_api_spec.rb
364
- - spec/models/node_body_spec.rb
365
- - spec/models/asset_relationships_spec.rb
366
- - spec/models/template_spec.rb
367
- - spec/models/asset_result_set_spec.rb
368
- - spec/models/integration_spec.rb
362
+ - spec/api/asset_type_templates_api_spec.rb
363
+ - spec/api/integrations_api_spec.rb
364
+ - spec/api/asset_type_configs_api_spec.rb
369
365
  - spec/models/node_relationships_spec.rb
370
- - spec/models/links_spec.rb
371
- - spec/models/asset_spec.rb
372
- - spec/models/integration_body_spec.rb
373
- - spec/models/integration_transform_example_spec.rb
366
+ - spec/models/node_spec.rb
367
+ - spec/models/meta_spec.rb
374
368
  - spec/models/template_attributes_spec.rb
369
+ - spec/models/asset_relationship_spec.rb
375
370
  - spec/models/error_spec.rb
376
- - spec/models/errors_spec.rb
371
+ - spec/models/node_attributes_spec.rb
372
+ - spec/models/integration_body_spec.rb
377
373
  - spec/models/node_relationship_spec.rb
378
- - spec/models/resource_spec.rb
379
- - spec/models/meta_spec.rb
380
- - spec/models/asset_body_spec.rb
381
- - spec/models/integration_transform_spec.rb
382
- - spec/models/asset_relationship_spec.rb
383
- - spec/models/namespace_spec.rb
374
+ - spec/models/errors_spec.rb
375
+ - spec/models/node_result_set_spec.rb
384
376
  - spec/models/namespace_relationship_spec.rb
385
- - spec/models/node_attributes_spec.rb
377
+ - spec/models/integration_transform_spec.rb
386
378
  - spec/models/lti1_integration_attributes_spec.rb
387
- - spec/models/template_body_spec.rb
388
- - spec/models/node_result_set_spec.rb
379
+ - spec/models/integration_spec.rb
380
+ - spec/models/asset_body_spec.rb
381
+ - spec/models/asset_spec.rb
382
+ - spec/models/links_spec.rb
383
+ - spec/models/asset_result_set_spec.rb
384
+ - spec/models/template_spec.rb
385
+ - spec/models/integration_transform_example_spec.rb
386
+ - spec/models/asset_relationships_spec.rb
389
387
  - spec/models/template_variables_spec.rb
390
- - spec/models/node_spec.rb
388
+ - spec/models/resource_spec.rb
389
+ - spec/models/namespace_spec.rb
390
+ - spec/models/node_body_spec.rb
391
+ - spec/models/template_body_spec.rb