Git Product home page Git Product logo

api_credigame's Introduction

api_credigame

API para aplicato mobile credigame

Install

yarn || npm install

Run the app

yarn dev || npm dev

Create New User

Request

POST /users/register/

curl -i -H 'Accept: application/json' http://localhost:3333/users/register/

`Body: { name: string; lastName: string; email: string; password: string; }

`

Response

HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 2

[]

Auth User

Request

POST /users/auth/

curl -i -H 'Accept: application/json' -d 'email=string&password=string'  http://localhost:3333/users/auth

`Body: { email: string; password: string; }

`

Response

HTTP/1.1 201 Created
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 201 Created
Connection: close
Content-Type: application/json
Location: /thing/1
Content-Length: 36

{"success": true, "user": { "name": string }, "token": string}

Update User Score

Request

POST /users/update-score

curl -i -H 'Accept: application/json' -d 'score=10' http://localhost:3333/users/update-score

`Should be Authenticaded with Bearer Token on Header, generated on /users/auth`

Body: { score: number }

Response

HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 36

{"success": true, "message": "User score successfuly updated"}

User's Ranking TOP 10

Request

POST /users/ranking

curl -i -H 'Accept: application/json' -d 'score=10' http://localhost:7000/users/update-score

`Should be Authenticaded with Bearer Token on Header, generated on /users/auth`

Response

HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 36

{"success": true,"data": [{"name": string,"lastName": string,"score": number},{"name": string,"lastName": string,"score": number}]

api_credigame's People

Contributors

diegocastro-r 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.