Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix Ruby SDK
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Olofsson
Matrix Ruby SDK
Commits
e00ce321
Verified
Commit
e00ce321
authored
6 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
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
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/matrix_sdk/protocols/is.rb
+31
-1
31 additions, 1 deletion
lib/matrix_sdk/protocols/is.rb
with
31 additions
and
1 deletion
lib/matrix_sdk/protocols/is.rb
+
31
−
1
View file @
e00ce321
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment