Allow import straight from github
This commit is contained in:
		| @@ -2,8 +2,8 @@ | ||||
|  | ||||
| This is the source code for Ripple's API. | ||||
|  | ||||
| - Origin: https://git.zxq.co/ripple/rippleapi | ||||
| - Mirror: https://github.com/osuripple/api | ||||
| - Origin: https://git.github.com/osuYozora/rippleapi | ||||
| - Mirror: https://github.com/osuyozora/api | ||||
|  | ||||
| ## Note to fellow developers: this is not how you do it! | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ import ( | ||||
| 	"unsafe" | ||||
|  | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // Method wraps an API method to a HandlerFunc. | ||||
|   | ||||
| @@ -7,7 +7,7 @@ import ( | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"github.com/thehowl/go-osuapi" | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // GetBeatmap retrieves general beatmap information. | ||||
|   | ||||
| @@ -7,7 +7,7 @@ import ( | ||||
|  | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| var modes = []string{"std", "taiko", "ctb", "mania"} | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"strconv" | ||||
| 	"strings" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
|  | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"github.com/valyala/fasthttp" | ||||
|   | ||||
| @@ -12,8 +12,8 @@ import ( | ||||
| 	"github.com/thehowl/go-osuapi" | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"gopkg.in/redis.v5" | ||||
| 	"zxq.co/ripple/ocl" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/ocl" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // R is a redis client. | ||||
|   | ||||
| @@ -7,7 +7,7 @@ import ( | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"zxq.co/x/getrank" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ import ( | ||||
| 	"github.com/buaazp/fasthttprouter" | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type router struct { | ||||
|   | ||||
							
								
								
									
										10
									
								
								app/start.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								app/start.go
									
									
									
									
									
								
							| @@ -9,11 +9,11 @@ import ( | ||||
| 	"github.com/getsentry/raven-go" | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"gopkg.in/redis.v5" | ||||
| 	"zxq.co/ripple/rippleapi/app/internals" | ||||
| 	"zxq.co/ripple/rippleapi/app/peppy" | ||||
| 	"zxq.co/ripple/rippleapi/app/v1" | ||||
| 	"zxq.co/ripple/rippleapi/app/websockets" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/app/internals" | ||||
| 	"github.com/osuYozora/rippleapi/app/peppy" | ||||
| 	"github.com/osuYozora/rippleapi/app/v1" | ||||
| 	"github.com/osuYozora/rippleapi/app/websockets" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	) | ||||
|  | ||||
| var ( | ||||
|   | ||||
| @@ -8,7 +8,7 @@ import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // GetTokenFull retrieves an user ID and their token privileges knowing their API token. | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"encoding/json" | ||||
|  | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type response404 struct { | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package v1 | ||||
| import ( | ||||
| 	"database/sql" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type singleBadge struct { | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package v1 | ||||
| import ( | ||||
| 	"database/sql" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type difficulty struct { | ||||
|   | ||||
| @@ -6,8 +6,8 @@ import ( | ||||
| 	"strconv" | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"zxq.co/ripple/rippleapi/limit" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/limit" | ||||
| ) | ||||
|  | ||||
| type rankRequestsStatusResponse struct { | ||||
|   | ||||
| @@ -10,7 +10,7 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // This basically proxies requests from Medium's API and is used on Ripple's | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package v1 | ||||
| import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // Boilerplate errors | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package v1 | ||||
| import ( | ||||
| 	"database/sql" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type friendData struct { | ||||
|   | ||||
| @@ -9,8 +9,8 @@ import ( | ||||
|  | ||||
| 	redis "gopkg.in/redis.v5" | ||||
|  | ||||
| 	"zxq.co/ripple/ocl" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/ocl" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type leaderboardUser struct { | ||||
|   | ||||
| @@ -9,7 +9,7 @@ import ( | ||||
| 	"time" | ||||
|  | ||||
| 	redis "gopkg.in/redis.v5" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type setAllowedData struct { | ||||
|   | ||||
| @@ -13,7 +13,7 @@ import ( | ||||
| 	"syscall" | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // MetaRestartGET restarts the API with Zero Downtime™. | ||||
|   | ||||
| @@ -5,7 +5,7 @@ package v1 | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // MetaRestartGET restarts the API with Zero Downtime™. | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"math/rand" | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| var rn = rand.New(rand.NewSource(time.Now().UnixNano())) | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"fmt" | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type rapLogData struct { | ||||
|   | ||||
| @@ -8,7 +8,7 @@ import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"zxq.co/x/getrank" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package v1 | ||||
| import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"zxq.co/ripple/semantic-icons-ugc" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"github.com/osuYozora/semantic-icons-ugc" | ||||
| ) | ||||
|  | ||||
| type donorInfoResponse struct { | ||||
|   | ||||
| @@ -11,8 +11,8 @@ import ( | ||||
|  | ||||
| 	"github.com/jmoiron/sqlx" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"zxq.co/ripple/schiavolib" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"github.com/osuYozora/schiavolib" | ||||
| ) | ||||
|  | ||||
| // TokenSelfDeletePOST deletes the token the user is connecting with. | ||||
|   | ||||
| @@ -8,8 +8,8 @@ import ( | ||||
| 	"unicode" | ||||
|  | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"zxq.co/ripple/ocl" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/ocl" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type userData struct { | ||||
|   | ||||
| @@ -6,7 +6,7 @@ import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // Achievement represents an achievement in the database. | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"zxq.co/x/getrank" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"zxq.co/x/getrank" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"zxq.co/x/getrank" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,7 @@ import ( | ||||
|  | ||||
| 	"database/sql" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| type websocketUser struct { | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package websockets | ||||
| import ( | ||||
| 	"encoding/json" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| // SetRestrictedVisibility sets whether the information of restricted users | ||||
|   | ||||
| @@ -7,8 +7,8 @@ import ( | ||||
| 	"sync" | ||||
|  | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| 	"zxq.co/ripple/rippleapi/app/v1" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/app/v1" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"zxq.co/x/getrank" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -10,7 +10,7 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| ) | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"errors" | ||||
| 	"time" | ||||
|  | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"gopkg.in/thehowl/go-osuapi.v1" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -90,7 +90,7 @@ func _err(err error, tags map[string]string, user *raven.User, c *fasthttp.Reque | ||||
| 	} | ||||
|  | ||||
| 	// Create stacktrace | ||||
| 	st := raven.NewStacktrace(0, 3, []string{"zxq.co/ripple", "git.zxq.co/ripple"}) | ||||
| 	st := raven.NewStacktrace(0, 3, []string{"github.com/osuYozora", "git.github.com/osuYozora"}) | ||||
|  | ||||
| 	ifaces := []raven.Interface{st, generateRavenHTTP(c)} | ||||
| 	if user != nil { | ||||
|   | ||||
							
								
								
									
										10
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								main.go
									
									
									
									
									
								
							| @@ -6,11 +6,11 @@ import ( | ||||
| 	"strings" | ||||
| 	"syscall" | ||||
|  | ||||
| 	"zxq.co/ripple/agplwarning" | ||||
| 	"zxq.co/ripple/rippleapi/app" | ||||
| 	"zxq.co/ripple/rippleapi/beatmapget" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"zxq.co/ripple/schiavolib" | ||||
| 	"github.com/osuYozora/agplwarning" | ||||
| 	"github.com/osuYozora/rippleapi/app" | ||||
| 	"github.com/osuYozora/rippleapi/beatmapget" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"github.com/osuYozora/schiavolib" | ||||
| 	// Golint pls dont break balls | ||||
| 	_ "github.com/go-sql-driver/mysql" | ||||
| 	"github.com/jmoiron/sqlx" | ||||
|   | ||||
| @@ -10,8 +10,8 @@ import ( | ||||
|  | ||||
| 	"github.com/rcrowley/goagain" | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"zxq.co/ripple/schiavolib" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| 	"github.com/osuYozora/schiavolib" | ||||
| ) | ||||
|  | ||||
| func startuato(hn fasthttp.RequestHandler) { | ||||
|   | ||||
| @@ -10,7 +10,7 @@ import ( | ||||
| 	"net" | ||||
|  | ||||
| 	"github.com/valyala/fasthttp" | ||||
| 	"zxq.co/ripple/rippleapi/common" | ||||
| 	"github.com/osuYozora/rippleapi/common" | ||||
| ) | ||||
|  | ||||
| func startuato(hn fasthttp.RequestHandler) { | ||||
|   | ||||
							
								
								
									
										10
									
								
								vendor/vendor.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/vendor.json
									
									
									
									
										vendored
									
									
								
							| @@ -184,25 +184,25 @@ | ||||
| 		}, | ||||
| 		{ | ||||
| 			"checksumSHA1": "vTjp3tQOr8z8CNjZWwPzgR+t2qQ=", | ||||
| 			"path": "zxq.co/ripple/agplwarning", | ||||
| 			"path": "github.com/osuYozora/agplwarning", | ||||
| 			"revision": "d3a3d0ee424fcb0bd09a651354c1735285f59f8c", | ||||
| 			"revisionTime": "2018-02-04T10:46:38Z" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"checksumSHA1": "SI9tgNMlnMhxP7t6cAGuDjvoAHg=", | ||||
| 			"path": "zxq.co/ripple/ocl", | ||||
| 			"path": "github.com/osuYozora/ocl", | ||||
| 			"revision": "b499c4fc6bcd791b59dc994059e6f53cd939cf24", | ||||
| 			"revisionTime": "2016-05-18T15:55:25Z" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"checksumSHA1": "+6t1fYk62F/7QAol2NrKdVfQIkE=", | ||||
| 			"path": "zxq.co/ripple/schiavolib", | ||||
| 			"path": "github.com/osuYozora/schiavolib", | ||||
| 			"revision": "9cdc674dad0700ec79618de4ab558db6ad1de372", | ||||
| 			"revisionTime": "2016-11-09T21:02:50Z" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"checksumSHA1": "LflfmgveoAndDoPYavJaQ9XhzGk=", | ||||
| 			"path": "zxq.co/ripple/semantic-icons-ugc", | ||||
| 			"path": "github.com/osuYozora/semantic-icons-ugc", | ||||
| 			"revision": "82d4c266de98a1464887d4e55e1a02b75e71e5c9", | ||||
| 			"revisionTime": "2016-11-23T19:03:31Z" | ||||
| 		}, | ||||
| @@ -213,5 +213,5 @@ | ||||
| 			"revisionTime": "2017-04-18T18:31:09Z" | ||||
| 		} | ||||
| 	], | ||||
| 	"rootPath": "zxq.co/ripple/rippleapi" | ||||
| 	"rootPath": "github.com/osuYozora/rippleapi" | ||||
| } | ||||
|   | ||||
							
								
								
									
										2
									
								
								vendor/zxq.co/ripple/ocl/README.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/zxq.co/ripple/ocl/README.md
									
									
									
									
										vendored
									
									
								
							| @@ -1 +1 @@ | ||||
| # ocl [](https://godoc.org/git.zxq.co/ripple/ocl) [](https://goreportcard.com/report/git.zxq.co/ripple/ocl) | ||||
| # ocl [](https://godoc.org/git.github.com/osuYozora/ocl) [](https://goreportcard.com/report/git.github.com/osuYozora/ocl) | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| https://godoc.org/git.zxq.co/ripple/semantic-icons-ugc | ||||
| https://godoc.org/git.github.com/osuYozora/semantic-icons-ugc | ||||
		Reference in New Issue
	
	Block a user