xaxoa_argus_api_client 1.0.0+1
xaxoa_argus_api_client: ^1.0.0+1 copied to clipboard
A Dart compatible library to simplify creating encrypted Argus API calls for Flutter based applications.
Table of Contents
XAXOA Argus API Client #
A Dart compatible library to simplify creating encrypted Argus API calls for Flutter based applications.
Using the library #
Add the repo to your Flutter pubspec.yaml file.
dependencies:
xaxoa_argus_api_client: 1.0.0
Then run...
flutter packages get
Example #
import 'package:xaxoa_argus_api_client/xaxoa_argus_api_client.dart';
...
Map<String, dynamic> data = {
"username": "Here your username",
"password": "Here your password"
};
ArgusResponse response = await ArgusRestClient.getResponse(
cryptKeyBase64: "Here your base64 key",
url: "https://example.com/api/login",
body: data
//token: Bearer token String to authorize later
);
if (response.statusCode != 200) {
print('Something went wrong!');
return;
}
var body = response.body;
if (body != null && body.containsKey("token")) {
// do further processing here...
}