-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch-for-route.ts
76 lines (56 loc) · 1.52 KB
/
search-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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import * as Core from '../core';
import * as Shared from './shared';
export class SearchForRoute extends APIResource {
/**
* Search for a route based on its name.
*/
list(
query: SearchForRouteListParams,
options?: Core.RequestOptions,
): Core.APIPromise<SearchForRouteListResponse> {
return this._client.get('/api/where/search/route.json', { query, ...options });
}
}
export interface SearchForRouteListResponse extends Shared.ResponseWrapper {
data?: SearchForRouteListResponse.Data;
}
export namespace SearchForRouteListResponse {
export interface Data {
limitExceeded: boolean;
list: Array<Data.List>;
outOfRange: boolean;
references: Shared.References;
}
export namespace Data {
export interface List {
id: string;
agencyId: string;
type: number;
color?: string;
description?: string;
longName?: string;
nullSafeShortName?: string;
shortName?: string;
textColor?: string;
url?: string;
}
}
}
export interface SearchForRouteListParams {
/**
* The string to search for.
*/
input: string;
/**
* The max number of results to return. Defaults to 20.
*/
maxCount?: number;
}
export declare namespace SearchForRoute {
export {
type SearchForRouteListResponse as SearchForRouteListResponse,
type SearchForRouteListParams as SearchForRouteListParams,
};
}