Skip to content

Commit ea03927

Browse files
authored
Merge pull request #72 from PastVu/api
docs: Update API documentation to reflect the deprecation of the old …
2 parents 6fa8007 + 056e45b commit ea03927

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

  • docs/dev
  • i18n/ru/docusaurus-plugin-content-docs/current/dev

docs/dev/api.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ sidebar_position: 3
99

1010
# PastVu API
1111

12+
:::warning Deprecated
13+
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.
14+
:::
15+
1216
:::info
1317
To retrieve a photo, you need to add the contents of the `file` field from the API method response to the URL:
18+
* `https://img.pastvu.com/d/` for standard size;
19+
* `https://img.pastvu.com/a/` for original size;
20+
* `https://img.pastvu.com/h/` for thumbnail size.
21+
:::
22+
23+
:::warning Deprecated
1424
* `https://pastvu.com/_p/d/` for standard size;
1525
* `https://pastvu.com/_p/a/` for original size;
1626
* `https://pastvu.com/_p/h/` for thumbnail size.
@@ -28,7 +38,7 @@ cid | ✓ | int | unique photo number |
2838

2939
**Query example:**
3040

31-
`https://pastvu.com/api2?method=photo.giveForPage&params={"cid":5}`
41+
`https://api.pastvu.com/api2?method=photo.giveForPage&params={"cid":5}`
3242

3343
### comment.giveForObj
3444

@@ -40,7 +50,7 @@ cid | ✓ | int | unique photo number |
4050

4151
**Query example:**
4252

43-
`https://pastvu.com/api2?method=comment.giveForObj&params={"cid":23314}`
53+
`https://api.pastvu.com/api2?method=comment.giveForObj&params={"cid":23314}`
4454

4555
### photo.giveNearestPhotos
4656
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
5868

5969
**Query example:**
6070

61-
`https://pastvu.com/api2?method=photo.giveNearestPhotos&params={"geo":[37.82,-122.469322],"limit":12,"except":228481}`
71+
`https://api.pastvu.com/api2?method=photo.giveNearestPhotos&params={"geo":[37.82,-122.469322],"limit":12,"except":228481}`
6272

6373
### photo.getByBounds
6474

@@ -75,5 +85,5 @@ localWork | | bool | 0 | return array of `photos` (set 1 when using zoom value >
7585

7686
**Query example:**
7787

78-
`https://pastvu.com/api2?method=photo.getByBounds&params={"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]]]}}`
88+
`https://api.pastvu.com/api2?method=photo.getByBounds&params={"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]]]}}`
7989

i18n/ru/docusaurus-plugin-content-docs/current/dev/api.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ sidebar_position: 3
99

1010
# PastVu API
1111

12+
:::warning Устаревший адрес
13+
API `https://pastvu.com/api2` устарел. Пожалуйста, обновите ваши интеграции для использования нового адреса `https://api.pastvu.com/api2`.
14+
:::
15+
1216
:::info
1317
Для получения фото, необходимо к URL добавить содержимое поля `file` из ответа API метода:
18+
* `https://img.pastvu.com/d/` для стандартного размера;
19+
* `https://img.pastvu.com/a/` для оригинального размера;
20+
* `https://img.pastvu.com/h/` для миниатюры.
21+
:::
22+
23+
:::warning Устаревшие адреса
1424
* `https://pastvu.com/_p/d/` для стандартного размера;
1525
* `https://pastvu.com/_p/a/` для оригинального размера;
1626
* `https://pastvu.com/_p/h/` для миниатюры.
@@ -28,7 +38,7 @@ cid | ✓ | int | уникальный номер снимка |
2838

2939
**Пример запроса:**
3040

31-
`https://pastvu.com/api2?method=photo.giveForPage&params={"cid":5}`
41+
`https://api.pastvu.com/api2?method=photo.giveForPage&params={"cid":5}`
3242

3343
### comment.giveForObj
3444

@@ -40,7 +50,7 @@ cid | ✓ | int | уникальный номер снимка |
4050

4151
**Пример запроса:**
4252

43-
`https://pastvu.com/api2?method=comment.giveForObj&params={"cid":23314}`
53+
`https://api.pastvu.com/api2?method=comment.giveForObj&params={"cid":23314}`
4454

4555
### photo.giveNearestPhotos
4656
Возвращает массив фотографий, ближайших переданной координате. Массив отсортирован по возрастанию расстояния.
@@ -58,7 +68,7 @@ skip | | int | | пропустить указанное количество ф
5868

5969
**Пример запроса:**
6070

61-
`https://pastvu.com/api2?method=photo.giveNearestPhotos&params={"geo":[37.82,-122.469322],"limit":12,"except":228481}`
71+
`https://api.pastvu.com/api2?method=photo.giveNearestPhotos&params={"geo":[37.82,-122.469322],"limit":12,"except":228481}`
6272

6373
### photo.getByBounds
6474

@@ -75,5 +85,5 @@ localWork | | bool | 0 | возвращать массив `photos` (следу
7585

7686
**Пример запроса:**
7787

78-
`https://pastvu.com/api2?method=photo.getByBounds&params={"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]]]}}`
88+
`https://api.pastvu.com/api2?method=photo.getByBounds&params={"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]]]}}`
7989

0 commit comments

Comments
 (0)