fix schiavo error and changing rippleapi to api
This commit is contained in:
parent
5b78c99b04
commit
5fc84bd914
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This is the source code for Ripple's API.
|
This is the source code for Ripple's API.
|
||||||
|
|
||||||
- Origin: https://git.github.com/osuYozora/rippleapi
|
- Origin: https://git.github.com/osuYozora/api
|
||||||
- Mirror: https://github.com/osuyozora/api
|
- Mirror: https://github.com/osuyozora/api
|
||||||
|
|
||||||
## Note to fellow developers: this is not how you do it!
|
## Note to fellow developers: this is not how you do it!
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Method wraps an API method to a HandlerFunc.
|
// Method wraps an API method to a HandlerFunc.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/thehowl/go-osuapi"
|
"github.com/thehowl/go-osuapi"
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetBeatmap retrieves general beatmap information.
|
// GetBeatmap retrieves general beatmap information.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var modes = []string{"std", "taiko", "ctb", "mania"}
|
var modes = []string{"std", "taiko", "ctb", "mania"}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
|
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"gopkg.in/redis.v5"
|
"gopkg.in/redis.v5"
|
||||||
"github.com/osuYozora/ocl"
|
"github.com/osuYozora/ocl"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// R is a redis client.
|
// R is a redis client.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"zxq.co/x/getrank"
|
"zxq.co/x/getrank"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/buaazp/fasthttprouter"
|
"github.com/buaazp/fasthttprouter"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type router struct {
|
type router struct {
|
||||||
|
|
10
app/start.go
10
app/start.go
|
@ -9,11 +9,11 @@ import (
|
||||||
"github.com/getsentry/raven-go"
|
"github.com/getsentry/raven-go"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"gopkg.in/redis.v5"
|
"gopkg.in/redis.v5"
|
||||||
"github.com/osuYozora/rippleapi/app/internals"
|
"github.com/osuYozora/api/app/internals"
|
||||||
"github.com/osuYozora/rippleapi/app/peppy"
|
"github.com/osuYozora/api/app/peppy"
|
||||||
"github.com/osuYozora/rippleapi/app/v1"
|
"github.com/osuYozora/api/app/v1"
|
||||||
"github.com/osuYozora/rippleapi/app/websockets"
|
"github.com/osuYozora/api/app/websockets"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetTokenFull retrieves an user ID and their token privileges knowing their API token.
|
// GetTokenFull retrieves an user ID and their token privileges knowing their API token.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type response404 struct {
|
type response404 struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package v1
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type singleBadge struct {
|
type singleBadge struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package v1
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type difficulty struct {
|
type difficulty struct {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"github.com/osuYozora/rippleapi/limit"
|
"github.com/osuYozora/api/limit"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rankRequestsStatusResponse struct {
|
type rankRequestsStatusResponse struct {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This basically proxies requests from Medium's API and is used on Ripple's
|
// This basically proxies requests from Medium's API and is used on Ripple's
|
||||||
|
|
|
@ -3,7 +3,7 @@ package v1
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Boilerplate errors
|
// Boilerplate errors
|
||||||
|
|
|
@ -3,7 +3,7 @@ package v1
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type friendData struct {
|
type friendData struct {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
redis "gopkg.in/redis.v5"
|
redis "gopkg.in/redis.v5"
|
||||||
|
|
||||||
"github.com/osuYozora/ocl"
|
"github.com/osuYozora/ocl"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type leaderboardUser struct {
|
type leaderboardUser struct {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
redis "gopkg.in/redis.v5"
|
redis "gopkg.in/redis.v5"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type setAllowedData struct {
|
type setAllowedData struct {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MetaRestartGET restarts the API with Zero Downtime™.
|
// MetaRestartGET restarts the API with Zero Downtime™.
|
||||||
|
|
|
@ -5,7 +5,7 @@ package v1
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MetaRestartGET restarts the API with Zero Downtime™.
|
// MetaRestartGET restarts the API with Zero Downtime™.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var rn = rand.New(rand.NewSource(time.Now().UnixNano()))
|
var rn = rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rapLogData struct {
|
type rapLogData struct {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"zxq.co/x/getrank"
|
"zxq.co/x/getrank"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package v1
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"github.com/osuYozora/semantic-icons-ugc"
|
"github.com/osuYozora/semantic-icons-ugc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"github.com/osuYozora/schiavolib"
|
"github.com/osuYozora/schiavolib"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/osuYozora/ocl"
|
"github.com/osuYozora/ocl"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type userData struct {
|
type userData struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Achievement represents an achievement in the database.
|
// Achievement represents an achievement in the database.
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"zxq.co/x/getrank"
|
"zxq.co/x/getrank"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"zxq.co/x/getrank"
|
"zxq.co/x/getrank"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"zxq.co/x/getrank"
|
"zxq.co/x/getrank"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type websocketUser struct {
|
type websocketUser struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package websockets
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetRestrictedVisibility sets whether the information of restricted users
|
// SetRestrictedVisibility sets whether the information of restricted users
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
"github.com/osuYozora/rippleapi/app/v1"
|
"github.com/osuYozora/api/app/v1"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"zxq.co/x/getrank"
|
"zxq.co/x/getrank"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"gopkg.in/thehowl/go-osuapi.v1"
|
"gopkg.in/thehowl/go-osuapi.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
8
main.go
8
main.go
|
@ -7,10 +7,10 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/osuYozora/agplwarning"
|
"github.com/osuYozora/agplwarning"
|
||||||
"github.com/osuYozora/rippleapi/app"
|
"github.com/osuYozora/api/app"
|
||||||
"github.com/osuYozora/rippleapi/beatmapget"
|
"github.com/osuYozora/api/beatmapget"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"github.com/osuYozora/schiavolib"
|
"zxq.co/ripple/schiavolib"
|
||||||
// Golint pls dont break balls
|
// Golint pls dont break balls
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
|
|
||||||
"github.com/rcrowley/goagain"
|
"github.com/rcrowley/goagain"
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
"github.com/osuYozora/schiavolib"
|
"zxq.co/ripple/schiavolib"
|
||||||
)
|
)
|
||||||
|
|
||||||
func startuato(hn fasthttp.RequestHandler) {
|
func startuato(hn fasthttp.RequestHandler) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
"github.com/osuYozora/rippleapi/common"
|
"github.com/osuYozora/api/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func startuato(hn fasthttp.RequestHandler) {
|
func startuato(hn fasthttp.RequestHandler) {
|
||||||
|
|
4
vendor/vendor.json
vendored
4
vendor/vendor.json
vendored
|
@ -196,7 +196,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "+6t1fYk62F/7QAol2NrKdVfQIkE=",
|
"checksumSHA1": "+6t1fYk62F/7QAol2NrKdVfQIkE=",
|
||||||
"path": "github.com/osuYozora/schiavolib",
|
"path": "zxq.co/ripple/schiavolib",
|
||||||
"revision": "9cdc674dad0700ec79618de4ab558db6ad1de372",
|
"revision": "9cdc674dad0700ec79618de4ab558db6ad1de372",
|
||||||
"revisionTime": "2016-11-09T21:02:50Z"
|
"revisionTime": "2016-11-09T21:02:50Z"
|
||||||
},
|
},
|
||||||
|
@ -213,5 +213,5 @@
|
||||||
"revisionTime": "2017-04-18T18:31:09Z"
|
"revisionTime": "2017-04-18T18:31:09Z"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rootPath": "github.com/osuYozora/rippleapi"
|
"rootPath": "github.com/osuYozora/api"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user