soedar
dcbcf4fedb
Fixed a 🍟 on lib/game.js
2014-03-09 23:59:55 +08:00
soedar
517652fe4b
Updated game submission and edit endpoints to accept json blob ( #95 #105 #114 #115 )
2014-03-05 18:57:40 +08:00
Tay Yang Shun
5aea09e0f4
Changed icons key to icon
2014-03-05 18:56:11 +08:00
Andrew Richardson
5f6ad0d662
Merge pull request #100 from cvan/user-view
...
Added wrapper views to pre-fetch user ID / data
2014-02-28 19:12:10 -08:00
soedar
728ddd61d7
Merge pull request #104 from soedar/update-game
...
Modified updateGame function
2014-02-28 16:33:44 +08:00
soedar
e2d1f65402
Fixed changes from review ( Fixes #99 )
2014-02-28 16:30:37 +08:00
soedar
b62ab115a6
updateGame now accepts full object to be updated ( #99 )
2014-02-28 16:30:30 +08:00
Andrew Richardson
6431bfaaaf
Added documentation for wrapper views, and moved the result argument of each wrapper view to the front of the args list, using view.apply with the args list provided by redisView instead of hardcoding the args. This way arguments are never clobbered, and callers are free to ignore arguments at the end of the list.
2014-02-26 21:07:53 -08:00
Andrew Richardson
840b8ed32d
Added userDataView for fetching all user data, and adopted it where possible; refactored generation of user views to stay DRY
2014-02-26 21:07:53 -08:00
Andrew Richardson
b4103656f3
Added userIDView to wrap restify endpoint handlers and pre-fetch user ID from the extracted email in the _user field
2014-02-26 21:07:53 -08:00
Andrew Richardson
4ca3057083
Fixed a couple of bugs:
...
- `getUserFromEmail` now returns an error if no user was found, which I believe is the correct behaviour, and added a check in `login.js` to account for this
- `list.js` now fetches the entire game object instead of the public object so it can check the game's `status` property correctly, then maps them to public objects when returning them as a response
2014-02-26 18:57:25 -08:00
soedar
6c01e454ca
Merge pull request #96 from soedar/featured
...
Featured Games API Endpoint
2014-02-27 00:26:54 +08:00
soedar
cbe1a464dc
Updated featured endpoints from review ( Fixes #40 #41 )
2014-02-26 01:27:48 +08:00
Andrew Richardson
441e034772
Merge pull request #88 from cvan/automate-prefill
...
Enhanced db-prefill to spawn its own API and persona-faker instances
2014-02-24 18:07:19 -08:00
Andrew Richardson
dd9b2d7b18
Fixed a typo
2014-02-24 10:04:58 -08:00
Andrew Richardson
15965aff33
Moved _email to a root-level property on request, so that there's no risk of having it set by callers of the API
2014-02-24 10:04:58 -08:00
Andrew Richardson
d2f5026e2c
Style
2014-02-24 10:04:58 -08:00
Andrew Richardson
919118a743
Style fixes
2014-02-24 10:04:58 -08:00
Andrew Richardson
1d370a6c7b
Added documentation for SSA verification plugin, and fixed a potential security flaw by always setting the _email parameter
2014-02-24 10:04:58 -08:00
Andrew Richardson
87c448e904
Added an SSA verification plugin to restify that transforms the _user token, when present, to an email address, setting the _email param of the request object on success. If that step fails, it automatically returns a 403 bad_user response. This will help eliminate some boilerplate we've been using in pretty much every API endpoint.
2014-02-24 10:04:57 -08:00
soedar
0910d17e63
Added POST, PUT and DELETE endpoint for featured ( Fixes #40 )
2014-02-21 17:28:46 +08:00
soedar
bd4faaa672
Created a lib/genre.js file, and move the genreExists method there
2014-02-21 13:47:38 +08:00
Andrew Richardson
a2c976ae0f
Fixed refactoring mistakes
2014-02-17 12:30:19 -08:00
Andrew Richardson
9f117384bd
Stylin'
2014-02-17 12:21:39 -08:00
Andrew Richardson
34bf7aed8b
Changed stdout / stderr prefixing to use a proper stream.Writable subclass; style fixes
2014-02-17 12:01:39 -08:00
Andrew Richardson
3be1dc5309
Reverse-abstracted everything
2014-02-17 11:30:18 -08:00
Andrew Richardson
2c6257136e
Added 'game/list' endpoint to fetch a list of games using filters, including limiting by count. Supports restricted filters that require additonal permissions to use (ie. filtering by 'status' requires reviewer or admin permissions). Currently only the 'status' filter is implemented, but adding others is trivial thanks to an abstracted model and filter support in game.js.
...
Also fixed some bugs in game.js from last commit.
2014-02-16 18:16:59 -08:00
Andrew Richardson
52ac6fd7a8
Refactored game.js to support filtering a list of games by its properties
2014-02-16 16:27:14 -08:00
Andrew Richardson
9c6bee38ce
Modified db-prefill to use `fork()` to start up an instance of the API and persona-faker servers, then kill them on completion; this means that we can now run db-prefill without any prior setup (after `npm install`).
...
This makes use of redis pub/sub to detect when the API and persona-faker servers are set up, so it requires each to send a message after launching their HTTP server so that db-prefill can begin the pre-fill process. If you have already run `npm install` with persona-faker, you will need to run `npm install` again to receive this change on persona-faker.
2014-02-15 20:47:53 -08:00
Andrew Richardson
9f9de8d289
Merge pull request #76 from cvan/db-pre-fill
...
DB prefill script
2014-02-13 11:01:02 -08:00
Andrew Richardson
50e336e3f7
Added sample usage for promiseMap, converted remaining uses of request.post to use postPromise, and made more style fixes
2014-02-11 13:14:38 -08:00
Andrew Richardson
68458f7c77
Merge pull request #50 from cvan/profile-api
...
Added API for updating username and email for a given user
2014-02-11 01:51:26 -08:00
Andrew Richardson
d359924ddc
Removed an entire line of code
2014-02-11 01:39:53 -08:00
Andrew Richardson
702b98a252
Style fixes
2014-02-11 00:51:04 -08:00
soedar
5cb114ce2f
Merge pull request #81 from soedar/leaderboard
...
Leaderboard: /board endpoint should include data from each board of the game (#62 )
2014-02-10 22:52:20 -08:00
Andrew Richardson
27814c04bd
Cleaned up log statements
2014-02-10 19:41:24 -08:00
Andrew Richardson
9a202ed66a
Merge branch 'master' into profile-api
2014-02-09 12:05:55 -08:00
Charles Chong
eeb3f4368e
simple style fixes
2014-02-09 12:58:09 -08:00
soedar
b4b33ba700
Updated the leaderboard library function, and first pass at including leaderboard data ( #62 )
2014-02-09 11:36:01 -08:00
soedar
49ca576404
Abstracted out leaderboard methods into leaderboard.js
2014-02-09 10:56:07 -08:00
Andrew Richardson
bac22f75db
Fixed typos, bugs, and improved error handling
2014-02-09 10:55:11 -08:00
soedar
5fe540fdbd
Merge pull request #66 from cvan/game-lib
...
store games in redis - WIP (#31 )
2014-02-09 10:37:46 -08:00
Andrew Richardson
e4bfe2b232
Refactored profile updating into updateUser, which is now much more elaborate, and updated existing uses of updateUser to be asynchronous
2014-02-09 10:23:10 -08:00
soedar
1640f1024b
Updated manifest to use the new game lib APIs
2014-02-08 17:33:58 -08:00
Evan Alexander Moore
10280c8d2f
Merge pull request #72 from cvan/dev_search
...
+Create a list of developer id's under a company slug in redis. Update list when company Slug is changed
+Add method for getting all developer id's under a company slug
+Add method for getting company info for a developer slug (along with helper method that picks info to return)
+Add devSlug parameter to search against
+if devSlug parameter specified, search for company info
2014-02-08 17:22:47 -08:00
emoore24
03335cedb0
space fixes
2014-02-08 17:20:58 -08:00
soedar
9a47fa9d9d
Detail and submit now uses redis as datastore
2014-02-08 16:01:59 -08:00
soedar
79bf240c7f
Removed old slug in the UpdateGame call
2014-02-08 15:46:24 -08:00
soedar
ca1a5de876
Fixed stylistic issues from pull request ( #31 )
2014-02-08 15:15:38 -08:00
soedar
7348f94d4d
Removed unnecessary leaderboard require
2014-02-08 15:15:38 -08:00
soedar
b64f8fc57b
Replace occurrence of email with slug
2014-02-08 15:15:38 -08:00
Christopher Van
6a61913c26
store games in redis - WIP ( #31 )
2014-02-08 15:15:38 -08:00
emoore24
cccc00d0b8
only add to developer list when company slug is changed
...
+ When company slug is updated, add to new developer list.
+ fix typo with returning support url
+ restructure error callbacks for more info
2014-02-08 15:05:08 -08:00
soedar
06a93dfca8
add leaderboard view endpoints ( fixes #52 )
2014-02-08 14:28:19 -08:00
emoore24
bbd84c99c1
some internal documentation
2014-02-08 13:57:07 -08:00
emoore24
b47ff1902e
Merge branch 'master' of https://github.com/cvan/galaxy-api into dev_search
2014-02-08 13:01:43 -08:00
Andrew Richardson
9a3bd8cd2f
Added utils API for creating a promise map (takes a map of keys to promises, returns a map of keys to results)
2014-02-08 12:57:30 -08:00
emoore24
79282f53d9
Add way to get company info from Dev Slug
...
+ Add list in redid matching slug to devleopers
+ Add method to get ids of developers from slug
+ Add method to grab avatar, companyName, homepage, support urls from
developer slug
2014-02-08 11:21:10 -08:00
emoore24
f8f5585e6f
Merge branch 'master' of https://github.com/cvan/galaxy-api into user_acl
2014-02-08 09:38:23 -08:00
emoore24
db7ad55dc8
Add admin to basic ACL
...
+ Add “admin” to “permissions” property
+ Allow change to “admin” permission
2014-02-07 19:15:53 -08:00
emoore24
e3656b3253
Basic ACL
...
+ Add acl.js file to app.js
+ Add properties “permissions”, “homepage”, “support”, “companyName”,
and “companySlug” to user
+ change login to return permissions
+ Add ability to set developer and reviewer permissions
2014-02-07 18:33:14 -08:00
Andrew Richardson
2bbf8edd00
Apparently JS doesn't do ternary shorthand...
2014-02-07 17:19:07 -08:00
Andrew Richardson
3bf23c71f8
Moved Persona verification URL to settings.js so that it can be overridden by settings_local.js
2014-02-07 16:55:48 -08:00
Christopher Van
90fc7c82b9
use utils.now in lib/user
2014-02-07 16:39:31 -08:00
emoore24
689990b78a
Fix Formatting issues
...
+ move require to “third-party requires” section
+ add more newlines between newUser and updateUser
+ Make now() function indent 4 spaces
2014-02-07 16:19:56 -08:00
emoore24
9f4b7d194b
create user.userUpdate, add last date login
2014-02-07 15:39:21 -08:00
Matt Basta
b904f58723
Get leaderboards and notifications working right
2013-12-20 14:18:39 -08:00
Matt Basta
9628b79986
Fix typo in eachFriend
2013-12-20 13:07:27 -08:00
Matt Basta
28825a4d81
Notify friends when online/playing a game
2013-12-19 20:57:27 -08:00
Chris Van
7486a863ad
return user/search results as a list (WIP)
2013-12-19 20:34:03 -08:00
Matt Basta
7f7d222f79
Add blob pubsub interface
2013-12-19 18:18:58 -08:00
Matt Basta
0cd91fca6c
Add client-side friends service
2013-12-19 17:39:28 -08:00
Matt Basta
cf30dcceba
Playing/donePlaying APIs in the client
2013-12-19 17:05:07 -08:00
Matt Basta
cab3057812
WIP client services
2013-12-19 16:39:02 -08:00
Chris Van
12d62d0556
friends WIP
2013-12-18 17:24:21 -08:00
Chris Van
15870e063e
add game/board API
2013-12-18 15:53:16 -08:00
Chris Van
e77f174669
fix uuid require
2013-12-18 13:37:40 -08:00
Matt Basta
326367a58a
Abstract user ID lookups
2013-12-18 13:05:55 -08:00
Matt Basta
4c1b1b6481
Add a plethora of errors to the leaderboard updater
2013-12-18 12:50:56 -08:00
Matt Basta
3dcfc8fce6
Check that a user can play games that the `playing` command is sent for.
2013-12-18 12:47:20 -08:00
Matt Basta
8b8f9bbf54
Expose a stable way to access user data from email and ID
2013-12-18 12:34:25 -08:00
Matt Basta
d3facf6248
Fix user-related conflicts
...
- Prevent multiple connections from the same user
- Add a concept of user ID
- Use ID instead of username for keys
- Add an asynchronous mechanism to `authenticate` to allow negative feedback to the client
2013-12-18 12:21:05 -08:00
Chris Van
8fd3cb0bfd
check game ownership when user updates leaderboard ( fixes #6 )
2013-12-18 11:56:11 -08:00
Chris Van
56c058ad39
fix leadboard import from lib/user
2013-12-18 11:23:36 -08:00
Matt Basta
9c78465b11
Fix user.js to use async redis
2013-12-18 08:42:25 -08:00
Matt Basta
414c1b3450
sismember is async, not synchronous
2013-12-18 08:37:51 -08:00
Chris Van
0b3e5a93a1
record all games a user has played
2013-12-18 02:55:17 -08:00
Chris Van
c34864c633
leaderboard goodness and user abstraction
2013-12-18 02:55:16 -08:00
Chris Van
8760792ff1
move utils to lib/utils
2013-12-14 16:01:08 -08:00