An API for a messaging app
To learn golang
go get github.com/eliird/chirpy
Provides the following endpoints
checks if the server is online
Returns the html page indicating the amount of hits on a page
reset the hit counter to the website
Revokes the access token with login information
Header
{
}
Body
{
}
Refreshes the access token so user can stay logged in for longer period
Header
{
}
Body
{
}
Can be used to login to store and access messages accepts information in format
>Header
{
}
>Body
{
"password": "something"
"email":"[email protected]"
}
Can be used to create a user in the database
>Header
{
}
>Body
{
"password": "something"
"email":"[email protected]"
}
Can be used to update the information of the user in the database
Header
{
}
Body
{
}
Add the message to the chirp
Header
{
}
Body
{
}
Get all the chirps. Has 2 query parameters
author_id
andsort
. specifyingauthor_id
gets messages from the specific usersort
can be specified asasc
ordesc
to sort the default isasc
Header
{
}
Body
{
}
Retreive the message based on the id from the database
Header
{
}
Body
{
}
Delete the message based on the id from the database, after validating the user
Header
{
}
Body
{
}
can be used as a way to manage a 3rd party payment servive to get a signal of if to update a user or no
Header
{
}
Body
{
}