Coder Social home page Coder Social logo

commander-league's Introduction

commander-league

http://edh.mpaulweeks.com

Circle CI

install

Might need to install sinatra, Ruby dependencies/installation was not documented :(

See crontab

deploy

Push changes to the deploy branch, cron_commander.sh job will automatically pull changes and restart the server.

Public Views

/:user_slug

Example URL

/mpw

/:user_slug/diff

Example URL

/mpw/diff

Public API

/api/user/:user_slug GET

Example URL

/api/user/mpw

Example Response

{
    "user":{
        "slug":"mpw",
        "name":"M. Paul",
        "colors":["B","G"],
        "balance":400
    },
    "cards":{
        "Sakura-Tribe Elder":{
            "name":"Sakura-Tribe Elder",
            "price":25,
            "maindeck":1,
            "sideboard":0,
            "category":"Creature",
            "multiverse":405363
        },
        ...
    },
}

/api/user/:user_slug/diff GET

Example URL

/api/user/mpw/diff

Example Response

{
    "user":{
        "slug":"mpw",
        "name":"M. Paul",
        "colors":["B","G"],
        "balance":400
    },
    "cards":{
        "Sakura-Tribe Elder":{
            "name":"Sakura-Tribe Elder",
            "added": 0,
            "category":"Creature",
            "multiverse":405363
        },
        "Naya Panorama":{
            "name":"Naya Panorama",
            "added":1,
            "category":"Land",
            "multiverse":376424
        },
        ...
    }
}

/api/user/:user_slug/status POST

Example URL

/api/user/eliah/status

Example Request

[
    {
        "name":"Abduction",
        "maindeck":0,
        "sideboard":1,
    },
    {
        "name":"Lightning Greaves",
        "maindeck":1,
        "sideboard":0,
    },
]   

Example Response

{
    "user":{
        "slug":"eliah",
        "name":"Eliah",
        "colors":["U","G"],
        "balance":425,
    },
    "cards":{
        "Abduction":{
            "name":"Abduction",
            "price":null,
            "maindeck":0,
            "sideboard":1,
            "category":"Spell",
            "multiverse":14526,
        },
        "Lightning Greaves":{
            "name":"Lightning Greaves",
            "price":75,
            "maindeck":1,
            "sideboard":0,
            "category":"Spell",
            "multiverse":405284,
        }
    },
}

Database

user
    slug
    name
    colors 

wallet
    user_slug
    delta
    timestamp

card
    name
    price
    price_fetched

status
    user_slug
    card_name
    maindeck
    sideboard
    timestamp

commander-league's People

Contributors

mpaulweeks avatar

Watchers

 avatar  avatar

commander-league's Issues

Prices broken

If getting 0 back from online, should just keep stale prices

Last known good backup commit (it was before $5 insertion): a4b27cb

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.