Class: AlfrescoAPI::QueriesApi
- Inherits:
-
Object
- Object
- AlfrescoAPI::QueriesApi
- Defined in:
- lib/alfresco_api/api/queries_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#find_nodes(term, opts = {}) ⇒ NodePaging
Find nodes Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#find_nodes_with_http_info(term, opts = {}) ⇒ Array<(NodePaging, Fixnum, Hash)>
Find nodes Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#find_people(term, opts = {}) ⇒ PersonPaging
Find people Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#find_people_with_http_info(term, opts = {}) ⇒ Array<(PersonPaging, Fixnum, Hash)>
Find people Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#find_sites(term, opts = {}) ⇒ SitePaging
Find sites Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#find_sites_with_http_info(term, opts = {}) ⇒ Array<(SitePaging, Fixnum, Hash)>
Find sites Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#initialize(api_client = ApiClient.default) ⇒ QueriesApi
constructor
A new instance of QueriesApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ QueriesApi
Returns a new instance of QueriesApi.
19 20 21 |
# File 'lib/alfresco_api/api/queries_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/queries_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#find_nodes(term, opts = {}) ⇒ NodePaging
Find nodes Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of nodes that match the given search criteria. The search term is used to look for nodes that match against name, title, description, full text content or tags. The search term: - must contain a minimum of 3 alphanumeric characters - allows "quoted term" - can optionally use ‘*’ for wildcard matching By default, file and folder types will be searched unless a specific type is provided as a query parameter. By default, the search will be across the repository unless a specific root node id is provided to start the search from. You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * name * modifiedAt * createdAt
35 36 37 38 |
# File 'lib/alfresco_api/api/queries_api.rb', line 35 def find_nodes(term, opts = {}) data, _status_code, _headers = find_nodes_with_http_info(term, opts) return data end |
#find_nodes_with_http_info(term, opts = {}) ⇒ Array<(NodePaging, Fixnum, Hash)>
Find nodes Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of nodes that match the given search criteria. The search term is used to look for nodes that match against name, title, description, full text content or tags. The search term: - must contain a minimum of 3 alphanumeric characters - allows "quoted term" - can optionally use '*' for wildcard matching By default, file and folder types will be searched unless a specific type is provided as a query parameter. By default, the search will be across the repository unless a specific root node id is provided to start the search from. You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * name * modifiedAt * createdAt
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 100 101 102 103 104 105 106 |
# File 'lib/alfresco_api/api/queries_api.rb', line 52 def find_nodes_with_http_info(term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QueriesApi.find_nodes ..." end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling QueriesApi.find_nodes" 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 QueriesApi.find_nodes, 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 QueriesApi.find_nodes, must be greater than or equal to 1.' end # resource path local_var_path = "/queries/nodes" # query parameters query_params = {} query_params[:'term'] = term query_params[:'rootNodeId'] = opts[:'root_node_id'] if !opts[:'root_node_id'].nil? query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'nodeType'] = opts[:'node_type'] if !opts[:'node_type'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].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 => 'NodePaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: QueriesApi#find_nodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#find_people(term, opts = {}) ⇒ PersonPaging
Find people Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of people that match the given search criteria. The search term is used to look for matches against person id, firstname and lastname. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use ‘*’ for wildcard matching within the term You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * firstName * lastName
117 118 119 120 |
# File 'lib/alfresco_api/api/queries_api.rb', line 117 def find_people(term, opts = {}) data, _status_code, _headers = find_people_with_http_info(term, opts) return data end |
#find_people_with_http_info(term, opts = {}) ⇒ Array<(PersonPaging, Fixnum, Hash)>
Find people Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of people that match the given search criteria. The search term is used to look for matches against person id, firstname and lastname. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * firstName * lastName
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/alfresco_api/api/queries_api.rb', line 131 def find_people_with_http_info(term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QueriesApi.find_people ..." end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling QueriesApi.find_people" 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 QueriesApi.find_people, 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 QueriesApi.find_people, must be greater than or equal to 1.' end # resource path local_var_path = "/queries/people" # query parameters query_params = {} query_params[:'term'] = term 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? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].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 => 'PersonPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: QueriesApi#find_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#find_sites(term, opts = {}) ⇒ SitePaging
Find sites Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of sites that match the given search criteria. The search term is used to look for sites that match against site id, title or description. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use ‘*’ for wildcard matching within the term The default sort order for the returned list is for sites to be sorted by ascending id. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * title * description
193 194 195 196 |
# File 'lib/alfresco_api/api/queries_api.rb', line 193 def find_sites(term, opts = {}) data, _status_code, _headers = find_sites_with_http_info(term, opts) return data end |
#find_sites_with_http_info(term, opts = {}) ⇒ Array<(SitePaging, Fixnum, Hash)>
Find sites Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of sites that match the given search criteria. The search term is used to look for sites that match against site id, title or description. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term The default sort order for the returned list is for sites to be sorted by ascending id. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * title * description
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 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 |
# File 'lib/alfresco_api/api/queries_api.rb', line 207 def find_sites_with_http_info(term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QueriesApi.find_sites ..." end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling QueriesApi.find_sites" 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 QueriesApi.find_sites, 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 QueriesApi.find_sites, must be greater than or equal to 1.' end # resource path local_var_path = "/queries/sites" # query parameters query_params = {} query_params[:'term'] = term query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].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: QueriesApi#find_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |