Skip to content

Commit b397e6b

Browse files
committed
feat(api): update via SDK Studio
1 parent b243f59 commit b397e6b

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Methods:
2020

2121
Methods:
2222

23-
- <code title="get /api/where/stops-for-location.json">client.stopsForLocation.<a href="./src/resources/stops-for-location.ts">list</a>({ ...params }) -> void</code>
23+
- <code title="get /api/where/stops-for-location.json">client.stopsForLocation.<a href="./src/resources/stops-for-location.ts">retrieve</a>({ ...params }) -> void</code>
2424

2525
# ArrivalsAndDeparturesForStop
2626

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export namespace Onebusaway {
164164
export import CurrentTimeRetrieveParams = API.CurrentTimeRetrieveParams;
165165

166166
export import StopsForLocation = API.StopsForLocation;
167-
export import StopsForLocationListParams = API.StopsForLocationListParams;
167+
export import StopsForLocationRetrieveParams = API.StopsForLocationRetrieveParams;
168168

169169
export import ArrivalsAndDeparturesForStop = API.ArrivalsAndDeparturesForStop;
170170
export import ArrivalsAndDeparturesForStopRetrieveParams = API.ArrivalsAndDeparturesForStopRetrieveParams;

src/resources/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ export {
77
} from './arrivals-and-departures-for-stop';
88
export { ConfigRetrieveParams, Config } from './config';
99
export { CurrentTimeRetrieveParams, CurrentTime } from './current-time';
10-
export { StopsForLocationListParams, StopsForLocation } from './stops-for-location';
10+
export { StopsForLocationRetrieveParams, StopsForLocation } from './stops-for-location';

src/resources/stops-for-location.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ export class StopsForLocation extends APIResource {
99
/**
1010
* stops-for-location
1111
*/
12-
list(query?: StopsForLocationListParams, options?: Core.RequestOptions): Core.APIPromise<void>;
13-
list(options?: Core.RequestOptions): Core.APIPromise<void>;
14-
list(
15-
query: StopsForLocationListParams | Core.RequestOptions = {},
12+
retrieve(query?: StopsForLocationRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<void>;
13+
retrieve(options?: Core.RequestOptions): Core.APIPromise<void>;
14+
retrieve(
15+
query: StopsForLocationRetrieveParams | Core.RequestOptions = {},
1616
options?: Core.RequestOptions,
1717
): Core.APIPromise<void> {
1818
if (isRequestOptions(query)) {
19-
return this.list({}, query);
19+
return this.retrieve({}, query);
2020
}
2121
return this._client.get('/api/where/stops-for-location.json', {
2222
query,
@@ -26,7 +26,7 @@ export class StopsForLocation extends APIResource {
2626
}
2727
}
2828

29-
export interface StopsForLocationListParams {
29+
export interface StopsForLocationRetrieveParams {
3030
key?: string;
3131

3232
lat?: number;
@@ -35,5 +35,5 @@ export interface StopsForLocationListParams {
3535
}
3636

3737
export namespace StopsForLocation {
38-
export import StopsForLocationListParams = StopsForLocationAPI.StopsForLocationListParams;
38+
export import StopsForLocationRetrieveParams = StopsForLocationAPI.StopsForLocationRetrieveParams;
3939
}

tests/api-resources/stops-for-location.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { Response } from 'node-fetch';
66
const onebusaway = new Onebusaway({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
77

88
describe('resource stopsForLocation', () => {
9-
test('list', async () => {
10-
const responsePromise = onebusaway.stopsForLocation.list();
9+
test('retrieve', async () => {
10+
const responsePromise = onebusaway.stopsForLocation.retrieve();
1111
const rawResponse = await responsePromise.asResponse();
1212
expect(rawResponse).toBeInstanceOf(Response);
1313
const response = await responsePromise;
@@ -17,17 +17,17 @@ describe('resource stopsForLocation', () => {
1717
expect(dataAndResponse.response).toBe(rawResponse);
1818
});
1919

20-
test('list: request options instead of params are passed correctly', async () => {
20+
test('retrieve: request options instead of params are passed correctly', async () => {
2121
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
22-
await expect(onebusaway.stopsForLocation.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
22+
await expect(onebusaway.stopsForLocation.retrieve({ path: '/_stainless_unknown_path' })).rejects.toThrow(
2323
Onebusaway.NotFoundError,
2424
);
2525
});
2626

27-
test('list: request options and params are passed correctly', async () => {
27+
test('retrieve: request options and params are passed correctly', async () => {
2828
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
2929
await expect(
30-
onebusaway.stopsForLocation.list(
30+
onebusaway.stopsForLocation.retrieve(
3131
{ key: 'string', lat: 0, lon: 0 },
3232
{ path: '/_stainless_unknown_path' },
3333
),

0 commit comments

Comments
 (0)