Howl
9e57fedd80
friends/add and del are now POST-only
2016-11-16 18:03:47 +01:00
Howl
4036772803
Userpage now is never nil (fix edit userpage not working for certain users)
2016-11-16 17:36:01 +01:00
Howl
9df1fd9e97
Add back r.Email
2016-11-13 19:20:07 +01:00
Howl
6d3d6cde2d
Don't allow email to be modified from user settings
2016-11-12 18:51:50 +01:00
Howl
1c2201317f
Add POST users/self/userpage
2016-11-07 18:34:53 +01:00
Howl
6c8d7baee2
add UsersSelfSettingsGET and POST
2016-11-06 22:51:21 +01:00
Howl
9de913888d
Light speedup on scores/recent
2016-10-29 17:07:29 +02:00
Howl
b9d4683092
Remove time
from sorting in score
2016-10-29 14:27:55 +02:00
Howl
10c61cec02
beatmap_md5 -> md5
2016-10-29 14:23:31 +02:00
Howl
a6b4ad1d3e
Allow looking for beatmap md5 in GET /beatmaps
2016-10-29 14:05:16 +02:00
Howl
3ce1f58a48
add pagination to GET /tokens
2016-10-28 16:45:30 +02:00
Howl
4239c2f0e9
Add mods to get_scores
2016-10-25 20:03:33 +02:00
Howl
077c6563fa
StatusLoved
2016-10-25 18:48:44 +02:00
Howl
29296010db
Add silence info
2016-10-21 18:54:46 +02:00
Howl
2f33e94881
add has_not_privileges
2016-10-20 18:14:30 +02:00
Howl
043448c429
Add search by privilege group name in users
2016-10-19 17:10:36 +02:00
Howl
325df61d96
Spaces and underscores in usernames now don't make a difference
2016-10-16 18:52:34 +02:00
Howl
0edbff13cd
Add sorting stuff to GET v1/friends
2016-10-16 16:45:42 +02:00
Howl
fefde77261
GET v1/users is now actually pretty darn cool
2016-10-16 16:26:10 +02:00
Howl
e5504d2e29
whoops
2016-10-02 22:30:52 +02:00
Howl
2e2b1e481b
Revert "requests -> requestsbytype"
...
This reverts commit a060187547
.
2016-10-02 21:59:04 +02:00
Howl
46c723c7b6
I cannot believe I am so stupid
2016-10-02 21:58:43 +02:00
Howl
a060187547
requests -> requestsbytype
2016-10-02 21:54:23 +02:00
Howl
3a55524c86
Add some more datadog crap
2016-10-02 20:07:38 +02:00
Howl
da0021a9b3
Add some datadog shit
2016-10-02 19:47:31 +02:00
Howl
c54c1565ca
Show custom badge only if user is currently a donor
2016-09-30 21:11:45 +02:00
Howl
48cef26ccd
Add ability to filter leaderboard by country (country ranking) (NOT ON WEBSITE RN)
2016-09-28 23:00:24 +02:00
Howl
d6aa0a814d
Level on chosen_mode in leaderboard
2016-09-28 20:49:58 +02:00
Howl
90b7d71062
Increase max users on leaderboard limit to 500
2016-09-28 18:43:56 +02:00
Howl
017421b232
Add users/self/favourite_mode
2016-09-27 23:13:55 +02:00
Howl
b0ffad5e76
Add title to doc/rules
2016-09-26 20:07:47 +02:00
Howl
a197647933
Include doc title in documentation content get
2016-09-26 17:16:56 +02:00
Howl
0e27793d25
make rank_requests/status auth-free
2016-09-24 19:45:07 +02:00
Howl
3262bbea74
rank requests stuff, temporarily disabled
2016-09-20 18:14:02 +02:00
Howl
e858ed94bc
Schiavo is like a son with a down syndrome.
...
You love him, like every child you have, but you have to accept the fact that he's fucking down, and so he's completely retarded and makes everything the wrong way.
Also, in this commit: set_status is now no more fucking retarded, as in it actually returns the beatmap it was requested, and some minor things.
2016-09-17 23:27:20 +02:00
Howl
4be5948d97
Fix get_users returning no results if user doesn't have a leaderboard position
2016-09-09 18:55:26 +02:00
Howl
7249d9136b
move rank requests status to ReadConfidential, as it contains user information
2016-09-07 12:53:52 +02:00
Howl
dd00c39075
Add initial beatmap reqeusts API to get current status
2016-09-06 20:11:46 +02:00
Howl
c745947281
add peppymethods also in /v1, because new osu-web does so
2016-09-06 19:15:37 +02:00
Howl
1826246125
Create `limit' package, remove need of login_attempts.go
2016-09-06 17:04:22 +02:00
Howl
7e5d35d79a
make userpage content nil-able
2016-09-05 23:45:11 +02:00
Howl
9bfbb50ffd
ping now returns both user and token privileges and their string representation
2016-09-03 01:31:03 +02:00
Howl
61527882d1
Get donor info through /users/self/donor_info
2016-09-02 18:27:15 +02:00
Howl
92be078783
move peppyapi into its own group
2016-09-02 18:14:23 +02:00
Howl
e80e557f10
Add custom badge in users/full
2016-09-02 17:00:36 +02:00
Howl
e6c77e64a8
Pagination in badgesGET
2016-09-01 22:58:21 +02:00
Howl
12aaa04fea
use new badge system, users/full now returns badge information rather than just the ID
2016-09-01 22:50:56 +02:00
Howl
e4d27f8d6b
Allow users with AdminManageUsers to see banned users
...
Also:
- General code refactoring
- Allow banned/restricted users to see their scores etc
- common.MethodData now contains UserPrivileges
- UserPrivileges have now their own type
- Implement md.HasQuery, to know if there's a GET querystring parameter or not
2016-08-27 12:04:12 +02:00
Howl
476cd385f8
tiny get_beatmaps performance improvement
2016-08-23 21:30:11 +02:00
Howl
4d9f466491
Forgot a break
inf a for-range loop. Broke all the mode detection system.
2016-08-23 16:45:47 +02:00
Howl
3de3443d87
this is driving me crazy
2016-08-23 16:39:57 +02:00
Howl
42011ad10c
Allow much more freedom to query for different things in /api/v1/beatmaps
2016-08-23 16:27:09 +02:00
Howl
f35bb0a7e8
Fix m = 0 killing the query
2016-08-23 15:42:59 +02:00
Howl
73b0f48586
Add get_beatmaps
2016-08-22 23:04:52 +02:00
Howl
69e1d585cc
LEFT to INNER
2016-08-19 23:48:44 +02:00
Howl
817592e736
Remove common.OsuTime, change all occurencies to common.UnixTimestamp
2016-08-19 17:02:51 +02:00
Howl
67ae6ab3b8
Fix users/full returning "" as the country
2016-08-18 15:15:22 +02:00
Howl
55d7621ef5
remove -o api, as it's the evil
2016-08-15 21:56:29 +02:00
Howl
4f7ef9c071
u param
2016-08-15 21:51:51 +02:00
Howl
cab63a94ac
Make rank actually contain rank
2016-08-15 21:37:24 +02:00
Howl
954ec755b8
Implement get_scores in peppyapi
2016-08-15 21:13:40 +02:00
Howl
b9d35ac46d
Add more where clauses because I forgot 'em
2016-08-15 20:07:40 +02:00
Howl
a6ca8de13e
Implement GET scores in official ripple api
2016-08-15 19:59:46 +02:00
Howl
346f26177c
Change all references to sql.DB to references to sqlx.DB
2016-08-15 13:45:42 +02:00
Howl
e41be44397
Use sqlx instead of sql. Rewrite of most clusterfucks incoming
2016-08-15 13:37:03 +02:00
Howl
c3b56164f5
Change X-Ripple-Token cookie to simply "rt"
2016-08-10 12:25:26 +02:00
Howl
f1fa5e8b91
Allow to get a blog post's content by slug
2016-08-10 09:45:01 +02:00
Howl
af691bee1c
Change system for hanayo requests
2016-08-09 23:06:23 +02:00
Howl
4f217781cc
GET /tokens/self now returns 404 if no token is given
2016-08-09 19:22:41 +02:00
Howl
17fef6c654
Silently ignore time.ParseErrors
2016-08-09 19:15:53 +02:00
Nyo
38008a5451
Fix error on scores handlers
2016-07-20 10:49:29 +02:00
Howl
3a2928be53
hey nyo i may or may not have fixed beatmap difficulties
2016-07-18 23:27:37 +02:00
Howl
a999033e4b
Add X-Real-404 to true 404 responses
2016-07-12 19:55:58 +02:00
Howl
8544c41cc6
Requests from hanayo have no rate limiting
2016-07-12 15:49:02 +02:00
Howl
6926cda1ee
Fix banned response code, fix typo
2016-07-10 20:53:06 +02:00
Howl
ab8e1ad7e2
Log errors
2016-07-07 17:36:53 +02:00
Howl
921402b0ee
Add blog API
2016-07-07 00:20:36 +02:00
Howl
24933cc08f
Show countries of everyone, without checking show_country.
2016-07-06 23:43:43 +02:00
Howl
09523369b7
Use custom type UnixTimestamp instead of repeating boilerplate code over and over.
2016-07-06 22:32:30 +02:00
Howl
ff1d2fa1c3
.HIDE. shit
2016-07-06 19:36:46 +02:00
Howl
15559d0be2
use c.ClientIP() rather than manually accessing c.Request.RemoteAddr
2016-07-06 19:35:49 +02:00
Howl
45d0de234b
Fix race condition in specificRateLimiter
2016-07-06 19:24:11 +02:00
Howl
faf948b037
Implement rate limiting
...
- 60 requests per minute for requests without a valid API token
- 2000 requests per minute per user for requests with a valid API token
2016-07-06 16:33:58 +02:00
Howl
0a870ee742
Remove read privilege. Public data is now readable by everyone without having to pass an API token. Feel free to test around as much as you like!
2016-07-06 14:22:43 +02:00
Howl
534d5183ed
It's not rank, it's privileges
2016-07-06 14:12:57 +02:00
Howl
fcdd042d6c
Finish up with new ranks and stuff on the API
2016-07-04 00:06:23 +02:00
Nyo
39f6b2bbcf
New privileges on API (allowed column only)
2016-07-03 21:55:03 +02:00
Nyo
244186cf4e
Allow compilation of the API on Windows
2016-06-22 13:13:33 +02:00
Howl
7cbbb626c1
LEFT JOIN -> INNER JOIN
2016-06-18 02:42:47 +02:00
Howl
b3e31734f5
Release logging to sentry
2016-06-17 10:34:53 +02:00
Howl
427f2ff890
Remove errore_meme
2016-06-16 14:06:09 +02:00
Howl
02f0449b39
Stack traces are only useful for panics
2016-06-16 14:05:26 +02:00
Howl
6554447cbc
Use ID rather than IP, memes
2016-06-16 14:01:37 +02:00
Howl
ef9c0c6c6a
When erroring from c.Error(), give actual error, not a *gin.Error
2016-06-16 13:59:18 +02:00
Howl
9658957067
Better recovery
2016-06-16 13:49:35 +02:00
Howl
cbcfacb06a
Fix misplaced if
2016-06-16 13:14:19 +02:00
Howl
06eb64ecf5
error logging with schiavo -> error logging with sentry
2016-06-16 12:45:10 +02:00
Howl
24d34eb741
v1.TokenNewPOST => /tokens, /tokens/new
2016-06-15 00:23:55 +02:00
Howl
fc38503bdd
add GET /tokens/self
2016-06-14 12:01:30 +02:00
Howl
4d9ec829a8
Add token listing at GET /tokens, also add a token-fixing tool at /tokens/fix_privileges.
...
By the way, 100th commit on the API!
2016-06-14 11:32:11 +02:00
Howl
52d7b65493
Add /api/v1/tokens/self/delete
2016-06-14 10:03:53 +02:00
Howl
a9b82f99b5
Add global leaderboard
2016-06-14 09:37:11 +02:00
Howl
a65cf086f0
Add Documentation API
2016-06-13 22:40:01 +02:00
Howl
32738aaae0
Simplify string to int conversion where possible
2016-06-13 21:48:09 +02:00
Howl
2f027ce853
Remove Message from 404 response, to allow easy distinction between missing method and data not found
2016-06-13 21:47:35 +02:00
Howl
da6fcb83f7
Don't allow "weird" characters in jsonp callback
2016-06-13 21:17:43 +02:00
Howl
f32de541a4
Fix set_status 500 ing when beatmap is not found by ID
2016-06-09 10:52:55 +02:00
Howl
d87027c85a
always rank the whole mapset, not just a single diff
2016-06-09 00:29:00 +02:00
Howl
b1fc609706
Add BeatmapsRankedFrozenFullGET, an endpoint to get all beatmaps having a frozen ranked status
2016-06-08 23:33:08 +02:00
Howl
9b821e3230
Add /api/v1/beatmaps
2016-06-08 19:55:52 +02:00
Howl
155fbabbbc
Allow auth through cookie X-Ripple-Token
2016-06-08 18:55:48 +02:00
Howl
ee51b999f1
Allow passing a beatmap_id to BeatmapSetStatus
2016-06-08 18:30:23 +02:00
Howl
e27569261a
Update ban_datetime on allowed status change
2016-06-06 12:27:54 +02:00
Howl
122e2afa1b
Don't log message in get_user if it's an ErrNoRows
2016-05-30 19:18:31 +02:00
Howl
ba5a078db3
forgot allowed check
2016-05-29 13:09:36 +02:00
Howl
0c6237ed01
Use userid rather than username
2016-05-28 23:48:29 +02:00
Howl
fb08a80308
fixes
2016-05-28 20:31:46 +02:00
Howl
571325e98f
Send error logs asynchronously
2016-05-28 20:28:13 +02:00
Howl
6a374a4f9d
Implement get_user_best and get_user_recent in peppyapi
2016-05-28 20:24:39 +02:00
Howl
0fcb1cc391
diobono
2016-05-26 21:19:00 +02:00
Howl
fde01c6f84
Don't print 0pp scores on std on user/scores/best
2016-05-26 21:13:36 +02:00
Howl
d5caa1fdc2
Report errors in API to #bunker
2016-05-22 17:11:07 +02:00
Howl
a25512fb96
Add completed status in users/scores/*
2016-05-22 16:22:13 +02:00
Howl
ce739a8ae5
Implement users/scores/recent
2016-05-19 17:31:49 +02:00
Howl
da2a36537e
Implement user/scores/best
2016-05-19 17:15:17 +02:00
Howl
45c67cf9b7
Start implementing get_beatmaps
2016-05-18 18:37:36 +02:00
Howl
de2aeb338b
Revert "Fix normalisation not actually happening in users/full"
...
This reverts commit ef14f027b7
.
2016-05-18 18:00:39 +02:00
Howl
52e1fa09ca
Revert "Normalise floats (don't use Inf in JSON)"
...
This reverts commit 330757ec78
.
2016-05-18 18:00:22 +02:00
Howl
ef14f027b7
Fix normalisation not actually happening in users/full
2016-05-18 17:49:46 +02:00
Howl
330757ec78
Normalise floats (don't use Inf in JSON)
2016-05-18 17:48:19 +02:00
Howl
2afc557ef8
peppyapi: replicate behaviour of original API (check for user ID first, then for username)
2016-05-18 17:47:39 +02:00
Howl
5320c62e17
Be more permissive in UserLookupGET (wildcard both at start and at end of username)
2016-05-17 17:40:30 +02:00
Howl
c86bc1e420
Use precise level in /api/v1/users/full
2016-05-17 17:06:15 +02:00
Howl
a16c196799
Add level in /api/get_user
2016-05-17 17:00:09 +02:00
Howl
32b9d1e2d5
Escape backslashes in UserLookupGET
2016-05-17 15:35:18 +02:00
Howl
f7559e8cc5
Implement /api/get_match (will return empty array, match data is currently not stored in ripple)
2016-05-15 14:04:59 +02:00
Howl
e043dd9cdf
Remove useless println
2016-05-15 13:57:28 +02:00
Howl
d6f67915c5
Start implementing peppyapi; implement /api/get_user
2016-05-15 13:57:04 +02:00
Howl
a939d15779
Force private API keys to have Privileges write, read, read confidential
2016-05-15 07:20:11 +02:00
Howl
42437bde44
Add user lookup (search for user with only initial part of their username)
2016-05-14 22:43:47 +02:00
Howl
35fb27e3c1
Add PP in /users/full
2016-05-14 21:27:42 +02:00
Howl
3942f63446
use querystring in /friends methods. remove useless POST methods in /friends
2016-05-14 21:23:17 +02:00
Howl
9481de5e4e
Merge /badges/:id into /badges
2016-05-14 21:02:05 +02:00
Howl
4448fcdfdb
Update /users/userpage to use querystring parameters
2016-05-14 20:55:42 +02:00
Howl
5f97315d49
i memi
2016-05-14 20:31:28 +02:00
Howl
417409030a
Fix 500 on tokens/new
2016-05-14 20:18:29 +02:00
Howl
09582361a3
/users/full now using querystring. /users requests from now on will have an uniform system for getting the user (?id=self | ?id=1337 | ?name=Howl)
2016-05-14 19:51:33 +02:00
Howl
8114329d38
/users/whatid using querystring param name
2016-05-14 18:52:55 +02:00
Howl
3a199b8c41
Merge /users/id/:id and /users/name/:name into /users (with querystring params id and name)
2016-05-14 18:32:43 +02:00
Howl
1b1f2503a2
fuck nyo
2016-04-27 21:03:16 +02:00