-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from OneBusAway/release-please--branches--main…
…--changes--next--components--onebusaway-sdk release: 0.1.0-alpha.20
- Loading branch information
Showing
11 changed files
with
113 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.1.0-alpha.19" | ||
".": "0.1.0-alpha.20" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 7 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-9834dce7919ec6051ccb2efe87daba2b4134057ed5844cd7bbdaaf6ef48c39f8.yml | ||
configured_endpoints: 8 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-02cc2e7fb32b8721d3a54086ce0e9126e48c53ef7a48a0f9cc836d58312e412d.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "onebusaway-sdk", | ||
"version": "0.1.0-alpha.19", | ||
"version": "0.1.0-alpha.20", | ||
"description": "The official TypeScript library for the Onebusaway SDK API", | ||
"author": "Onebusaway SDK <[email protected]>", | ||
"types": "dist/index.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import { APIResource } from '../resource'; | ||
import * as Core from '../core'; | ||
import * as RouteAPI from './route'; | ||
import * as Shared from './shared'; | ||
|
||
export class Route extends APIResource { | ||
/** | ||
* Retrieve information for a specific route identified by its unique ID. | ||
*/ | ||
retrieve(routeId: string, options?: Core.RequestOptions): Core.APIPromise<RouteRetrieveResponse> { | ||
return this._client.get(`/api/where/route/${routeId}.json`, options); | ||
} | ||
} | ||
|
||
export interface RouteRetrieveResponse extends Shared.ResponseWrapper { | ||
data?: RouteRetrieveResponse.Data; | ||
} | ||
|
||
export namespace RouteRetrieveResponse { | ||
export interface Data { | ||
entry?: Data.Entry; | ||
|
||
references?: Shared.References; | ||
} | ||
|
||
export namespace Data { | ||
export interface Entry { | ||
id?: string; | ||
|
||
agencyId?: string; | ||
|
||
color?: string; | ||
|
||
description?: string; | ||
|
||
longName?: string; | ||
|
||
shortName?: string; | ||
|
||
textColor?: string; | ||
|
||
type?: number; | ||
|
||
url?: string; | ||
} | ||
} | ||
} | ||
|
||
export namespace Route { | ||
export import RouteRetrieveResponse = RouteAPI.RouteRetrieveResponse; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const VERSION = '0.1.0-alpha.19'; // x-release-please-version | ||
export const VERSION = '0.1.0-alpha.20'; // x-release-please-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import OnebusawaySDK from 'onebusaway-sdk'; | ||
import { Response } from 'node-fetch'; | ||
|
||
const onebusawaySDK = new OnebusawaySDK({ | ||
apiKey: 'My API Key', | ||
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', | ||
}); | ||
|
||
describe('resource route', () => { | ||
test('retrieve', async () => { | ||
const responsePromise = onebusawaySDK.route.retrieve('string'); | ||
const rawResponse = await responsePromise.asResponse(); | ||
expect(rawResponse).toBeInstanceOf(Response); | ||
const response = await responsePromise; | ||
expect(response).not.toBeInstanceOf(Response); | ||
const dataAndResponse = await responsePromise.withResponse(); | ||
expect(dataAndResponse.data).toBe(response); | ||
expect(dataAndResponse.response).toBe(rawResponse); | ||
}); | ||
|
||
test('retrieve: request options instead of params are passed correctly', async () => { | ||
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error | ||
await expect( | ||
onebusawaySDK.route.retrieve('string', { path: '/_stainless_unknown_path' }), | ||
).rejects.toThrow(OnebusawaySDK.NotFoundError); | ||
}); | ||
}); |