From 8c6f2245c13220d79b27a0b263b462015d0e4e5d Mon Sep 17 00:00:00 2001 From: Egor Kuzmichev Date: Fri, 5 Dec 2025 12:18:34 +0200 Subject: [PATCH 1/2] docs: Update API documentation to reflect the deprecation of the old endpoint and provide the new URL --- docs/dev/api.md | 12 ++++++++---- .../current/dev/api.md | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/dev/api.md b/docs/dev/api.md index dc9a676..f887bc1 100644 --- a/docs/dev/api.md +++ b/docs/dev/api.md @@ -9,6 +9,10 @@ sidebar_position: 3 # PastVu API +:::warning Deprecated Endpoint +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://pastvu.com/_p/d/` for standard size; @@ -28,7 +32,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 +44,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 +62,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 +79,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..df6da5e 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md @@ -9,6 +9,10 @@ sidebar_position: 3 # PastVu API +:::warning Устаревший адрес +API `https://pastvu.com/api2` устарел. Пожалуйста, обновите ваши интеграции для использования нового адреса `https://api.pastvu.com/api2`. +::: + :::info Для получения фото, необходимо к URL добавить содержимое поля `file` из ответа API метода: * `https://pastvu.com/_p/d/` для стандартного размера; @@ -28,7 +32,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 +44,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 +62,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 +79,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]]]}}` From 056e45b625d97adf7623cfb26d5b1f521259f0ae Mon Sep 17 00:00:00 2001 From: Egor Kuzmichev Date: Fri, 5 Dec 2025 12:27:46 +0200 Subject: [PATCH 2/2] docs: update image URL formats and clarify deprecated endpoints --- docs/dev/api.md | 8 +++++++- i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/dev/api.md b/docs/dev/api.md index f887bc1..95df2dd 100644 --- a/docs/dev/api.md +++ b/docs/dev/api.md @@ -9,12 +9,18 @@ sidebar_position: 3 # PastVu API -:::warning Deprecated Endpoint +:::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. 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 df6da5e..b7954b8 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md @@ -15,6 +15,12 @@ API `https://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/` для миниатюры.