Class: AlfrescoAPI::FavoritesApi
- Inherits:
-
Object
- Object
- AlfrescoAPI::FavoritesApi
- Defined in:
- lib/alfresco_api/api/favorites_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_favorite(person_id, favorite_body_create, opts = {}) ⇒ FavoriteEntry
Create a favorite Favorite a site, file, or folder in the repository.
-
#create_favorite_with_http_info(person_id, favorite_body_create, opts = {}) ⇒ Array<(FavoriteEntry, Fixnum, Hash)>
Create a favorite Favorite a site, file, or folder in the repository.
-
#create_site_favorite(person_id, favorite_site_body_create, opts = {}) ⇒ FavoriteSiteEntry
Create a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#create_site_favorite_with_http_info(person_id, favorite_site_body_create, opts = {}) ⇒ Array<(FavoriteSiteEntry, Fixnum, Hash)>
Create a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#delete_favorite(person_id, favorite_id, opts = {}) ⇒ nil
Delete a favorite Deletes favoriteId as a favorite of person personId.
-
#delete_favorite_with_http_info(person_id, favorite_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a favorite Deletes favoriteId as a favorite of person personId.
-
#delete_site_favorite(person_id, site_id, opts = {}) ⇒ nil
Delete a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#delete_site_favorite_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#get_favorite(person_id, favorite_id, opts = {}) ⇒ FavoriteEntry
Get a favorite Gets favorite favoriteId for person personId.
-
#get_favorite_site(person_id, site_id, opts = {}) ⇒ SiteEntry
Get a favorite site Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#get_favorite_site_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(SiteEntry, Fixnum, Hash)>
Get a favorite site Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#get_favorite_with_http_info(person_id, favorite_id, opts = {}) ⇒ Array<(FavoriteEntry, Fixnum, Hash)>
Get a favorite Gets favorite favoriteId for person personId.
-
#initialize(api_client = ApiClient.default) ⇒ FavoritesApi
constructor
A new instance of FavoritesApi.
-
#list_favorite_sites_for_person(person_id, opts = {}) ⇒ SitePaging
List favorite sites Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#list_favorite_sites_for_person_with_http_info(person_id, opts = {}) ⇒ Array<(SitePaging, Fixnum, Hash)>
List favorite sites Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
-
#list_favorites(person_id, opts = {}) ⇒ FavoritePaging
List favorites Gets a list of favorites for person personId.
-
#list_favorites_with_http_info(person_id, opts = {}) ⇒ Array<(FavoritePaging, Fixnum, Hash)>
List favorites Gets a list of favorites for person personId.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FavoritesApi
Returns a new instance of FavoritesApi.
19 20 21 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_favorite(person_id, favorite_body_create, opts = {}) ⇒ FavoriteEntry
Create a favorite Favorite a site, file, or folder in the repository. You can use the ‘-me-` string in place of `<personId>` to specify the currently authenticated user. Note: You can favorite more than one entity by specifying a list of objects in the JSON body like this: “`JSON [ { "target": { "file": { "guid": "abcde-01234-.…" } } }, { "target": { "file": { "guid": "abcde-09863-.…" } } }, ] “` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: “`JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } “`
31 32 33 34 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 31 def create_favorite(person_id, favorite_body_create, opts = {}) data, _status_code, _headers = create_favorite_with_http_info(person_id, favorite_body_create, opts) return data end |
#create_favorite_with_http_info(person_id, favorite_body_create, opts = {}) ⇒ Array<(FavoriteEntry, Fixnum, Hash)>
Create a favorite Favorite a site, file, or folder in the repository. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. Note: You can favorite more than one entity by specifying a list of objects in the JSON body like this: ```JSON [ { "target": { "file": { "guid": "abcde-01234-.…" } } }, { "target": { "file": { "guid": "abcde-09863-.…" } } }, ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } ```
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 44 def create_favorite_with_http_info(person_id, favorite_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.create_favorite ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.create_favorite" end # verify the required parameter 'favorite_body_create' is set if @api_client.config.client_side_validation && favorite_body_create.nil? fail ArgumentError, "Missing the required parameter 'favorite_body_create' when calling FavoritesApi.create_favorite" end # resource path local_var_path = "/people/{personId}/favorites".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(favorite_body_create) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FavoriteEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#create_favorite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_site_favorite(person_id, favorite_site_body_create, opts = {}) ⇒ FavoriteSiteEntry
Create a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use ‘/people/personId/favorites` instead. Create a site favorite for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. Note: You can favorite more than one site by specifying a list of sites in the JSON body like this: “`JSON [ { "id": "test-site-1" }, { "id": "test-site-2" } ] “` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: “`JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } “`
97 98 99 100 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 97 def create_site_favorite(person_id, favorite_site_body_create, opts = {}) data, _status_code, _headers = create_site_favorite_with_http_info(person_id, favorite_site_body_create, opts) return data end |
#create_site_favorite_with_http_info(person_id, favorite_site_body_create, opts = {}) ⇒ Array<(FavoriteSiteEntry, Fixnum, Hash)>
Create a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use `/people/personId/favorites` instead. Create a site favorite for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. Note: You can favorite more than one site by specifying a list of sites in the JSON body like this: ```JSON [ { "id": "test-site-1" }, { "id": "test-site-2" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } ```
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 109 def create_site_favorite_with_http_info(person_id, favorite_site_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.create_site_favorite ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.create_site_favorite" end # verify the required parameter 'favorite_site_body_create' is set if @api_client.config.client_side_validation && favorite_site_body_create.nil? fail ArgumentError, "Missing the required parameter 'favorite_site_body_create' when calling FavoritesApi.create_site_favorite" end # resource path local_var_path = "/people/{personId}/favorite-sites".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(favorite_site_body_create) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FavoriteSiteEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#create_site_favorite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_favorite(person_id, favorite_id, opts = {}) ⇒ nil
Delete a favorite Deletes favoriteId as a favorite of person personId. You can use the ‘-me-` string in place of `<personId>` to specify the currently authenticated user.
160 161 162 163 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 160 def delete_favorite(person_id, favorite_id, opts = {}) delete_favorite_with_http_info(person_id, favorite_id, opts) return nil end |
#delete_favorite_with_http_info(person_id, favorite_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a favorite Deletes favoriteId as a favorite of person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 171 def delete_favorite_with_http_info(person_id, favorite_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.delete_favorite ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.delete_favorite" end # verify the required parameter 'favorite_id' is set if @api_client.config.client_side_validation && favorite_id.nil? fail ArgumentError, "Missing the required parameter 'favorite_id' when calling FavoritesApi.delete_favorite" end # resource path local_var_path = "/people/{personId}/favorites/{favoriteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'favoriteId' + '}', favorite_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#delete_favorite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_site_favorite(person_id, site_id, opts = {}) ⇒ nil
Delete a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use ‘/people/personId/favorites/favoriteId` instead. Deletes site siteId from the favorite site list of person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
220 221 222 223 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 220 def delete_site_favorite(person_id, site_id, opts = {}) delete_site_favorite_with_http_info(person_id, site_id, opts) return nil end |
#delete_site_favorite_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use `/people/personId/favorites/favoriteId` instead. Deletes site siteId from the favorite site list of person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 231 def delete_site_favorite_with_http_info(person_id, site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.delete_site_favorite ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.delete_site_favorite" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling FavoritesApi.delete_site_favorite" end # resource path local_var_path = "/people/{personId}/favorite-sites/{siteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'siteId' + '}', site_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#delete_site_favorite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_favorite(person_id, favorite_id, opts = {}) ⇒ FavoriteEntry
Get a favorite Gets favorite favoriteId for person personId. You can use the ‘-me-` string in place of `<personId>` to specify the currently authenticated user.
282 283 284 285 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 282 def get_favorite(person_id, favorite_id, opts = {}) data, _status_code, _headers = get_favorite_with_http_info(person_id, favorite_id, opts) return data end |
#get_favorite_site(person_id, site_id, opts = {}) ⇒ SiteEntry
Get a favorite site Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use ‘/people/personId/favorites/favoriteId` instead. Gets information on favorite site siteId of person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
348 349 350 351 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 348 def get_favorite_site(person_id, site_id, opts = {}) data, _status_code, _headers = get_favorite_site_with_http_info(person_id, site_id, opts) return data end |
#get_favorite_site_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(SiteEntry, Fixnum, Hash)>
Get a favorite site Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use `/people/personId/favorites/favoriteId` instead. Gets information on favorite site siteId of person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 360 def get_favorite_site_with_http_info(person_id, site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.get_favorite_site ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.get_favorite_site" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling FavoritesApi.get_favorite_site" end # resource path local_var_path = "/people/{personId}/favorite-sites/{siteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'siteId' + '}', site_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SiteEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#get_favorite_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_favorite_with_http_info(person_id, favorite_id, opts = {}) ⇒ Array<(FavoriteEntry, Fixnum, Hash)>
Get a favorite Gets favorite favoriteId for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 295 def get_favorite_with_http_info(person_id, favorite_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.get_favorite ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.get_favorite" end # verify the required parameter 'favorite_id' is set if @api_client.config.client_side_validation && favorite_id.nil? fail ArgumentError, "Missing the required parameter 'favorite_id' when calling FavoritesApi.get_favorite" end # resource path local_var_path = "/people/{personId}/favorites/{favoriteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'favoriteId' + '}', favorite_id.to_s) # query parameters query_params = {} query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FavoriteEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#get_favorite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_favorite_sites_for_person(person_id, opts = {}) ⇒ SitePaging
List favorite sites Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use ‘/people/personId/favorites` instead. Gets a list of a person’s favorite sites. You can use the ‘-me-` string in place of `<personId>` to specify the currently authenticated user.
413 414 415 416 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 413 def list_favorite_sites_for_person(person_id, opts = {}) data, _status_code, _headers = list_favorite_sites_for_person_with_http_info(person_id, opts) return data end |
#list_favorite_sites_for_person_with_http_info(person_id, opts = {}) ⇒ Array<(SitePaging, Fixnum, Hash)>
List favorite sites Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use `/people/personId/favorites` instead. Gets a list of a person's favorite sites. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 426 def list_favorite_sites_for_person_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.list_favorite_sites_for_person ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.list_favorite_sites_for_person" end if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling FavoritesApi.list_favorite_sites_for_person, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling FavoritesApi.list_favorite_sites_for_person, must be greater than or equal to 1.' end # resource path local_var_path = "/people/{personId}/favorite-sites".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SitePaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#list_favorite_sites_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_favorites(person_id, opts = {}) ⇒ FavoritePaging
List favorites Gets a list of favorites for person personId. You can use the ‘-me-` string in place of `<personId>` to specify the currently authenticated user. You can use the where parameter to restrict the list in the response to entries of a specific kind. The where parameter takes a value. The value is a single predicate that can include one or more EXISTS conditions. The EXISTS condition uses a single operand to limit the list to include entries that include that one property. The property values are: * `target/file` * `target/folder` * `target/site` For example, the following where parameter restricts the returned list to the file favorites for a person: “`SQL (EXISTS(target/file)) “` You can specify more than one condition using OR. The predicate must be enclosed in parentheses. For example, the following where parameter restricts the returned list to the file and folder favorites for a person: “`SQL (EXISTS(target/file) OR EXISTS(target/folder)) “`
487 488 489 490 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 487 def list_favorites(person_id, opts = {}) data, _status_code, _headers = list_favorites_with_http_info(person_id, opts) return data end |
#list_favorites_with_http_info(person_id, opts = {}) ⇒ Array<(FavoritePaging, Fixnum, Hash)>
List favorites Gets a list of favorites for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. You can use the where parameter to restrict the list in the response to entries of a specific kind. The where parameter takes a value. The value is a single predicate that can include one or more EXISTS conditions. The EXISTS condition uses a single operand to limit the list to include entries that include that one property. The property values are: * `target/file` * `target/folder` * `target/site` For example, the following where parameter restricts the returned list to the file favorites for a person: ```SQL (EXISTS(target/file)) ``` You can specify more than one condition using OR. The predicate must be enclosed in parentheses. For example, the following where parameter restricts the returned list to the file and folder favorites for a person: ```SQL (EXISTS(target/file) OR EXISTS(target/folder)) ```
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/alfresco_api/api/favorites_api.rb', line 502 def list_favorites_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FavoritesApi.list_favorites ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling FavoritesApi.list_favorites" end if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling FavoritesApi.list_favorites, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling FavoritesApi.list_favorites, must be greater than or equal to 1.' end # resource path local_var_path = "/people/{personId}/favorites".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FavoritePaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: FavoritesApi#list_favorites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |