Add song & search history (#165)

This commit is contained in:
Zoe Roux
2023-03-01 13:29:33 +09:00
committed by GitHub
parent df85d0cfa7
commit f1a3f6e46a
30 changed files with 553 additions and 126 deletions
+47
View File
@@ -0,0 +1,47 @@
*** Settings ***
Documentation Methods to login/register.
Resource ../rest.resource
*** Keywords ***
Login
[Documentation] Shortcut to login with the given username for future requests
[Arguments] ${username}
&{res}= POST /auth/login {"username": "${username}", "password": "password-${username}"}
Output
Integer response status 200
String response body access_token
Set Headers {"Authorization": "Bearer ${res.body.access_token}"}
Register
[Documentation] Shortcut to register with the given username for future requests
[Arguments] ${username}
&{res}= POST
... /auth/register
... {"username": "${username}", "password": "password-${username}", "email": "${username}@chromacase.moe"}
Output
Integer response status 201
RegisterLogin
[Documentation] Shortcut to register with the given username for future requests
[Arguments] ${username}
POST
... /auth/register
... {"username": "${username}", "password": "password-${username}", "email": "${username}@chromacase.moe"}
Output
Integer response status 201
&{res}= POST /auth/login {"username": "${username}", "password": "password-${username}"}
Output
Integer response status 200
String response body access_token
Set Headers {"Authorization": "Bearer ${res.body.access_token}"}
&{me}= GET /auth/me
Output
Integer response status 200
RETURN ${me.body.id}
Logout
[Documentation] Logout the current user, only the local client is affected.
Set Headers {"Authorization": ""}