The essentials

Authentication

The API requires each client to use OAuth 2 authentication.
This means you’ll have to register your application,
and generate an access_code if you’d like to log in as a user.

For public read-only and anonymous resources, such as
getting image info, looking up user comments, etc. all you
need to do is send an authorization header with your
client_id in your requests. This also works if you’d like to
upload images anonymously (without the image being tied to
an account), or if you’d like to create an anonymous album.
This lets us know which application is accessing the API.

Authorization: Client-ID YOUR_CLIENT_ID

Responses

Each response is wrapped in a data tag. This means if you
have a response, it will always be within the data field. We
also include a status code and success flag in the response.
For more information and examples go to the data models page.

Responses are either JSON (the default), JSONP, or XML. Response
formats are specified by supplying an extension to the API
call. For example, if you want to access the gallery
information with JSON:

https://api.imgur.com/3/gallery.json

JSONP responses are made by adding the
callback parameter via either GET
or POST to the request. For example:

https://api.imgur.com/3/gallery.json?callback=function_name

and to specify an XML response, the URL is:

Rate Limits

The Imgur API uses a credit allocation system to ensure fair
distribution of capacity. Each application can allow
approximately 1,250 uploads per day or approximately
12,500 requests per day. If the daily limit is hit
five times in a month, then the app will be blocked for the
rest of the month. The remaining credit limit will be shown
with each requests response in the
X-RateLimit-ClientRemaining HTTP header.

We also limit each user (via their IP Address) for each
application, this is to ensure that no single user is able
to spam an application. This limit will simply stop the user
from requesting more data for an hour. We recommend that
each application takes precautions against spamming by
implementing rate limiting on their own applications. Each
response will also include the remaining credits for each
user in the X-RateLimit-UserLimit
HTTP header.

Each request contains rate limit information in the HTTP
response headers.

HTTP HeaderDescription
X-RateLimit-UserLimitTotal credits that can be allocated.
X-RateLimit-UserRemainingTotal credits available.
X-RateLimit-UserResetTimestamp (unix epoch) for when the credits will be reset.
X-RateLimit-ClientLimitTotal credits that can be allocated for the application in a day.
X-RateLimit-ClientRemainingTotal credits remaining for the application in a day.

Unless otherwise noted, an API call deducts 1 credit from
your allocation. However, uploads have a significantly
higher computational cost on our back-end, and deduct 10
credits per call. All OAuth calls, such as refreshing tokens
or authorizing users, do not deduct any credits.

You can also check the current rate limit status on your
application by sending a GET request to
https://api.imgur.com/3/credits

Your use of the Imgur API is also limited by the number of POST
requests your IP can make across all endpoints. This limit
is 1,250 POST requests per hour.
is not impacted by this limit.
Each POST request will contain the following headers.

HTTP HeaderDescription
X-Post-Rate-Limit-LimitTotal POST credits that are allocated.
X-Post-Rate-Limit-RemainingTotal POST credits available.
X-Post-Rate-Limit-ResetTime in seconds until your POST ratelimit is reset

[Бонус] Вспомогательные онлайн-инструменты для графики.

Сервисы снятия скриншотов (онлайн)обзорБыстрая публикация скриншотовscrnshots.comпрограммой-клиентом (Win, Mac)Есть APIZScreenобзорClip2Netобзорmy.jetscreenshot.comrrudкраткий список смежных онлайн-сервисов рисованиябез обязательной авторизацииfotoflexer.comграфический редакторfanstudio.ru/index.phpдля фотоpixenate.compixer.usтолько для фотоpixlr.com/editorпохожи на Photoshoppicnik.com/appбез рисованияна фотоОнлайн фотошоп бесплатнообзор29 веб-сайтов для онлайн обработки фотографийобзорdraw.labs.autodesk.com/ADDraw/draw.htmlVisio-подобное построениеdrawanywhere.com/demo.aspxfooplot.comграфики 2D/3DПример sin(x)/xextra.amcharts.com/editorгистограмм, диаграмм по массивам данных

[1] Другие обзоры хостингов (ссылки на статьи).

Фотография в Интернете или онлайн-сервисы для хранения фотографий. Часть 1 – «Не наши»(20 августа 2007 г.)flickr.compicasaweb.google.commyphotoalbum.comfotki.comФотография в Интернете или онлайн-сервисы для хранения фотографий. Часть 2 – «Наши»(21 августа 2007 г.)fotki.yandex.rufoto.mail.rufoto.rambler.ruphotofile.rupixart.ruphotoshare.ruСписок сервисов, специализирующихся на бесплатном хостинге изображений(только ссылки; 2010)Smagesphotohost.ru foto.lib.ruФотопленка.rumoifoto.ruМобильный фотоблог mopoto.comфламберzamri.ruGallery.ruКраткий обзор хостингов с API(.09.2009)ImageShack.us APIapi.yandex.ru/fotki/aws.amazon.com/s3thefreesite.com/Free_Image_Hosting

Оцените статью
Рейтинг автора
5
Материал подготовил
Андрей Измаилов
Наш эксперт
Написано статей
116
Добавить комментарий