Module: X::Objects::Lookups::Spaces
- Included in:
- API
- Defined in:
- x-objects/lib/x/objects/lookups/spaces.rb
Overview
Look up and search spaces, mixed into a client through API
Internal to x-objects: X::Objects::API includes it, and its methods are public API of the client that includes API, but the module is only how they are grouped, and some of them need the methods of another, so include API rather than this module alone.
Instance Method Summary collapse
-
#find_all_spaces(ids, concurrency: BatchFinders::DEFAULT_CONCURRENCY, **params) {|problem| ... } ⇒ Array<Space>
Look up many spaces by identifier, in parallel batches.
-
#find_all_spaces_by_creator(users, concurrency: BatchFinders::DEFAULT_CONCURRENCY, **params) {|problem| ... } ⇒ Array<Space>
Look up the live and scheduled spaces many users created, in parallel batches.
-
#find_space(id, **params) {|problem| ... } ⇒ Space?
Look up a space by identifier.
-
#find_space!(id, **params) ⇒ Space
Look up a space by identifier, which must exist.
-
#search_spaces(query, **params) ⇒ Cursor
Search spaces by their titles.
Instance Method Details
#find_all_spaces(ids, concurrency: BatchFinders::DEFAULT_CONCURRENCY, **params) {|problem| ... } ⇒ Array<Space>
Look up many spaces by identifier, in parallel batches
53 54 55 |
# File 'x-objects/lib/x/objects/lookups/spaces.rb', line 53 def find_all_spaces(ids, concurrency: BatchFinders::DEFAULT_CONCURRENCY, **params, &) Space.find_all(ids, client: self, concurrency:, **params, &) end |
#find_all_spaces_by_creator(users, concurrency: BatchFinders::DEFAULT_CONCURRENCY, **params) {|problem| ... } ⇒ Array<Space>
Look up the live and scheduled spaces many users created, in parallel batches
69 70 71 |
# File 'x-objects/lib/x/objects/lookups/spaces.rb', line 69 def find_all_spaces_by_creator(users, concurrency: BatchFinders::DEFAULT_CONCURRENCY, **params, &) Space.find_all_by_creator(users, client: self, concurrency:, **params, &) end |
#find_space(id, **params) {|problem| ... } ⇒ Space?
Look up a space by identifier
25 26 27 |
# File 'x-objects/lib/x/objects/lookups/spaces.rb', line 25 def find_space(id, **params, &) Space.find(id, client: self, **params, &) end |