class AlfrescoAPI::FavoritesApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/alfresco_api/api/favorites_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create_favorite(person_id, favorite_body_create, opts = {}) click to toggle source

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": { … } } ] } } “` @param person_id The identifier of a person. @param favorite_body_create An object identifying the entity to be favorited. The object consists of a single property which is an object with the name &#x60;site&#x60;, &#x60;file&#x60;, or &#x60;folder&#x60;. The content of that object is the &#x60;guid&#x60; of the target entity. For example, to favorite a file the following body would be used: &#x60;&#x60;&#x60;JSON { "target&quot;: { "file&quot;: { "guid&quot;: "abcde-01234-.…&quot; } } } &#x60;&#x60;&#x60; @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders)

@option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [FavoriteEntry]

# 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 = {}) click to toggle source

Create a favorite Favorite a site, file, or folder in the repository. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; 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: &#x60;&#x60;&#x60;JSON [ { "target&quot;: { "file&quot;: { "guid&quot;: "abcde-01234-.…&quot; } } }, { "target&quot;: { "file&quot;: { "guid&quot;: "abcde-09863-.…&quot; } } }, ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { "list&quot;: { "pagination&quot;: { "count&quot;: 2, "hasMoreItems&quot;: false, "totalItems&quot;: 2, "skipCount&quot;: 0, "maxItems&quot;: 100 }, "entries&quot;: [ { "entry&quot;: { … } }, { "entry&quot;: { … } } ] } } &#x60;&#x60;&#x60; @param person_id The identifier of a person. @param favorite_body_create An object identifying the entity to be favorited. The object consists of a single property which is an object with the name &#x60;site&#x60;, &#x60;file&#x60;, or &#x60;folder&#x60;. The content of that object is the &#x60;guid&#x60; of the target entity. For example, to favorite a file the following body would be used: &#x60;&#x60;&#x60;JSON { "target&quot;: { "file&quot;: { "guid&quot;: "abcde-01234-.…&quot; } } } &#x60;&#x60;&#x60; @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders)

@option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(FavoriteEntry, Fixnum, Hash)>] FavoriteEntry data, response status code and response headers

# 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 = {}) click to toggle source

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": { … } } ] } } “` @param person_id The identifier of a person. @param favorite_site_body_create The id of the site to favorite. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [FavoriteSiteEntry]

# 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 = {}) click to toggle source

Create a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use &#x60;/people/{personId}/favorites&#x60; instead. Create a site favorite for person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; 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: &#x60;&#x60;&#x60;JSON [ { "id&quot;: "test-site-1&quot; }, { "id&quot;: "test-site-2&quot; } ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { "list&quot;: { "pagination&quot;: { "count&quot;: 2, "hasMoreItems&quot;: false, "totalItems&quot;: 2, "skipCount&quot;: 0, "maxItems&quot;: 100 }, "entries&quot;: [ { "entry&quot;: { … } }, { "entry&quot;: { … } } ] } } &#x60;&#x60;&#x60; @param person_id The identifier of a person. @param favorite_site_body_create The id of the site to favorite. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(FavoriteSiteEntry, Fixnum, Hash)>] FavoriteSiteEntry data, response status code and response headers

# 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 = {}) click to toggle source

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. @param person_id The identifier of a person. @param favorite_id The identifier of a favorite. @param [Hash] opts the optional parameters @return [nil]

# 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 = {}) click to toggle source

Delete a favorite Deletes favoriteId as a favorite of person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user. @param person_id The identifier of a person. @param favorite_id The identifier of a favorite. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# 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 = {}) click to toggle source

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. @param person_id The identifier of a person. @param site_id The identifier of a site. @param [Hash] opts the optional parameters @return [nil]

# 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 = {}) click to toggle source

Delete a site favorite Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use &#x60;/people/{personId}/favorites/{favoriteId}&#x60; instead. Deletes site siteId from the favorite site list of person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user. @param person_id The identifier of a person. @param site_id The identifier of a site. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# 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 = {}) click to toggle source

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. @param person_id The identifier of a person. @param favorite_id The identifier of a favorite. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders)

@option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [FavoriteEntry]

# 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 = {}) click to toggle source

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. @param person_id The identifier of a person. @param site_id The identifier of a site. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [SiteEntry]

# 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 = {}) click to toggle source

Get a favorite site Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use &#x60;/people/{personId}/favorites/{favoriteId}&#x60; instead. Gets information on favorite site siteId of person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user. @param person_id The identifier of a person. @param site_id The identifier of a site. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(SiteEntry, Fixnum, Hash)>] SiteEntry data, response status code and response headers

# 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 = {}) click to toggle source

Get a favorite Gets favorite favoriteId for person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user. @param person_id The identifier of a person. @param favorite_id The identifier of a favorite. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders)

@option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(FavoriteEntry, Fixnum, Hash)>] FavoriteEntry data, response status code and response headers

# 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 = {}) click to toggle source

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. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [SitePaging]

# 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 = {}) click to toggle source

List favorite sites Note: this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use &#x60;/people/{personId}/favorites&#x60; instead. Gets a list of a person&#39;s favorite sites. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(SitePaging, Fixnum, Hash)>] SitePaging data, response status code and response headers

# 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 = {}) click to toggle source

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)) “` @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders)

@option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [FavoritePaging]

# 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 = {}) click to toggle source

List favorites Gets a list of favorites for person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; 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: * &#x60;target/file&#x60; * &#x60;target/folder&#x60; * &#x60;target/site&#x60; For example, the following where parameter restricts the returned list to the file favorites for a person: &#x60;&#x60;&#x60;SQL (EXISTS(target/file)) &#x60;&#x60;&#x60; 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: &#x60;&#x60;&#x60;SQL (EXISTS(target/file) OR EXISTS(target/folder)) &#x60;&#x60;&#x60; @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders)

@option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(FavoritePaging, Fixnum, Hash)>] FavoritePaging data, response status code and response headers

# 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