Skip to content

Commit 8a9356d

Browse files
committed
places, property, ...
1 parent b67e4f9 commit 8a9356d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,23 @@ $places = $client->scrapePlaces(
5656
);
5757
```
5858

59+
**Хелперы Place:**
60+
61+
```php
62+
$place->hasContactInfo(); // есть телефоны или email
63+
$place->getFirstPhone(); // первый номер телефона или null
64+
$place->getFirstEmail(); // первый email или null
65+
$place->hasWebsite(); // есть ли сайт
66+
$place->getCoordinates(); // ['lat' => float, 'lng' => float] или null
67+
```
68+
5969
### Отзывы
6070

6171
```php
6272
$reviews = $client->scrapeReviews(
6373
startUrls: ['https://2gis.ru/moscow/firm/70000001057394703'],
6474
maxReviews: 100,
75+
maxPlaces: 5,
6576
reviewsRating: ReviewsRating::Negative, // только 1-2 звезды
6677
reviewsSource: ReviewsSource::TwoGis,
6778
);
@@ -75,6 +86,16 @@ foreach ($reviews as $review) {
7586
}
7687
```
7788

89+
**Хелперы Review:**
90+
91+
```php
92+
$review->hasOfficialAnswer(); // есть ли ответ компании
93+
$review->getOfficialAnswerText(); // текст ответа или null
94+
$review->hasPhotos(); // есть ли фото у отзыва
95+
$review->isPositive(); // рейтинг >= 4
96+
$review->isNegative(); // рейтинг <= 2
97+
```
98+
7899
### Недвижимость
79100

80101
```php
@@ -96,13 +117,23 @@ foreach ($properties as $property) {
96117
}
97118
```
98119

120+
**Хелперы Property:**
121+
122+
```php
123+
$property->hasImages(); // есть ли фото
124+
$property->getCoordinates(); // ['lat' => float, 'lng' => float] или null
125+
$property->getPriceFormatted(); // "1 500 000 RUB" или null
126+
```
127+
99128
### Вакансии
100129

101130
```php
102131
$jobs = $client->scrapeJobs(
103132
location: 'Новосибирск',
104133
maxResults: 300,
134+
categoryId: '200', // Разработка
105135
salaryMin: 80000,
136+
salaryMax: 250000,
106137
);
107138

108139
foreach ($jobs as $job) {
@@ -111,6 +142,13 @@ foreach ($jobs as $job) {
111142
}
112143
```
113144

145+
**Хелперы Job:**
146+
147+
```php
148+
$job->hasApplyUrl(); // есть ли ссылка для отклика
149+
$job->getCoordinates(); // ['lat' => float, 'lng' => float] или null
150+
```
151+
114152
## Фильтры и перечисления
115153

116154
| Enum | Значения |

0 commit comments

Comments
 (0)