Class: MemoriClient::Engine::V2::Search
- Defined in:
- lib/memori_client/engine/v2/search.rb
Overview
Generated on 2025-01-27 16:56:16 +0000
Class Method Summary collapse
-
.get_memory_hints(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Hints/strSessionID`.
-
.get_random_memories(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Random/strSessionID`.
-
.list_memory_tags(strSessionID:) ⇒ Object
‘GET /memori/v2/MemoryTags/strSessionID`.
-
.search_memories(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Search/strSessionID`.
-
.search_memories_paginated(strSessionID:, from:, howMany:, payload: {}) ⇒ Object
‘POST /memori/v2/Search/strSessionID/from/howMany`.
Methods inherited from Resource
Methods inherited from Resource
build_arguments, build_url, exec_http_request, validate_payload!
Class Method Details
.get_memory_hints(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Hints/strSessionID`
Picks up to 20 Memory Hint objects.
‘get_memory_hints(strSessionID:, payload: {})`
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/memori_client/engine/v2/search.rb', line 275 def self.get_memory_hints(strSessionID:, payload: {}) args = build_arguments(binding) payload_keys = [ 'contextVars', 'contextVarsToSet', 'date', 'dateUncertaintyDays', 'excludedMemoryIDs', 'ignoreLastRead', 'memoryTags', 'memoryType', 'numberOfResults', 'placeLatitude', 'placeLongitude', 'placeName', 'placeUncertaintyKm', 'searchType', 'startFrom', 'tag', 'text', 'withMediaOnly', ] payload_required_keys = %w[] validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys) exec_http_request('post', '/memori/v2/Hints/{strSessionID}', **args) end |
.get_random_memories(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Random/strSessionID`
Picks up to 5 random Memory objects.
‘get_random_memories(strSessionID:, payload: {})`
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/memori_client/engine/v2/search.rb', line 201 def self.get_random_memories(strSessionID:, payload: {}) args = build_arguments(binding) payload_keys = [ 'contextVars', 'contextVarsToSet', 'date', 'dateUncertaintyDays', 'excludedMemoryIDs', 'ignoreLastRead', 'memoryTags', 'memoryType', 'numberOfResults', 'placeLatitude', 'placeLongitude', 'placeName', 'placeUncertaintyKm', 'searchType', 'startFrom', 'tag', 'text', 'withMediaOnly', ] payload_required_keys = %w[] validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys) exec_http_request('post', '/memori/v2/Random/{strSessionID}', **args) end |
.list_memory_tags(strSessionID:) ⇒ Object
‘GET /memori/v2/MemoryTags/strSessionID`
Gets a list of all available memory tags.
‘list_memory_tags(strSessionID:)`
311 312 313 314 315 |
# File 'lib/memori_client/engine/v2/search.rb', line 311 def self.(strSessionID:) args = build_arguments(binding) exec_http_request('get', '/memori/v2/MemoryTags/{strSessionID}', **args) end |
.search_memories(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Search/strSessionID`
Searches for matching Memory objects.
‘search_memories(strSessionID:, payload: {})`
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 |
# File 'lib/memori_client/engine/v2/search.rb', line 49 def self.search_memories(strSessionID:, payload: {}) args = build_arguments(binding) payload_keys = [ 'contextVars', 'contextVarsToSet', 'date', 'dateUncertaintyDays', 'excludedMemoryIDs', 'ignoreLastRead', 'memoryTags', 'memoryType', 'numberOfResults', 'placeLatitude', 'placeLongitude', 'placeName', 'placeUncertaintyKm', 'searchType', 'startFrom', 'tag', 'text', 'withMediaOnly', ] payload_required_keys = %w[] validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys) exec_http_request('post', '/memori/v2/Search/{strSessionID}', **args) end |
.search_memories_paginated(strSessionID:, from:, howMany:, payload: {}) ⇒ Object
‘POST /memori/v2/Search/strSessionID/from/howMany`
Searches for matching Memory objects, with pagination.
‘search_memories_paginated(strSessionID:, from:, howMany:, payload: {})`
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/memori_client/engine/v2/search.rb', line 127 def self.search_memories_paginated(strSessionID:, from:, howMany:, payload: {}) args = build_arguments(binding) payload_keys = [ 'contextVars', 'contextVarsToSet', 'date', 'dateUncertaintyDays', 'excludedMemoryIDs', 'ignoreLastRead', 'memoryTags', 'memoryType', 'numberOfResults', 'placeLatitude', 'placeLongitude', 'placeName', 'placeUncertaintyKm', 'searchType', 'startFrom', 'tag', 'text', 'withMediaOnly', ] payload_required_keys = %w[] validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys) exec_http_request('post', '/memori/v2/Search/{strSessionID}/{from}/{howMany}', **args) end |