Class: Basecamp::Services::SearchService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::SearchService
- Defined in:
- lib/basecamp/generated/services/search_service.rb
Overview
Service for Search operations
Instance Method Summary collapse
-
#metadata ⇒ Hash
Get search metadata (available filter options).
-
#search(q:, type_names: nil, bucket_ids: nil, creator_ids: nil, file_type: nil, exclude_chat: nil, since: nil, sort: nil, type: nil, bucket_id: nil, creator_id: nil) ⇒ Enumerator<Hash>
Search for content across the account.
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#metadata ⇒ Hash
Get search metadata (available filter options)
34 35 36 37 38 |
# File 'lib/basecamp/generated/services/search_service.rb', line 34 def () with_operation(service: "search", operation: "metadata", is_mutation: false) do http_get("/searches/metadata.json").json end end |
#search(q:, type_names: nil, bucket_ids: nil, creator_ids: nil, file_type: nil, exclude_chat: nil, since: nil, sort: nil, type: nil, bucket_id: nil, creator_id: nil) ⇒ Enumerator<Hash>
Search for content across the account
25 26 27 28 29 30 |
# File 'lib/basecamp/generated/services/search_service.rb', line 25 def search(q:, type_names: nil, bucket_ids: nil, creator_ids: nil, file_type: nil, exclude_chat: nil, since: nil, sort: nil, type: nil, bucket_id: nil, creator_id: nil) wrap_paginated(service: "search", operation: "search", is_mutation: false) do params = compact_query_params(q: q, type_names: type_names, bucket_ids: bucket_ids, creator_ids: creator_ids, file_type: file_type, exclude_chat: exclude_chat, since: since, sort: sort, type: type, bucket_id: bucket_id, creator_id: creator_id) paginate("/search.json", params: params) end end |