Module: MatrixSdk::Protocols::IS
- Included in:
- Api
- 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
28 29 30 |
# File 'lib/matrix_sdk/protocols/is.rb', line 28 def identity_bulk_lookup(threepids) request(:post, :identity_api_v1, '/bulk_lookup', body: { threepids: threepids }) end |
#identity_get_pubkey(id) ⇒ Object
6 7 8 9 10 |
# File 'lib/matrix_sdk/protocols/is.rb', line 6 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
24 25 26 |
# File 'lib/matrix_sdk/protocols/is.rb', line 24 def identity_lookup(medium:, address:) request(:get, :identity_api_v1, '/lookup', query: { medium: medium, address: address }) end |
#identity_pubkey_ephemeral_isvalid(key) ⇒ Object
20 21 22 |
# File 'lib/matrix_sdk/protocols/is.rb', line 20 def identity_pubkey_ephemeral_isvalid(key) identity_pubkey_isvalid(key, ephemeral: true) end |
#identity_pubkey_isvalid(key, ephemeral: false) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/matrix_sdk/protocols/is.rb', line 12 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
2 3 4 |
# File 'lib/matrix_sdk/protocols/is.rb', line 2 def identity_status request(:get, :identity_api_v1, '/') end |