-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstops-for-route.ts
109 lines (84 loc) · 2.45 KB
/
stops-for-route.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
import * as Shared from './shared';
export class StopsForRoute extends APIResource {
/**
* Get stops for a specific route
*/
list(
routeId: string,
query?: StopsForRouteListParams,
options?: Core.RequestOptions,
): Core.APIPromise<StopsForRouteListResponse>;
list(routeId: string, options?: Core.RequestOptions): Core.APIPromise<StopsForRouteListResponse>;
list(
routeId: string,
query: StopsForRouteListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<StopsForRouteListResponse> {
if (isRequestOptions(query)) {
return this.list(routeId, {}, query);
}
return this._client.get(`/api/where/stops-for-route/${routeId}.json`, { query, ...options });
}
}
export interface StopsForRouteListResponse extends Shared.ResponseWrapper {
data: StopsForRouteListResponse.Data;
}
export namespace StopsForRouteListResponse {
export interface Data {
entry: Data.Entry;
references: Shared.References;
}
export namespace Data {
export interface Entry {
polylines?: Array<Entry.Polyline>;
routeId?: string;
stopGroupings?: Array<Entry.StopGrouping>;
stopIds?: Array<string>;
}
export namespace Entry {
export interface Polyline {
length?: number;
levels?: string;
points?: string;
}
export interface StopGrouping {
id?: string;
name?: StopGrouping.Name;
polylines?: Array<StopGrouping.Polyline>;
stopIds?: Array<string>;
}
export namespace StopGrouping {
export interface Name {
name?: string;
names?: Array<string>;
type?: string;
}
export interface Polyline {
length?: number;
levels?: string;
points?: string;
}
}
}
}
}
export interface StopsForRouteListParams {
/**
* Include polyline elements in the response (default true)
*/
includePolylines?: boolean;
/**
* Specify service date (YYYY-MM-DD or epoch) (default today)
*/
time?: string;
}
export declare namespace StopsForRoute {
export {
type StopsForRouteListResponse as StopsForRouteListResponse,
type StopsForRouteListParams as StopsForRouteListParams,
};
}