Skip to content

Commit 0b73798

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent cb45f8a commit 0b73798

5 files changed

Lines changed: 259 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ Class | Method | HTTP request | Description
646646
*YouTubeApi* | [**youtubeYoutubeScraperHealthCheck**](docs/YouTubeApi.md#youtubeYoutubeScraperHealthCheck) | **GET** /v1/youtube/health | YouTube scraper health check
647647
*YouTubeApi* | [**youtubeYoutubeScraperHealthCheckHead**](docs/YouTubeApi.md#youtubeYoutubeScraperHealthCheckHead) | **HEAD** /v1/youtube/health | YouTube scraper health check
648648
*ZillowApi* | [**zillowGetAgentProfileListings**](docs/ZillowApi.md#zillowGetAgentProfileListings) | **GET** /v1/zillow/agent | Get agent profile + listings
649+
*ZillowApi* | [**zillowGetMultifamilyBuilding**](docs/ZillowApi.md#zillowGetMultifamilyBuilding) | **GET** /v1/zillow/building | Get multifamily building
649650
*ZillowApi* | [**zillowGetPropertyDetail**](docs/ZillowApi.md#zillowGetPropertyDetail) | **GET** /v1/zillow/property/{zpid} | Get property detail
650651
*ZillowApi* | [**zillowGetPropertyDetailByUrl**](docs/ZillowApi.md#zillowGetPropertyDetailByUrl) | **GET** /v1/zillow/property | Get property detail by URL
651652
*ZillowApi* | [**zillowListCoverageMarkets**](docs/ZillowApi.md#zillowListCoverageMarkets) | **GET** /v1/zillow/markets | List coverage markets

api/openapi.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22531,6 +22531,45 @@ paths:
2253122531
- Zillow
2253222532
x-accepts:
2253322533
- application/json
22534+
/v1/zillow/building:
22535+
get:
22536+
description: |-
22537+
Get a Zillow apartment community with per-unit pricing and availability.
22538+
22539+
Multi-unit rentals are served on `/apartments/...` and `/b/...` pages, which
22540+
`/property` cannot read — pass a `home_type=BUILDING` search result's
22541+
`detail_url` here instead.
22542+
operationId: zillow_get_multifamily_building
22543+
parameters:
22544+
- description: "Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/"
22545+
explode: true
22546+
in: query
22547+
name: url
22548+
required: true
22549+
schema:
22550+
description: "Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/"
22551+
title: Url
22552+
type: string
22553+
style: form
22554+
responses:
22555+
"200":
22556+
content:
22557+
application/json:
22558+
schema: {}
22559+
description: Successful Response
22560+
"422":
22561+
content:
22562+
application/json:
22563+
schema:
22564+
$ref: '#/components/schemas/HTTPValidationError'
22565+
description: Validation Error
22566+
security:
22567+
- ApiKeyAuth: []
22568+
summary: Get multifamily building
22569+
tags:
22570+
- Zillow
22571+
x-accepts:
22572+
- application/json
2253422573
/v1/zillow/health:
2253522574
get:
2253622575
description: Check health of the Zillow scraper service (accepts HEAD for UptimeRobot).

docs/ZillowApi.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All URIs are relative to *https://scrapebadger.com*
55
| Method | HTTP request | Description |
66
|------------- | ------------- | -------------|
77
| [**zillowGetAgentProfileListings**](ZillowApi.md#zillowGetAgentProfileListings) | **GET** /v1/zillow/agent | Get agent profile + listings |
8+
| [**zillowGetMultifamilyBuilding**](ZillowApi.md#zillowGetMultifamilyBuilding) | **GET** /v1/zillow/building | Get multifamily building |
89
| [**zillowGetPropertyDetail**](ZillowApi.md#zillowGetPropertyDetail) | **GET** /v1/zillow/property/{zpid} | Get property detail |
910
| [**zillowGetPropertyDetailByUrl**](ZillowApi.md#zillowGetPropertyDetailByUrl) | **GET** /v1/zillow/property | Get property detail by URL |
1011
| [**zillowListCoverageMarkets**](ZillowApi.md#zillowListCoverageMarkets) | **GET** /v1/zillow/markets | List coverage markets |
@@ -86,6 +87,76 @@ public class Example {
8687
| **200** | Successful Response | - |
8788
| **422** | Validation Error | - |
8889

90+
<a id="zillowGetMultifamilyBuilding"></a>
91+
# **zillowGetMultifamilyBuilding**
92+
> Object zillowGetMultifamilyBuilding(url)
93+
94+
Get multifamily building
95+
96+
Get a Zillow apartment community with per-unit pricing and availability. Multi-unit rentals are served on &#x60;/apartments/...&#x60; and &#x60;/b/...&#x60; pages, which &#x60;/property&#x60; cannot read — pass a &#x60;home_type&#x3D;BUILDING&#x60; search result&#39;s &#x60;detail_url&#x60; here instead.
97+
98+
### Example
99+
```java
100+
// Import classes:
101+
import com.scrapebadger.client.ApiClient;
102+
import com.scrapebadger.client.ApiException;
103+
import com.scrapebadger.client.Configuration;
104+
import com.scrapebadger.client.auth.*;
105+
import com.scrapebadger.client.models.*;
106+
import com.scrapebadger.client.api.ZillowApi;
107+
108+
public class Example {
109+
public static void main(String[] args) {
110+
ApiClient defaultClient = Configuration.getDefaultApiClient();
111+
defaultClient.setBasePath("https://scrapebadger.com");
112+
113+
// Configure API key authorization: ApiKeyAuth
114+
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
115+
ApiKeyAuth.setApiKey("YOUR API KEY");
116+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
117+
//ApiKeyAuth.setApiKeyPrefix("Token");
118+
119+
ZillowApi apiInstance = new ZillowApi(defaultClient);
120+
String url = "url_example"; // String | Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/
121+
try {
122+
Object result = apiInstance.zillowGetMultifamilyBuilding(url);
123+
System.out.println(result);
124+
} catch (ApiException e) {
125+
System.err.println("Exception when calling ZillowApi#zillowGetMultifamilyBuilding");
126+
System.err.println("Status code: " + e.getCode());
127+
System.err.println("Reason: " + e.getResponseBody());
128+
System.err.println("Response headers: " + e.getResponseHeaders());
129+
e.printStackTrace();
130+
}
131+
}
132+
}
133+
```
134+
135+
### Parameters
136+
137+
| Name | Type | Description | Notes |
138+
|------------- | ------------- | ------------- | -------------|
139+
| **url** | **String**| Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/ | |
140+
141+
### Return type
142+
143+
**Object**
144+
145+
### Authorization
146+
147+
[ApiKeyAuth](../README.md#ApiKeyAuth)
148+
149+
### HTTP request headers
150+
151+
- **Content-Type**: Not defined
152+
- **Accept**: application/json
153+
154+
### HTTP response details
155+
| Status code | Description | Response headers |
156+
|-------------|-------------|------------------|
157+
| **200** | Successful Response | - |
158+
| **422** | Validation Error | - |
159+
89160
<a id="zillowGetPropertyDetail"></a>
90161
# **zillowGetPropertyDetail**
91162
> Object zillowGetPropertyDetail(zpid)

src/main/java/com/scrapebadger/client/api/ZillowApi.java

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,140 @@ public okhttp3.Call zillowGetAgentProfileListingsAsync(String username, String u
210210
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
211211
return localVarCall;
212212
}
213+
/**
214+
* Build call for zillowGetMultifamilyBuilding
215+
* @param url Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/ (required)
216+
* @param _callback Callback for upload/download progress
217+
* @return Call to execute
218+
* @throws ApiException If fail to serialize the request body object
219+
* @http.response.details
220+
<table border="1">
221+
<caption>Response Details</caption>
222+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
223+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
224+
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
225+
</table>
226+
*/
227+
public okhttp3.Call zillowGetMultifamilyBuildingCall(String url, final ApiCallback _callback) throws ApiException {
228+
String basePath = null;
229+
// Operation Servers
230+
String[] localBasePaths = new String[] { };
231+
232+
// Determine Base Path to Use
233+
if (localCustomBaseUrl != null){
234+
basePath = localCustomBaseUrl;
235+
} else if ( localBasePaths.length > 0 ) {
236+
basePath = localBasePaths[localHostIndex];
237+
} else {
238+
basePath = null;
239+
}
240+
241+
Object localVarPostBody = null;
242+
243+
// create path and map variables
244+
String localVarPath = "/v1/zillow/building";
245+
246+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
247+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
248+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
249+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
250+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
251+
252+
if (url != null) {
253+
localVarQueryParams.addAll(localVarApiClient.parameterToPair("url", url));
254+
}
255+
256+
final String[] localVarAccepts = {
257+
"application/json"
258+
};
259+
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
260+
if (localVarAccept != null) {
261+
localVarHeaderParams.put("Accept", localVarAccept);
262+
}
263+
264+
final String[] localVarContentTypes = {
265+
};
266+
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
267+
if (localVarContentType != null) {
268+
localVarHeaderParams.put("Content-Type", localVarContentType);
269+
}
270+
271+
String[] localVarAuthNames = new String[] { "ApiKeyAuth" };
272+
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
273+
}
274+
275+
@SuppressWarnings("rawtypes")
276+
private okhttp3.Call zillowGetMultifamilyBuildingValidateBeforeCall(String url, final ApiCallback _callback) throws ApiException {
277+
// verify the required parameter 'url' is set
278+
if (url == null) {
279+
throw new ApiException("Missing the required parameter 'url' when calling zillowGetMultifamilyBuilding(Async)");
280+
}
281+
282+
return zillowGetMultifamilyBuildingCall(url, _callback);
283+
284+
}
285+
286+
/**
287+
* Get multifamily building
288+
* Get a Zillow apartment community with per-unit pricing and availability. Multi-unit rentals are served on &#x60;/apartments/...&#x60; and &#x60;/b/...&#x60; pages, which &#x60;/property&#x60; cannot read — pass a &#x60;home_type&#x3D;BUILDING&#x60; search result&#39;s &#x60;detail_url&#x60; here instead.
289+
* @param url Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/ (required)
290+
* @return Object
291+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
292+
* @http.response.details
293+
<table border="1">
294+
<caption>Response Details</caption>
295+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
296+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
297+
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
298+
</table>
299+
*/
300+
public Object zillowGetMultifamilyBuilding(String url) throws ApiException {
301+
ApiResponse<Object> localVarResp = zillowGetMultifamilyBuildingWithHttpInfo(url);
302+
return localVarResp.getData();
303+
}
304+
305+
/**
306+
* Get multifamily building
307+
* Get a Zillow apartment community with per-unit pricing and availability. Multi-unit rentals are served on &#x60;/apartments/...&#x60; and &#x60;/b/...&#x60; pages, which &#x60;/property&#x60; cannot read — pass a &#x60;home_type&#x3D;BUILDING&#x60; search result&#39;s &#x60;detail_url&#x60; here instead.
308+
* @param url Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/ (required)
309+
* @return ApiResponse&lt;Object&gt;
310+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
311+
* @http.response.details
312+
<table border="1">
313+
<caption>Response Details</caption>
314+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
315+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
316+
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
317+
</table>
318+
*/
319+
public ApiResponse<Object> zillowGetMultifamilyBuildingWithHttpInfo(String url) throws ApiException {
320+
okhttp3.Call localVarCall = zillowGetMultifamilyBuildingValidateBeforeCall(url, null);
321+
Type localVarReturnType = new TypeToken<Object>(){}.getType();
322+
return localVarApiClient.execute(localVarCall, localVarReturnType);
323+
}
324+
325+
/**
326+
* Get multifamily building (asynchronously)
327+
* Get a Zillow apartment community with per-unit pricing and availability. Multi-unit rentals are served on &#x60;/apartments/...&#x60; and &#x60;/b/...&#x60; pages, which &#x60;/property&#x60; cannot read — pass a &#x60;home_type&#x3D;BUILDING&#x60; search result&#39;s &#x60;detail_url&#x60; here instead.
328+
* @param url Full Zillow building URL, e.g. https://www.zillow.com/apartments/kansas-city-mo/brookside-51/CkBJqt/ (required)
329+
* @param _callback The callback to be executed when the API call finishes
330+
* @return The request call
331+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
332+
* @http.response.details
333+
<table border="1">
334+
<caption>Response Details</caption>
335+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
336+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
337+
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
338+
</table>
339+
*/
340+
public okhttp3.Call zillowGetMultifamilyBuildingAsync(String url, final ApiCallback<Object> _callback) throws ApiException {
341+
342+
okhttp3.Call localVarCall = zillowGetMultifamilyBuildingValidateBeforeCall(url, _callback);
343+
Type localVarReturnType = new TypeToken<Object>(){}.getType();
344+
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
345+
return localVarCall;
346+
}
213347
/**
214348
* Build call for zillowGetPropertyDetail
215349
* @param zpid (required)

src/test/java/com/scrapebadger/client/api/ZillowApiTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ public void zillowGetAgentProfileListingsTest() throws ApiException {
4747
// TODO: test validations
4848
}
4949

50+
/**
51+
* Get multifamily building
52+
*
53+
* Get a Zillow apartment community with per-unit pricing and availability. Multi-unit rentals are served on &#x60;/apartments/...&#x60; and &#x60;/b/...&#x60; pages, which &#x60;/property&#x60; cannot read — pass a &#x60;home_type&#x3D;BUILDING&#x60; search result&#39;s &#x60;detail_url&#x60; here instead.
54+
*
55+
* @throws ApiException if the Api call fails
56+
*/
57+
@Test
58+
public void zillowGetMultifamilyBuildingTest() throws ApiException {
59+
String url = null;
60+
Object response = api.zillowGetMultifamilyBuilding(url);
61+
// TODO: test validations
62+
}
63+
5064
/**
5165
* Get property detail
5266
*

0 commit comments

Comments
 (0)