loginWithIDFV
(idfvToken
)
Logs into Meteor with an IDFV token, the result of [[UIDevice currentDevice] identifierForVendor]
.
heartbeat
(location
)
Lets the server know the client is connected in real time. location
is an array of [float latitude, float longitude]
.
findAnyGame
Returns a _id
of an open game. Returns null
if no game is found.
createEmptyGame
(title
, password
, location
)
Returns the _id
of a new game with the given title, password and location of form [float latitude, float longitude]
. You still have to join the game after you create an empty one.
joinGame
(gameId
)
Joins the game with gameId
. Your subscriptions will update with player
documents for all the players, vote
documents for the round-by-round winners, and hand
documents, each representing a card in your hand.
submitAnswerCard
(gameId
, answerId
)
Submits the card with id answerId
to the game gameId
for the current round. Returns the _id
of the submission
document generated by submitting an answer card in your hand.
pickWinner
(gameId
, answerId
)
If you're the judge, picks the card answerId
among the submissions
as the winning card. Returns the _id
of the vote
document generated by picking a winner. Then, ends the round, drawing new hands and incrementing the game
document with _id
gameId
's round
. Called by anyone when there exists a vote
document for the round.
combineCardsForUser
(adjectiveCardId
, nounCardId
)
Combines an adjective and noun in the user's inventory by card IDs.