Basketball Devs

FREEMIUM
By SportDevs | Updated il y a un mois | Sports
Popularity

9.1 / 10

Latency

397ms

Service Level

57%

Health Check

N/A

Followers: 5
Resources:
Product Website Terms of use
API Creator:
Rapid account: Sport Devs
SportDevs
sportdevs
Log In to Rate API
Rating: 5 - Votes: 1

README

Getting started

Hello from the SportDevs team. For you as a customer, it is of vital importance to be properly instructed on how to effectively use and integrate with our APIs. In this documentation you will get multiple explanations about all the endpoints.

You can see the code examples which are written in several programming languages such as C#, cURL, Go, Javascript, NodeJs, PHP, Python, Ruby, and many more!

Furthermore, we have request generation utility for our APIs for the purpose of calling API endpoints using JavaScript.
This utility is available on https://github.com/SportDevs/endpoint.

RapidAPI Authentication

You can see the RapidApi developer dashboard (https://rapidapi.com/developer/dashboard) to learn about your subscription details: API keys location, analytics, billing settings and apps.

Click on the tabs on the left-hand side of the screen to get more information.

App Specific Analytics

On the RapidAPI developer dashboard, you can access analytics for every app in your account. In order to do that, click on the ‘Analytics’ tab of your app.
The chart you see on the top of the page represents all the calls being made to all the APIs your application is connected to.

You’ll also be able to see a log with all the request data. By filtering you can choose which APIs should be shown in the app.

You can view these measurements in every graph:

  • API Calls: how many requests are being made
  • Error rates: how many requests are error some
  • Latency: how long it takes to get a response to an API request

You can also change the time period you’re looking at if you click on the calendar icon and choose a time range.

Headers sent as response

When consuming our API, you will always receive the following headers appended to the response:

  • server: The current version of the API proxy used by RapidAPI.
  • x-ratelimit-requests-limit: The number of requests the plan you are currently subscribed to allows you to make, before incurring overages.
  • x-ratelimit-requests-remaining: The number of requests remaining before you reach the limit of requests your application is allowed to make, before experiencing overage charges.
  • x-rapidapi-proxy-response: This header is set to true when the RapidAPI proxy generates the response, (i.e. the response is not generated from our servers)

Logos and images

Logos and images are completely free of charge.

The URL to request logos and images is:

> https://images.sportdevs.com/{hash}.png

We offer logos and images for:

  • Classes
  • Arenas
  • Leagues
  • Teams
  • Players
  • Referees
  • Coaches

WebSockets

> You can get WebSockets access with any active API key. We don’t charge for WebSockets.

We offer WebSockets for various types:

  • score { “sport”: “sport”, “match_id”: 1, “score”: 2, “team_id”: 1 }
  • time { “sport”: “sport”, “match_id”: 1, “specific_start_time”: “time”, “period_1”: 23, “period_2”: 35, “period_3”: 32, “period_4”: 12 }
  • graph { “sport”: “sport”, “match_id”: 1, “minute”: 23, “value”: 3 }
  • incident { “sport”: “sport”, “match_id”: 1, “type”: “type”, “text”: “text”, “home_score”: 2, “away_score”: 1, “is_live”: true, “added_time”: 1, “length”: 54, “player_id”: 3, “player_name”: “Name”, “player_hash_image”: “hash”, “reason”: “reason”, “is_home”: true, “class”: “class”, “player_in_id”: 1, “player_in_hash_image”: “hash”, “player_out_id”: 4, “player_out_name”: “Name”, “player_out_hash_image”: “hash”, “assist1_id”: 3, “assist1_name”: “Name”, “assist1_hash_image”: “hash”, “assist2_id”: 23, “assist2_name”: “Name”, “assist2_hash_image”: “hash” }

Get all updates by type using websockets

const ws = new WebSocket('wss://{sport}.sportdevs.com/live/{type}?token={API-KEY}', ['updates'])
ws.addEventListener('message', ev => console.log(ev.data))

Get all updates by type using server sent events

const es = new EventSource('https://{sport}.sportdevs.com/live/{type}?token={API-KEY}')
es.addEventListener('message', ev => console.log(ev.data))

Get changes for a specific event ID and type using websockets

const ws = new WebSocket('wss://{sport}.sportdevs.com/live/{type}/1?token={API-KEY}', ['updates'])
ws.addEventListener('message', ev => console.log(ev.data))

Get changes for a specific event ID and type using server sent events

const es = new EventSource('https://{sport}.sportdevs.com/live/{type}/1?token={API-KEY}')
es.addEventListener('message', ev => console.log(ev.data))

For more info about WebSockets visit this: https://developer.mozilla.org/en-US/docs/Web/API/EventSource