MCPcopy Create free account
hub / github.com/LumaAI-API/Luma-API / RegisterRouter

Function RegisterRouter

router.go:11–40  ·  view source on GitHub ↗
(r *gin.Engine)

Source from the content-addressed store, hash-verified

9)
10
11func RegisterRouter(r *gin.Engine) {
12 r.GET("/ping", func(c *gin.Context) {
13 c.JSON(200, gin.H{
14 "message": "pong",
15 })
16 })
17 docs.SwaggerInfo.BasePath = "/"
18 r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
19
20 apiRouter := r.Group("/luma", middleware.SecretAuth())
21 {
22 //old 废弃
23 apiRouter.POST("/generations/", Generations)
24
25 // current
26 //apiRouter.GET("/generations/*action", Fetch)
27
28 // submit
29 apiRouter.POST("/generations", Generations)
30 apiRouter.POST("/generations/:task_id/extend", ExtentGenerations)
31 apiRouter.POST("/generations/file_upload", Upload)
32
33 // get data
34 apiRouter.GET("/generations/:task_id", FetchByID)
35 apiRouter.GET("/generations/:task_id/download_video_url", GetDownloadUrl)
36
37 apiRouter.GET("/subscription/usage", Usage)
38 apiRouter.GET("/users/me", Me)
39 }
40}

Callers 1

mainFunction · 0.85

Calls 1

SecretAuthFunction · 0.92

Tested by

no test coverage detected