Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external API limitations and configurations to doc #23

Open
skuill opened this issue Jan 24, 2022 · 6 comments
Open

Add external API limitations and configurations to doc #23

skuill opened this issue Jan 24, 2022 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@skuill
Copy link
Owner

skuill commented Jan 24, 2022

No description provided.

@skuill skuill added the documentation Improvements or additions to documentation label Jan 24, 2022
@skuill skuill changed the title Add external API limitations to doc Add external API limitations and configurations to doc Jan 25, 2022
@skuill skuill assigned skuill and unassigned skuill Jan 25, 2022
@skuill
Copy link
Owner Author

skuill commented Jan 26, 2022

Setlist.fm

Configuration (https://api.setlist.fm/docs/1.0/index.html):
... apply for an API key (link for logged in users only) - if you're no registered user yet, then register first (it's free).

Limitation:

  1. Note that the setlist.fm API is, according to the API terms of service, only free for non-commercial projects.
  2. All of setlist.fm's features are free for you to use. If there are ever features that aren't free to use, we promise not to charge you anything without getting your explicit agreement first.

@skuill
Copy link
Owner Author

skuill commented Jan 26, 2022

Telegram BOT

Configuration: https://telegrambots.github.io/book/1/quickstart.html#bot-father
Bot token is a key that required to authorize the bot and send requests to the Bot API.

Limitation (https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this):
When sending messages inside a particular chat, avoid sending more than one message per second. We may allow short bursts that go over this limit, but eventually you'll begin receiving 429 errors.
If you're sending bulk notifications to multiple users, the API will not allow more than 30 messages per second or so. Consider spreading out notifications over large intervals of 8—12 hours for best results.
Also note that your bot will not be able to send more than 20 messages per minute to the same group.

@skuill
Copy link
Owner Author

skuill commented Jan 26, 2022

Last.fm:

Configuration (https://www.last.fm/api/authentication):

  1. Get an API Key
    You will need to apply for a key (https://www.last.fm/api/account/create) before authenticating with the API.
  2. Configure Your API Account
    Head over to your api accounts page (https://www.last.fm/api/accounts), and select the account you wish to configure. You need to supply an application name, a description and an optional logo. Each of your account pages contains an API key and secret; you will need both to use the API.

Limitation:

  1. Our API is available to anyone. https://www.last.fm/ru/api
  2. https://www.last.fm/api/intro : Be reasonable in your usage of the API and ensure you don't make an excessive number of calls as that can impact the reliability of the service to you and other users. We encourage best practice implementation, for example, if you're making a web application, try not to hit the API on page load. Your account may be suspended if your application is continuously making several calls per second or if you’re making excessive calls. See our API Terms of Service for more information on limits.
  3. https://www.last.fm/api/tos : Rate Limit: Last.fm sets and enforces limits on use of the API to prevent abuse and ensure reliability of service (e.g. limiting the number of API requests that you may make or the number of users you may serve), in our sole discretion. You agree to, and will not attempt to circumvent, such limitations. If you would like to use the API beyond these limits, you must obtain Last.fm’s express consent (and Last.fm may decline such request or condition acceptance on your agreement to additional terms and/or charges for that use). To seek such approval, please contact us via email at partners [at] last [dot] fm.

@skuill
Copy link
Owner Author

skuill commented Jan 26, 2022

MusicBrainz API

Configuration: -

  1. Do I need an API key?
    Currently, no. But you must have a meaningful user-agent string.

Limitation (https://musicbrainz.org/doc/MusicBrainz_API):

  1. Non-commercial use of this web service is free; please see our commercial plans or contact us if you would like to use this service commercially.
  2. https://musicbrainz.org/doc/MusicBrainz_API/Rate_Limiting :
    When a request reaches our servers we check three conditions, in the following order:
    User-Agent string: are we receiving too many requests from this application?
    For user-agents associated with headphones: we allow through (on average) 50 requests per second, and decline (http 503) the rest.
    Source IP address: are we receiving too many requests from this particular IP address?
    Currently that rate is (on average) 1 request per second.
    Global: are the MusicBrainz servers as a whole too busy to handle this request?
    We allow through 300 requests each second (on average), and decline (http 503) the rest.

If the answer to any one of those questions is "yes", then the request is denied with a 503 Service Unavailable error, and processing stops. Otherwise, we continue to the next check. If all checks pass then the request is honoured.

@skuill
Copy link
Owner Author

skuill commented Jan 26, 2022

Spotify

Configuration:

  1. https://johnnycrazy.github.io/SpotifyAPI-NET/docs/client_credentials
    The Client Credentials flow is used in server-to-server authentication. Only endpoints that do not access user information can be accessed. By supplying your SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET, you get an access token.
  2. https://developer.spotify.com/documentation/web-api/quick-start/

Limitation:

  1. https://developer.spotify.com/documentation/web-api/guides/rate-limits/ : If your app makes a lot of Web API requests in a short period of time then it may receive a 429 error response from Spotify. This indicates that your app has reached our Web API rate limit. The Web API has rate limits in order to keep our API reliable and to help third-party developers use the API in a responsible way.

  2. Spotify’s API rate limit is calculated based on the number of calls that your app makes to Spotify in a rolling 30 second window. If your app exceeds the rate limit for your app then you’ll begin to see 429 error responses from Spotify’s Web API, and you may hear from users about unexpected behavior that they have noticed while using your app. The limit varies depending on whether your app is in development mode or extended quota mode.

@skuill
Copy link
Owner Author

skuill commented Jan 26, 2022

Yandex

Configuration:
To access Yandex API you need authorization. You can do it via OAuth token or login/password.
Documentation: https://yandexmusicapicsharp.readthedocs.io/ru/latest/client/root.html

Limitation:
"нет, рейты тут сказочные. Я ловил 429 только ботом при большой количестве скачиваний треков. Больше нигде. И это все пользователи бота с одного IP адреса делают запросы. Полёт нормальный"

@skuill skuill self-assigned this Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

No branches or pull requests

1 participant