Giter VIP home page Giter VIP logo

chicken-server's Introduction

chicken-server

Intro

After installing all dependencies, you can use the database initialization tool to create the schema and fill it with frame data.

node server/database/init.js

NOTE: This server uses the following environment variables to connect to your MySQL database:

DB_USER
DB_PASS
DB_NAME(Optional, defaults to "tekkenchicken")
DB_HOST(Optional, defaults to "localhost")
DB_PORT(Optional, defaults to "3306")

Updating frame data

(Note: If you've never setup the server before, you'll need to npm run init first to initialize the db.

Frame data is pulled from a remote repository harounb/tekken-frame-data as a submodule. First we need to update the submodules:

git submodule update --recursive --remote

Next, you can run the update script to populate our db with the latest framedata:

npm run update

API Requests

Metadata Request

http://tc.tekkengamer.com/api/metadata/

A Metadata Request returns an object containing all information about all the character data in the database. It contains key data for accessing other info like character ids and labels.

Sample Response

GET http://tc.tekkengamer.com/api/metadata/
{
  "alisa" : {
    "id" : 1,
    "name" : "Alisa Bosconovich",
    "label" : "alisa",
    "game":  "t7",
    "last_updated" : 1492900842
  }
}

Framedata Request

http://tc.tekkengamer.com/api/framedata/

This is your primary giant blob request. It returns an object full of all characters' framedata indexed by the characters' labels.

Sample Response

GET http://tc.tekkengamer.com/api/framedata/
{
  "alisa": {
    "name":"Alisa Bosconovich",
    "label":"alisa",
    "data":[
      {
        "notation" : "1",
        "hitLevel" : "h",
        "damage" : "9",
        "speed" : "10",
        "on_block" : "+1",
        "on_hit" : "+8",
        "on_ch" : "+8",
        "notes" : "null"
      }
    ]
  }
}  

Single Framedata Request

http://tc.tekkengamer.com/api/framedata/{id|label}

You can request frame data for individual characters using their id or label

Sample Response

GET http://tc.tekkengamer.com/api/framedata/bryan
{
  "name" : "Bryan Fury",
  "label" : "bryan",
  "data":[
    {
      "notation" : "1",
      "hitLevel" : "h",
      "damage" : "9",
      "speed" : "10",
      "on_block" : "+1",
      "on_hit" : "+8",
      "on_ch" : "+8",
      "notes" : "null"
    }
  ]
}

chicken-server's People

Contributors

bdickason avatar nhusher avatar srstafford1996 avatar

Watchers

 avatar

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.