Module: MatrixSdk::Protocols::IS
- Defined in:
- lib/matrix_sdk/protocols/is.rb
Instance Method Summary collapse
- #identity_bulk_lookup(threepids) ⇒ Object
- #identity_get_pubkey(id) ⇒ Object
- #identity_lookup(medium:, address:) ⇒ Object
- #identity_pubkey_ephemeral_isvalid(key) ⇒ Object
- #identity_pubkey_isvalid(key, ephemeral: false) ⇒ Object
- #identity_status ⇒ Object
Instance Method Details
#identity_bulk_lookup(threepids) ⇒ Object
30 31 32 |
# File 'lib/matrix_sdk/protocols/is.rb', line 30 def identity_bulk_lookup(threepids) request(:post, :identity_api_v1, '/bulk_lookup', body: { threepids: threepids }) end |
#identity_get_pubkey(id) ⇒ Object
8 9 10 11 12 |
# File 'lib/matrix_sdk/protocols/is.rb', line 8 def identity_get_pubkey(id) id = ERB::Util.url_encode id.to_s request(:get, :identity_api_v1, "/pubkey/#{id}") end |
#identity_lookup(medium:, address:) ⇒ Object
26 27 28 |
# File 'lib/matrix_sdk/protocols/is.rb', line 26 def identity_lookup(medium:, address:) request(:get, :identity_api_v1, '/lookup', query: { medium: medium, address: address }) end |
#identity_pubkey_ephemeral_isvalid(key) ⇒ Object
22 23 24 |
# File 'lib/matrix_sdk/protocols/is.rb', line 22 def identity_pubkey_ephemeral_isvalid(key) identity_pubkey_isvalid(key, ephemeral: true) end |
#identity_pubkey_isvalid(key, ephemeral: false) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/matrix_sdk/protocols/is.rb', line 14 def identity_pubkey_isvalid(key, ephemeral: false) if ephemeral request(:get, :identity_api_v1, '/pubkey/ephemeral/isvalid', query: { public_key: key }) else request(:get, :identity_api_v1, '/pubkey/isvalid', query: { public_key: key }) end end |
#identity_status ⇒ Object
4 5 6 |
# File 'lib/matrix_sdk/protocols/is.rb', line 4 def identity_status request(:get, :identity_api_v1, '/') end |