diff --git a/docs/dev/api.md b/docs/dev/api.md index dc9a676..95df2dd 100644 --- a/docs/dev/api.md +++ b/docs/dev/api.md @@ -9,8 +9,18 @@ sidebar_position: 3 # PastVu API +:::warning Deprecated +The API endpoint `https://pastvu.com/api2` has been deprecated in favor of `https://api.pastvu.com/api2`. Please update your integrations to use the new endpoint. +::: + :::info To retrieve a photo, you need to add the contents of the `file` field from the API method response to the URL: +* `https://img.pastvu.com/d/` for standard size; +* `https://img.pastvu.com/a/` for original size; +* `https://img.pastvu.com/h/` for thumbnail size. +::: + +:::warning Deprecated * `https://pastvu.com/_p/d/` for standard size; * `https://pastvu.com/_p/a/` for original size; * `https://pastvu.com/_p/h/` for thumbnail size. @@ -28,7 +38,7 @@ cid | ✓ | int | unique photo number | **Query example:** -`https://pastvu.com/api2?method=photo.giveForPage¶ms={"cid":5}` +`https://api.pastvu.com/api2?method=photo.giveForPage¶ms={"cid":5}` ### comment.giveForObj @@ -40,7 +50,7 @@ cid | ✓ | int | unique photo number | **Query example:** -`https://pastvu.com/api2?method=comment.giveForObj¶ms={"cid":23314}` +`https://api.pastvu.com/api2?method=comment.giveForObj¶ms={"cid":23314}` ### photo.giveNearestPhotos Returns an array of photos closest to the passed coordinate. The array is sorted in ascending distance order. @@ -58,7 +68,7 @@ skip | int | | skip the specified number of photos from the beginning of the sea **Query example:** -`https://pastvu.com/api2?method=photo.giveNearestPhotos¶ms={"geo":[37.82,-122.469322],"limit":12,"except":228481}` +`https://api.pastvu.com/api2?method=photo.giveNearestPhotos¶ms={"geo":[37.82,-122.469322],"limit":12,"except":228481}` ### photo.getByBounds @@ -75,5 +85,5 @@ localWork | | bool | 0 | return array of `photos` (set 1 when using zoom value > **Query example:** -`https://pastvu.com/api2?method=photo.getByBounds¶ms={"z":11,"geometry":{"type":"Polygon","coordinates":[[[37.29034423828125,55.56902805913944],[37. 95501708984375,55.56902805913944],[37.95501708984375,55.92150795277898],[37.29034423828125,55.92150795277898],[37.29034423828125,55.56902805913944]]]}}` +`https://api.pastvu.com/api2?method=photo.getByBounds¶ms={"z":11,"geometry":{"type":"Polygon","coordinates":[[[37.29034423828125,55.56902805913944],[37. 95501708984375,55.56902805913944],[37.95501708984375,55.92150795277898],[37.29034423828125,55.92150795277898],[37.29034423828125,55.56902805913944]]]}}` diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md b/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md index 5e9a725..b7954b8 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md @@ -9,8 +9,18 @@ sidebar_position: 3 # PastVu API +:::warning Устаревший адрес +API `https://pastvu.com/api2` устарел. Пожалуйста, обновите ваши интеграции для использования нового адреса `https://api.pastvu.com/api2`. +::: + :::info Для получения фото, необходимо к URL добавить содержимое поля `file` из ответа API метода: +* `https://img.pastvu.com/d/` для стандартного размера; +* `https://img.pastvu.com/a/` для оригинального размера; +* `https://img.pastvu.com/h/` для миниатюры. +::: + +:::warning Устаревшие адреса * `https://pastvu.com/_p/d/` для стандартного размера; * `https://pastvu.com/_p/a/` для оригинального размера; * `https://pastvu.com/_p/h/` для миниатюры. @@ -28,7 +38,7 @@ cid | ✓ | int | уникальный номер снимка | **Пример запроса:** -`https://pastvu.com/api2?method=photo.giveForPage¶ms={"cid":5}` +`https://api.pastvu.com/api2?method=photo.giveForPage¶ms={"cid":5}` ### comment.giveForObj @@ -40,7 +50,7 @@ cid | ✓ | int | уникальный номер снимка | **Пример запроса:** -`https://pastvu.com/api2?method=comment.giveForObj¶ms={"cid":23314}` +`https://api.pastvu.com/api2?method=comment.giveForObj¶ms={"cid":23314}` ### photo.giveNearestPhotos Возвращает массив фотографий, ближайших переданной координате. Массив отсортирован по возрастанию расстояния. @@ -58,7 +68,7 @@ skip | | int | | пропустить указанное количество ф **Пример запроса:** -`https://pastvu.com/api2?method=photo.giveNearestPhotos¶ms={"geo":[37.82,-122.469322],"limit":12,"except":228481}` +`https://api.pastvu.com/api2?method=photo.giveNearestPhotos¶ms={"geo":[37.82,-122.469322],"limit":12,"except":228481}` ### photo.getByBounds @@ -75,5 +85,5 @@ localWork | | bool | 0 | возвращать массив `photos` (следу **Пример запроса:** -`https://pastvu.com/api2?method=photo.getByBounds¶ms={"z":11,"geometry":{"type":"Polygon","coordinates":[[[37.29034423828125,55.56902805913944],[37.95501708984375,55.56902805913944],[37.95501708984375,55.92150795277898],[37.29034423828125,55.92150795277898],[37.29034423828125,55.56902805913944]]]}}` +`https://api.pastvu.com/api2?method=photo.getByBounds¶ms={"z":11,"geometry":{"type":"Polygon","coordinates":[[[37.29034423828125,55.56902805913944],[37.95501708984375,55.56902805913944],[37.95501708984375,55.92150795277898],[37.29034423828125,55.92150795277898],[37.29034423828125,55.56902805913944]]]}}`