import 'package:gruene_api_client/api.dart';
All URIs are relative to https://app.gruene.de
Method | HTTP request | Description |
---|---|---|
findUsers | GET /v0/users | Find users |
getSelf | GET /v0/users/self | Get the authenticated user |
getUser | GET /v0/users/{userId} | Get user by id |
FindUsersResponse findUsers(search, userIds, limit)
Find users
import 'package:gruene_api_client/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearer
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearer').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearer').password = 'YOUR_PASSWORD';
final api = GrueneApiClient().getUsersApi();
final String search = search_example; // String | Search term to look for in firstname, lastname, email, username.
final BuiltList<String> userIds = ; // BuiltList<String> | Only return users with matching user id.
final num limit = 8.14; // num |
try {
final response = api.findUsers(search, userIds, limit);
print(response);
} catch on DioError (e) {
print('Exception when calling UsersApi->findUsers: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
search | String | Search term to look for in firstname, lastname, email, username. | [optional] |
userIds | BuiltList<String> | Only return users with matching user id. | [optional] |
limit | num | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User getSelf()
Get the authenticated user
import 'package:gruene_api_client/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearer
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearer').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearer').password = 'YOUR_PASSWORD';
final api = GrueneApiClient().getUsersApi();
try {
final response = api.getSelf();
print(response);
} catch on DioError (e) {
print('Exception when calling UsersApi->getSelf: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User getUser(userId)
Get user by id
import 'package:gruene_api_client/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearer
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearer').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearer').password = 'YOUR_PASSWORD';
final api = GrueneApiClient().getUsersApi();
final String userId = userId_example; // String |
try {
final response = api.getUser(userId);
print(response);
} catch on DioError (e) {
print('Exception when calling UsersApi->getUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]