an exclusive API for wallpaperCollectApp. you can login,register,collect image,update profile in this API. I use MySQL for database with using GORM for manipulate relation of database and also Gin Framework for build this API. I deploy this API in https://wallpapercollectapi-production-c728.up.railway.app/. feel free to feedback this API.
Make sure you have Go and SQL installed on your machine.
Copy code
git clone https://github.com/fchrgrib/wallpaperCollectRestAPI.git
go get -v github.com/gin-gonic/gin
go get -v github.com/jinzhu/gorm
go get -v github.com/jinzhu/gorm/dialects/sql
go get -v github.com/dgrijalva/jwt-go
JWT_SECRET=yoursecretkey
go run migrations/*.go
go run main.go
POST /register-email-default: Register a new userPOST /login-email-default: Login and get a JWTGET /logout : logoutGET /login-google-sessionGET /register-goolgle-sessionGET /login-facebook-sessionGET /register-facebook-sessionGET /wallpaper: Get a list of all wallpapersPOST /wallpaper/upload: Upload a new wallpaperGET /wallpaper/profile: to get all user infoPUT /wallpaper/profile/update_profile: for updating your profilePUT /wallpaper/profile/upload_profile_picture: to upload your profile pictureGET /images/:idGET /images/:id/downloadDELETE /images/:id/delete