Code Monkey home page Code Monkey logo

appsagainsthumanity-firebase's Introduction

Apps Against Humanity - Firebase

CI

Functions

Location: /functions

startGame({'game_id': 'some_game_document_id'})

Type: Callable HTTPS

Seed the start of a game. It will take the initialized set of card sets and pull a random selection of cards to seed the game with. It will then generate the first turn, and deal the cards from the pool to all the players.


joinGame({'gid': 'some_game_code', 'name': 'The name of player joining', 'avatar': 'the avatar image url of player'})

Type: Callable HTTPS

Join the game as a player, checking if the game is full yet and writing the appropriate documents


leaveGame({'game_id': 'some_game_document_id'})

Type: Callable HTTPS

Leave a game and remove your reference to it in the past games list


kickPlayer({'game_id': 'some_game_document_id', 'player_id': 'some_player_id'})

Type: Callable HTTPS

Kick a player out of your current game. This can only be called by the game owner.


pickWinner({'game_id': 'some_game_document_id', 'player_id': 'winning_player_id})

Type: Callable HTTPS

Let's the judge pick the winner of the turn.


reDealHand({'game_id': 'some_game_document_id'})

Type: Callable HTTPS

Exchange 1 prize card for a new hand.


wave({'game_id': 'some_game_document_id', 'player_id': 'player_to_wave_to_id', 'message': 'optional messsage to send'})

Type: Callable HTTPS

Send a notification to a user, a wave if you will, to get them to re-engage with the game.


downvotePrompt()

Type: Firestore onUpdate()
Resource: games/{gameId}/downvotes/tally

Check if there have been 2/3 majority downvotes on the current prompt card. If so, it will return any submitted responses and reset the turn with a new prompt maintaining the current judge.


updateUserProfile()

Type: Firestore onUpdate()
Resource: users/{userId}

When a user updates their name or avatar url we need to retro update all of their Player objects on any games.


accountDeletion()

Type: Authentication onDelete()

If a user deletes his/her/they account, then delete all the user data from firestore as well as remove them from participating games.

appsagainsthumanity-firebase's People

Contributors

r0adkll avatar sonolumin avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.