From f7559e8cc544125c409602512eb29678b3dc5ddf Mon Sep 17 00:00:00 2001 From: Howl Date: Sun, 15 May 2016 14:04:59 +0200 Subject: [PATCH] Implement /api/get_match (will return empty array, match data is currently not stored in ripple) --- app/peppy/match.go | 13 +++++++++++++ app/start.go | 1 + 2 files changed, 14 insertions(+) create mode 100644 app/peppy/match.go diff --git a/app/peppy/match.go b/app/peppy/match.go new file mode 100644 index 0000000..b6fae96 --- /dev/null +++ b/app/peppy/match.go @@ -0,0 +1,13 @@ +// Package peppy implements the osu! API as defined on the osu-api repository wiki (https://github.com/ppy/osu-api/wiki). +package peppy + +import ( + "database/sql" + + "github.com/gin-gonic/gin" +) + +// GetMatch retrieves general match information. +func GetMatch(c *gin.Context, db *sql.DB) { + c.JSON(200, []struct{}{}) +} diff --git a/app/start.go b/app/start.go index ddc5474..d99c6cc 100644 --- a/app/start.go +++ b/app/start.go @@ -67,6 +67,7 @@ func Start(conf common.Conf, dbO *sql.DB) *gin.Engine { // peppyapi api.GET("/get_user", PeppyMethod(peppy.GetUser)) + api.GET("/get_match", PeppyMethod(peppy.GetMatch)) } r.NoRoute(v1.Handle404)