Class: MemoriClient::Engine::V2::Memory
- Defined in:
- lib/memori_client/engine/v2/memory.rb
Overview
Generated on 2025-01-27 16:56:16 +0000
Class Method Summary collapse
-
.add_memory(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Memory/strSessionID`.
-
.check_memory_access(strSessionID:, strMemoryID:) ⇒ Object
‘GET /memori/v2/MemoryAccess/strSessionID/strMemoryID`.
-
.filter_memories(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/FilterMemories/strSessionID`.
-
.filter_memories_paginated(strSessionID:, from:, howMany:, payload: {}) ⇒ Object
‘POST /memori/v2/FilterMemories/strSessionID/from/howMany`.
-
.get_memory(strSessionID:, strMemoryID:) ⇒ Object
‘GET /memori/v2/Memory/strSessionID/strMemoryID`.
-
.list_memories(strSessionID:, type: nil) ⇒ Object
‘GET /memori/v2/Memories/strSessionID/type`.
-
.list_memories_paginated(strSessionID:, from:, howMany:, type: nil) ⇒ Object
‘GET /memori/v2/Memories/strSessionID/from/howMany/type`.
-
.remove_memory(strSessionID:, strMemoryID:) ⇒ Object
‘DELETE /memori/v2/Memory/strSessionID/strMemoryID`.
-
.update_memory(strSessionID:, strMemoryID:, payload: {}) ⇒ Object
‘PATCH /memori/v2/Memory/strSessionID/strMemoryID`.
Methods inherited from Resource
Methods inherited from Resource
build_arguments, build_url, exec_http_request, validate_payload!
Class Method Details
.add_memory(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/Memory/strSessionID`
Adds a new Memory object.
‘add_memory(strSessionID:, payload: {})`
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/memori_client/engine/v2/memory.rb', line 418 def self.add_memory(strSessionID:, payload: {}) args = build_arguments(binding) payload_keys = [ 'answers', 'conclusive', 'contextVarsToMatch', 'contextVarsToSet', 'creationSessionID', 'creationTimestamp', 'date', 'dateUncertaintyDays', 'dcmOutcomeCode', 'dcmOutcomeType', 'help', 'hints', 'lastChangeSessionID', 'lastChangeTimestamp', 'lastRead', 'maxTimeout', 'media', 'memoryID', 'memoryType', 'minTimeout', 'notPickable', 'placeLatitude', 'placeLongitude', 'placeName', 'placeUncertaintyKm', 'readOccurrences', 'receiverID', 'receiverName', 'receiverTag', 'tags', 'title', 'titleVariants', ] payload_required_keys = %w[] validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys) exec_http_request('post', '/memori/v2/Memory/{strSessionID}', **args) end |
.check_memory_access(strSessionID:, strMemoryID:) ⇒ Object
‘GET /memori/v2/MemoryAccess/strSessionID/strMemoryID`
Checks if a Memory object is accessible from the specified session.
‘check_memory_access(strSessionID:, strMemoryID:)`
470 471 472 473 474 |
# File 'lib/memori_client/engine/v2/memory.rb', line 470 def self.check_memory_access(strSessionID:, strMemoryID:) args = build_arguments(binding) exec_http_request('get', '/memori/v2/MemoryAccess/{strSessionID}/{strMemoryID}', **args) end |
.filter_memories(strSessionID:, payload: {}) ⇒ Object
‘POST /memori/v2/FilterMemories/strSessionID`
Filters Memory objects.
‘filter_memories(strSessionID:, payload: {})`
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/memori_client/engine/v2/memory.rb', line 238 def self.filter_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/FilterMemories/{strSessionID}', **args) end |
.filter_memories_paginated(strSessionID:, from:, howMany:, payload: {}) ⇒ Object
‘POST /memori/v2/FilterMemories/strSessionID/from/howMany`
Filters Memory objects, with pagination.
‘filter_memories_paginated(strSessionID:, from:, howMany:, payload: {})`
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/memori_client/engine/v2/memory.rb', line 316 def self.filter_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/FilterMemories/{strSessionID}/{from}/{howMany}', **args) end |
.get_memory(strSessionID:, strMemoryID:) ⇒ Object
‘GET /memori/v2/Memory/strSessionID/strMemoryID`
Gets the details of a Memory object.
‘get_memory(strSessionID:, strMemoryID:)`
49 50 51 52 53 |
# File 'lib/memori_client/engine/v2/memory.rb', line 49 def self.get_memory(strSessionID:, strMemoryID:) args = build_arguments(binding) exec_http_request('get', '/memori/v2/Memory/{strSessionID}/{strMemoryID}', **args) end |
.list_memories(strSessionID:, type: nil) ⇒ Object
‘GET /memori/v2/Memories/strSessionID/type`
Lists all Memory objects.
‘list_memories(strSessionID:, type: nil)`
13 14 15 16 17 |
# File 'lib/memori_client/engine/v2/memory.rb', line 13 def self.list_memories(strSessionID:, type: nil) args = build_arguments(binding) exec_http_request('get', '/memori/v2/Memories/{strSessionID}/{type}', **args) end |
.list_memories_paginated(strSessionID:, from:, howMany:, type: nil) ⇒ Object
‘GET /memori/v2/Memories/strSessionID/from/howMany/type`
Lists Memory objects with pagination.
‘list_memories_paginated(strSessionID:, from:, howMany:, type: nil)`
33 34 35 36 37 |
# File 'lib/memori_client/engine/v2/memory.rb', line 33 def self.list_memories_paginated(strSessionID:, from:, howMany:, type: nil) args = build_arguments(binding) exec_http_request('get', '/memori/v2/Memories/{strSessionID}/{from}/{howMany}/{type}', **args) end |
.remove_memory(strSessionID:, strMemoryID:) ⇒ Object
‘DELETE /memori/v2/Memory/strSessionID/strMemoryID`
Removes an existing Memory object.
‘remove_memory(strSessionID:, strMemoryID:)`
186 187 188 189 190 |
# File 'lib/memori_client/engine/v2/memory.rb', line 186 def self.remove_memory(strSessionID:, strMemoryID:) args = build_arguments(binding) exec_http_request('delete', '/memori/v2/Memory/{strSessionID}/{strMemoryID}', **args) end |
.update_memory(strSessionID:, strMemoryID:, payload: {}) ⇒ Object
‘PATCH /memori/v2/Memory/strSessionID/strMemoryID`
Updates an existing Memory object.
‘update_memory(strSessionID:, strMemoryID:, payload: {})`
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 |
# File 'lib/memori_client/engine/v2/memory.rb', line 133 def self.update_memory(strSessionID:, strMemoryID:, payload: {}) args = build_arguments(binding) payload_keys = [ 'answers', 'conclusive', 'contextVarsToMatch', 'contextVarsToSet', 'creationSessionID', 'creationTimestamp', 'date', 'dateUncertaintyDays', 'dcmOutcomeCode', 'dcmOutcomeType', 'help', 'hints', 'lastChangeSessionID', 'lastChangeTimestamp', 'lastRead', 'markAsRead', 'maxTimeout', 'media', 'memoryID', 'memoryType', 'minTimeout', 'notPickable', 'placeLatitude', 'placeLongitude', 'placeName', 'placeUncertaintyKm', 'readOccurrences', 'receiverID', 'receiverName', 'receiverTag', 'tags', 'title', 'titleVariants', ] payload_required_keys = %w[] validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys) exec_http_request('patch', '/memori/v2/Memory/{strSessionID}/{strMemoryID}', **args) end |