Git Product home page Git Product logo

api's Introduction

About the API

This is a Brawl Stars (Game by Supercell) API (details below)

{
    "base_url": "https://brawl-stars.herokuapp.com/api", 
    "endpoints": [
        "players/:tag", 
        "bands/:tag", 
        "events" 
    ], 
    "github":"https://github.com/brawlstarsAPI/api" 
}

The above JSON object can be retrieved by doing a GET Request to either / or /api

All requests should be GET requests

Every response by the API is a JSON object. In any case we respond with a non-JSON object, please create an issue so we can fix the error.

Errors

When the API provides an error, it uses the following format:

{
    "error": true,
    "message": "A message describing the error",
    "code": 504,
    "details": "Additional details, may or may not be provided by the API"
}

Error Codes

Code Definition Notes
200 OK
400 Bad Request You might be missing the User-Agent header, refer below
403 Forbidden You might be blocked by the API, refer below
404 Invalid Endpoint
404 Invalid Tag
500 Unexpected Error This is an error on our side and we will fix it ASAP. This would have a details field.
504 API Down

What about Authentication?

We have not started using API Keys on the API but we might if too many people start using the API.

For now, please provide a User-Agent header in your request with the name of your application (This will be made necessary in the next API Update)

Users without the User-Agent header will be returned with a 400 Bad Request once this is implemented.

For example: User-Agent: https://www.brawlstarsstats.com

This would allow us to identify, and possibly contact the people using the API before we blacklist the IP Address.

Blacklisted

I'm blacklisted! What can I do?
To appeal, create an issue on this github repository with the following details:

  • Your value in the User-Agent header
  • Reason why your application made that many requests to the API
  • How you fixed that issue

If, for some reason, you did not set a User-Agent header and got blacklisted, there is no way to appeal as of now (unless you would like to let everyone see your IP Address)

api's People

Contributors

kranemax avatar sharpbit avatar umbresp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

api's Issues

Api state

Hi, i see the api not working, have any plans to work again?

Invalid authorization

I have an Invalid authorization problem when I use the API. According to the README file, the error code is 403, and I need to set the User-Agent to use the API, but I don't know how to set the User-Agent, so can you help me?

WHY IS THE API DOWN?!!!

Hey can I get whitelisted
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

Edit by API Author
The following reply describes why the API is down and the conversation below refers to that topic as well.

/api/events returns 404 not found

Pretty self-explanatory title.

{  
    "status":{  
        "error":true,
        "message":"Invalid Page, maybe you meant /api",
        "code":404
    }
}

(/api/bands/{tag} returns 404 as well.)

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.