Coder Social home page Coder Social logo

bebeerapi's Introduction

BeBeerAPI

API Reference

Root

get

Returns the informations you are currently seeing.

URL: GET /

Beer

getBeers

Returns a paginated list of beers.

URL: GET /beers

URL parameters
count
type: 'integer'
minimum: 1
maximum: 30
default: 20
offset
type: 'integer'
minimum: 0
default: 0
name
type: 'string'
default: ''
minLength: 1
maxLength: 100

getBeer

Returns a beer from its id.

URL: GET /beers/:id

URL parameters
id
description: 'the id of the beer'
type: 'string'
pattern: '^[0-9]+$'
required: true
maxLength: 10

rateBeer

Rate a beer.

URL: POST /beers/:id/ratings

URL parameters
id
description: 'the id of the beer'
type: 'string'
pattern: '^[0-9]+$'
required: true
maxLength: 10
Request body
rating
type: 'integer'
minimum: 0
maximum: 5
required: true

getRatings

Returns the given beer rating.

URL: GET /beers/:id/ratings

URL parameters
id
description: 'the id of the beer'
type: 'string'
pattern: '^[0-9]+$'
required: true
maxLength: 10

Brewery

getBreweries

Returns a paginated list of breweries.

URL: GET /breweries

URL parameters
count
type: 'integer'
minimum: 1
maximum: 30
default: 20
offset
type: 'integer'
minimum: 0
default: 0
name
type: 'string'
default: ''
minLength: 1
maxLength: 100

getBrewery

Returns the brewery corresponding to the given name.

URL: GET /breweries/:id

URL parameters
id
type: 'string'
default: ''
minLength: 1
maxLength: 100

getBeers

Returns the beers brewed by the given brewery.

URL: GET /breweries/:id/beers

URL parameters
id
type: 'string'
default: ''
minLength: 1
maxLength: 100

User

createUser

Creates an user with the given data.

URL: POST /users

Request body
username
type: 'string'
default: ''
format: /^[a-z0-9\-_]+$/
minLength: 3
maxLength: 50
required: true
email
type: 'string'
format: 'email'
default: ''
required: true
password
type: 'string'
default: ''
minLength: 6
maxLength: 50
required: true

getUser

Returns the user with the given username.

URL: GET /users/:id

URL parameters
id
type: 'string'
default: ''
format: /^[a-z0-9\-_]+$/
minLength: 3
maxLength: 50
required: true

Auth

auth

Authenticates the user with the given credentials.

URL: POST /auth

Request body
username
type: 'string'
default: ''
format: /^[a-z0-9\-_]+$/
minLength: 3
maxLength: 50
required: true
password
type: 'string'
default: ''
minLength: 6
maxLength: 50
required: true

getAuth

Returns the current authentication.

URL: GET /auth

deleteAuth

Deauthenticates the user.

URL: DEL /auth

bebeerapi's People

Contributors

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