Skip to content
Snippets Groups Projects
Verified Commit e00ce321 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

protocols/is: Implement first parts of IS API

parent 717f13b4
No related branches found
No related tags found
No related merge requests found
Pipeline #2559 failed
module MatrixSdk::Protocols::IS module MatrixSdk::Protocols::IS
raise 'Not implemented yet' def identity_status
request(:get, :identity_api_v1, '/')
end
def identity_get_pubkey(id)
id = CGI.escape id.to_s
request(:get, :identity_api_v1, "/pubkey/#{id}")
end
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
def identity_pubkey_ephemeral_isvalid(key)
identity_pubkey_isvalid(key, ephemeral: true)
end
def identity_lookup(medium:, address:)
request(:get, :identity_api_v1, '/lookup', query: { medium: medium, address: address })
end
def identity_bulk_lookup(threepids)
request(:post, :identity_api_v1, '/bulk_lookup', body: { threepids: threepids })
end
# XXX
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment