-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
375 additions
and
539 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
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
42 changes: 21 additions & 21 deletions
42
AspNetCoreExample.Generator/output/api/WeatherForecastApi.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
// tslint:disable | ||
// TypeScriptContractGenerator's generated content | ||
import { WeatherForecast } from './../DataTypes/WeatherForecast'; | ||
import { Guid } from './../DataTypes/Guid'; | ||
import { ApiBase } from './../ApiBase/ApiBase'; | ||
import { url } from './../ApiBase/ApiBase'; | ||
|
||
export class WeatherForecastApi extends ApiBase implements IWeatherForecastApi { | ||
async get(): Promise<WeatherForecast[]> { | ||
return this.makeGetRequest(`/WeatherForecast`, { | ||
|
||
}, { | ||
|
||
}); | ||
get(): Promise<WeatherForecast[]> { | ||
return this.makeGetRequest(url`/WeatherForecast`); | ||
} | ||
|
||
async update(city: string, forecast: WeatherForecast): Promise<void> { | ||
return this.makePostRequest(`/WeatherForecast/Update/${city}`, { | ||
|
||
}, { | ||
...forecast, | ||
}); | ||
update(city: string, forecast: WeatherForecast): Promise<void> { | ||
return this.makePostRequest(url`/WeatherForecast/Update/${city}`, forecast); | ||
} | ||
|
||
async reset(seed: number): Promise<void> { | ||
return this.makePostRequest(`/Reset`, { | ||
['seed']: seed, | ||
}, { | ||
|
||
}); | ||
reset(seed: number): Promise<void> { | ||
return this.makePostRequest(url`/Reset?seed=${seed}`); | ||
} | ||
|
||
getDownloadUrl(city: string): string { | ||
return `/WeatherForecast/${city}`; | ||
urlForDownload(city: string): string { | ||
return url`/WeatherForecast/${city}`; | ||
} | ||
|
||
urlForGetStreetView(street: string, useGoogleImages: boolean): string { | ||
return url`/WeatherForecast/${street}/view?useGoogleImages=${useGoogleImages}`; | ||
} | ||
|
||
newGuid(): Promise<Guid> { | ||
return this.makeGetRequest(url`/WeatherForecast/none`); | ||
} | ||
|
||
}; | ||
export interface IWeatherForecastApi { | ||
get(): Promise<WeatherForecast[]>; | ||
update(city: string, forecast: WeatherForecast): Promise<void>; | ||
reset(seed: number): Promise<void>; | ||
getDownloadUrl(city: string): string; | ||
urlForDownload(city: string): string; | ||
urlForGetStreetView(street: string, useGoogleImages: boolean): string; | ||
newGuid(): Promise<Guid>; | ||
} |
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
Oops, something went wrong.