Code Monkey home page Code Monkey logo

footydao-sygma-server's Introduction

FootyDAO-server

Sigma Endpoint

POST

api/web3/collect-money - owner of the game

// PARAMS
{
    "gameId" : "1"
}

Game API

POST

api/game/add - ONLY ADMIN

// PARAMS
{
    "description" : "Play football with friends at ETH Barcelona",
    "title" : "Eth Barcelona Footie",
    "profilePic" : "www.google.com",
    "maxParticipants" : 20,
    "city" : "Barcelona",
    "country" : "Spain",
    "date" : "2011-08-20",
    "time" : "20.30",
    "web3Event" : "Eth Barcelona",
    "stake" : "0.1",
    "pics" : []
}

api/game/join - ONLY AUTHENTICATED USER

// PARAMS
{
    "gameId" : "64a1987f2e067205af52ba33",
    "amount" : 2 // the amount of people you want to register
}

GET

api/game/all

//RESPONSE
[
    {
        "_id": "64a1987f2e067205af52ba33",
        "description": "Play football with friends at ETH Barcelona",
        "profilePic": "www.google.com",
        "title": "Eth Barcelona Footie",
        "participants": [
            "jrcarlos2000",
            "jrcarlos2000",
            "jrcarlos2000",
            "jrcarlos2000",
            "carlosramos",
            "carlosramos"
        ],
        "maxParticipants": 20,
        "city": "Barcelona",
        "country": "Spain",
        "date": "2011-08-20",
        "time": "20.30",
        "web3Event": "Eth Barcelona",
        "stake": 0.1,
        "totalStake": 0,
        "pics": [],
        "__v": 3
    }
]

api/game/:id

// RESPONSE
{
    "_id": "64a1987f2e067205af52ba33",
    "description": "Play football with friends at ETH Barcelona",
    "profilePic": "www.google.com",
    "title": "Eth Barcelona Footie",
    "participants": [
        "jrcarlos2000",
        "jrcarlos2000",
        "jrcarlos2000",
        "jrcarlos2000",
        "carlosramos",
        "carlosramos"
    ],
    "maxParticipants": 20,
    "city": "Barcelona",
    "country": "Spain",
    "date": "2011-08-20",
    "time": "20.30",
    "web3Event": "Eth Barcelona",
    "stake": 0.1,
    "totalStake": 0,
    "pics": [],
    "__v": 3
}

User API

POST

GET

api/user/info - ONLY AUTHENTICATED USER

// RESPONSE
{
    "_id": "64a172e005b5bf9d5013e9f6",
    "username": "carlosramos",
    "roles": [
        "649e6ef543aa6819460df259"
    ],
    "project": "EduDAO",
    "location": "Kuala Lumpur",
    "twitter": "jrcarlos2000",
    "telegram": "jrcarlos2000",
    "dateJoined": "2023-07-02T12:51:44.982Z",
    "__v": 2,
    "games": [ // reduced amount of fields
        {
            "_id": "64a1987f2e067205af52ba33",
            "description": "Play football with friends at ETH Barcelona",
            "profilePic": "www.google.com",
            "title": "Eth Barcelona Footie",
            "city": "Barcelona",
            "country": "Spain",
            "date": "2011-08-20",
            "time": "20.30"
        }
    ]
}

footydao-sygma-server's People

Contributors

jrcarlos2000 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.