|
| 1 | +# flowmotion_api |
| 2 | +API exposed by the Flowmotion Backend Service. |
| 3 | + |
| 4 | +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: |
| 5 | + |
| 6 | +- API version: 0.1.0 |
| 7 | +- Build package: org.openapitools.codegen.languages.DartDioClientCodegen |
| 8 | + |
| 9 | +## Requirements |
| 10 | + |
| 11 | +* Dart 2.15.0+ or Flutter 2.8.0+ |
| 12 | +* Dio 5.0.0+ (https://pub.dev/packages/dio) |
| 13 | + |
| 14 | +## Installation & Usage |
| 15 | + |
| 16 | +### pub.dev |
| 17 | +To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml |
| 18 | +```yaml |
| 19 | +dependencies: |
| 20 | + flowmotion_api: 1.0.0 |
| 21 | +``` |
| 22 | +
|
| 23 | +### Github |
| 24 | +If this Dart package is published to Github, please include the following in pubspec.yaml |
| 25 | +```yaml |
| 26 | +dependencies: |
| 27 | + flowmotion_api: |
| 28 | + git: |
| 29 | + url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git |
| 30 | + #ref: main |
| 31 | +``` |
| 32 | + |
| 33 | +### Local development |
| 34 | +To use the package from your local drive, please include the following in pubspec.yaml |
| 35 | +```yaml |
| 36 | +dependencies: |
| 37 | + flowmotion_api: |
| 38 | + path: /path/to/flowmotion_api |
| 39 | +``` |
| 40 | +
|
| 41 | +## Getting Started |
| 42 | +
|
| 43 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 44 | +
|
| 45 | +```dart |
| 46 | +import 'package:flowmotion_api/flowmotion_api.dart'; |
| 47 | + |
| 48 | + |
| 49 | +final api = FlowmotionApi().getCongestionApi(); |
| 50 | +final String cameraId = cameraId_example; // String | ID of the camera to retrieve congestion duration for |
| 51 | +final String groupby = groupby_example; // String | Group congestion duration by hour or day |
| 52 | +final double threshold = 3.4; // double | Congestion rating level (between 0 and 1) that is considered \"congested\" |
| 53 | + |
| 54 | +try { |
| 55 | + final response = await api.congestedCameraIdGroupbyGet(cameraId, groupby, threshold); |
| 56 | + print(response); |
| 57 | +} catch on DioException (e) { |
| 58 | + print("Exception when calling CongestionApi->congestedCameraIdGroupbyGet: $e\n"); |
| 59 | +} |
| 60 | + |
| 61 | +``` |
| 62 | + |
| 63 | +## Documentation for API Endpoints |
| 64 | + |
| 65 | +All URIs are relative to *http://localhost* |
| 66 | + |
| 67 | +Class | Method | HTTP request | Description |
| 68 | +------------ | ------------- | ------------- | ------------- |
| 69 | +[*CongestionApi*](doc/CongestionApi.md) | [**congestedCameraIdGroupbyGet**](doc/CongestionApi.md#congestedcameraidgroupbyget) | **GET** /congested/{camera_id}/{groupby} | Retrieve congestion duration for a specific camera |
| 70 | +[*CongestionApi*](doc/CongestionApi.md) | [**congestionsGet**](doc/CongestionApi.md#congestionsget) | **GET** /congestions | Retrieve congestion data |
| 71 | +[*RoutingApi*](doc/RoutingApi.md) | [**routePost**](doc/RoutingApi.md#routepost) | **POST** /route | Retrieve recommended routes between source and destination |
| 72 | + |
| 73 | + |
| 74 | +## Documentation For Models |
| 75 | + |
| 76 | + - [Address](doc/Address.md) |
| 77 | + - [Camera](doc/Camera.md) |
| 78 | + - [CameraLocation](doc/CameraLocation.md) |
| 79 | + - [Congestion](doc/Congestion.md) |
| 80 | + - [Location](doc/Location.md) |
| 81 | + - [Rating](doc/Rating.md) |
| 82 | + - [RoutePost200Response](doc/RoutePost200Response.md) |
| 83 | + - [RoutePost200ResponseRoutesInner](doc/RoutePost200ResponseRoutesInner.md) |
| 84 | + - [RoutePost200ResponseRoutesInnerStepsInner](doc/RoutePost200ResponseRoutesInnerStepsInner.md) |
| 85 | + - [RoutePostRequest](doc/RoutePostRequest.md) |
| 86 | + - [RoutePostRequestDest](doc/RoutePostRequestDest.md) |
| 87 | + - [RoutePostRequestSrc](doc/RoutePostRequestSrc.md) |
| 88 | + |
| 89 | + |
| 90 | +## Documentation For Authorization |
| 91 | + |
| 92 | +Endpoints do not require authorization. |
| 93 | + |
| 94 | + |
| 95 | +## Author |
| 96 | + |
| 97 | + |
| 98 | + |
0 commit comments