Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/controllers/api/router.go
akuma06 69123d53a9 Updated APIdoc + New API endpoint for user profile
Now you can access a user __public__ profile by querying the api endpoint /profile?id=USERID
2017-07-22 17:21:14 +02:00

22 lignes
623 o
Go

package apiController
import "github.com/NyaaPantsu/nyaa/controllers/router"
func init() {
api := router.Get().Group("/api")
{
api.GET("", APIHandler)
api.GET("/p/:page", APIHandler)
api.GET("/view/:id", APIViewHandler)
api.HEAD("/view/:id", APIViewHeadHandler)
api.POST("/upload", APIUploadHandler)
api.POST("/login", APILoginHandler)
api.GET("/profile", APIProfileHandler)
api.GET("/token/check", APICheckTokenHandler)
api.GET("/token/refresh", APIRefreshTokenHandler)
api.Any("/search", APISearchHandler)
api.Any("/search/p/:page", APISearchHandler)
api.PUT("/update", APIUpdateHandler)
}
}