Class: AlfrescoAPI::ActivitiesApi
- Inherits:
-
Object
- Object
- AlfrescoAPI::ActivitiesApi
- Defined in:
- lib/alfresco_api/api/activities_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ActivitiesApi
constructor
A new instance of ActivitiesApi.
-
#list_activities_for_person(person_id, opts = {}) ⇒ ActivityPaging
List activities Gets a list of activities for person personId.
-
#list_activities_for_person_with_http_info(person_id, opts = {}) ⇒ Array<(ActivityPaging, Fixnum, Hash)>
List activities Gets a list of activities for person personId.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ActivitiesApi
Returns a new instance of ActivitiesApi.
19 20 21 |
# File 'lib/alfresco_api/api/activities_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/activities_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#list_activities_for_person(person_id, opts = {}) ⇒ ActivityPaging
List activities Gets a list of activities for person personId. You can use the ‘-me-` string in place of `<personId>` to specify the currently authenticated user.
33 34 35 36 |
# File 'lib/alfresco_api/api/activities_api.rb', line 33 def list_activities_for_person(person_id, opts = {}) data, _status_code, _headers = list_activities_for_person_with_http_info(person_id, opts) return data end |
#list_activities_for_person_with_http_info(person_id, opts = {}) ⇒ Array<(ActivityPaging, Fixnum, Hash)>
List activities Gets a list of activities for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
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 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/alfresco_api/api/activities_api.rb', line 48 def list_activities_for_person_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ActivitiesApi.list_activities_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 ActivitiesApi.list_activities_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 ActivitiesApi.list_activities_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 ActivitiesApi.list_activities_for_person, must be greater than or equal to 1.' end # resource path local_var_path = "/people/{personId}/activities".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[:'who'] = opts[:'who'] if !opts[:'who'].nil? query_params[:'siteId'] = opts[:'site_id'] if !opts[:'site_id'].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 => 'ActivityPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: ActivitiesApi#list_activities_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |