Class: GetStream::Generated::Models::SearchAllRequest
- Defined in:
- lib/getstream_ruby/generated/models/search_all_request.rb
Instance Attribute Summary collapse
-
#entities ⇒ Array<String>
Which sections to search: any subset of messages, users and channels.
-
#limit ⇒ Integer
Number of results per section, 1-30.
-
#next ⇒ Hash<String, String>
Opaque pagination cursors from a previous response, keyed by entity.
-
#query ⇒ String
Free-text search phrase, 1-80 characters after trimming whitespace.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SearchAllRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ SearchAllRequest
Initialize with attributes
26 27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/search_all_request.rb', line 26 def initialize(attributes = {}) super(attributes) @limit = attributes.fetch(:limit) { attributes.fetch('limit', nil) } @query = attributes.fetch(:query) { attributes.fetch('query', nil) } @entities = attributes.fetch(:entities) { attributes.fetch('entities', nil) } @next = attributes.fetch(:next) { attributes.fetch('next', nil) } end |
Instance Attribute Details
#entities ⇒ Array<String>
Returns Which sections to search: any subset of messages, users and channels. Defaults to all three when omitted; must not be empty when provided. Response sections always appear in the order messages, users, channels.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/search_all_request.rb', line 20 def entities @entities end |
#limit ⇒ Integer
Returns Number of results per section, 1-30. Defaults to 10. Applies to every requested section; there is no per-section limit.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/search_all_request.rb', line 14 def limit @limit end |
#next ⇒ Hash<String, String>
Returns Opaque pagination cursors from a previous response, keyed by entity. A cursor that fails to decode restarts that section from page 1 with a cursor_rejected warning; the request fails with 400 only when every cursor supplied for a requested entity is invalid. Cursors for entities not in entities are ignored.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/search_all_request.rb', line 23 def next @next end |
#query ⇒ String
Returns Free-text search phrase, 1-80 characters after trimming whitespace. Required. Matched as a prefix of a user's name or username and of a channel's name, and as full-text against message text.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/search_all_request.rb', line 17 def query @query end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
35 36 37 38 39 40 41 42 |
# File 'lib/getstream_ruby/generated/models/search_all_request.rb', line 35 def self.json_field_mappings { limit: 'limit', query: 'query', entities: 'entities', next: 'next' } end |