Nanocats have used both get and post requests as needed. Api’s and their use are located:
get
Takes a list of tags and returns infromation about the maches made by name or artist
Example request
{
"sessionID":str,
"tags":["tag1","tag2"]
}
Example return
{
{
"title":str,
"artist":str,
}
}
post
Takes a username, password, and email.
Example request
{
"username":str,
"password":str,
"email":str
}
Example return
If valid
"str"
If invalid
"Invalid account details"
post
Example request
{
"sessionID":"str",
"title":"str",
"artist":"str",
"lyrics":"str"
}
Example return
If successful
"Succsesfuly wrote"
Or
"Succsesfuly wrote"
post
Example request
{
"username":"str",
"password":"str",
"email":"str"
}
Example return
If successful
"User Created"
Or
"User exits"
Code: 500 Data: “Cannot write to db” This is a general error denoting when the Python cannot connect to the java database
Code: 200 Data: “Invalid Session” This is used when the UUID has expired or is invalid