Giter VIP home page Giter VIP logo

zssn's Introduction

ZSSN (Zombie Survival Social Network)

System for help non-infected people to share resources

Requirements

The application is deploy here. But if you are using locally, is important fill the default resources:

bundle
rails db:create
rails db:migration
rails db:seed

Routes

Survivors

POST to register a new survivor.

api/survivors

{
  "name": "Zezinho",
  "age": 30,
  "gender": "M",
  "latitude": "-16.346867430274",
  "longitude": "-48.948227763174",
  "infected": false,
  "infection_occurrences": 0,
  "inventory_attributes": {
  		"inventory_resources_attributes": [
	  	    {"resource_id": 1 },
		    {"resource_id": 2 },
                   {...}
	  	]
  }
}

Follow this table of values for assignment the resource to survivor

Item Points
Ammuntion 1 point
Medication 2 points
Food 3 points
Water 4 points

PUT to update a survivor information

/api/survivors

{
    "name": "Zezo",
    ...
}

GET to report a survivor as infected.

/api/survivors/{id}/report_infection

PUT to trade items between survivors.

api/survivors/trade/{survivor1_id}/{resources1}/{survivor2_id}/{resources2}

The resources should follow the pattern count:resource,count:resources,.. (e.g. 1:ammunition,1:food or 1:water)

Reports

GET Percentage of infected survivors.

/api/reports/avg_infected

GET Percentage of non-infected survivors.

/api/reports/avg_non_infected

GET Average amount of each kind of resource by survivor

/api/reports/avg_resource_per_person

GET Points lost because of infected survivor

/api/reports/points_lost_infected`

zssn's People

Contributors

jonaselan avatar

Watchers

 avatar  avatar

Forkers

alfnunes

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.