wiseair_flutter_services

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

wiseair flutter services

Wiseair Flutter Services #
An API to access Wiseair's air quality data.
Features #

Air quality data out of the box: install the package, insert your credentials and get access to the air you breathe.
Concise and expressive syntax to let you focus on your application: the package will take care of the rest!
Low-level API available for non-standardized interaction.

Installation #
Add a dependency to your pubspec.yml, then run flutter pub get to install it.
dependencies:
wiseair_flutter_services:
copied to clipboard
Usage #

Login
Get air quality data from user sensors
Get air quality data for a specific location

Login #
import 'package:wiseair_flutter_services/wiseair_flutter_services.dart';
final WiseairServices wiseairServices = WiseairServices();

WiseairCredentials credentials=UserCredentials(email:"example@wiseair.vision",password:"secret");

User me = await wiseairServices.instance.login(credentials:credentials);
copied to clipboard
Get air quality data from user sensors #
import 'package:wiseair_flutter_services/wiseair_flutter_services.dart';
final WiseairServices wiseairServices = WiseairServices();

WiseairCredentials credentials=UserCredentials(email:"example@wiseair.vision",password:"secret");

User me = await wiseairServices.instance.login(credentials:credentials);
List<Sensor> mySensors = await wiseairServices.instance.getMySensors();

Interval interval=Interval(dateStart=Datetime(2021,10,10,12),dateEnd=Datetime(2021,10,10,15));

for(Sensor sensor in mySensors){
List<Prediction> predictions=await WiseairServices.instance.getSensorDailyPredictions(sensor:sensor,interval:interval);
}
copied to clipboard
Get air quality data for specific location #
import 'package:wiseair_flutter_services/wiseair_flutter_services.dart';
final WiseairServices wiseairServices = WiseairServices();

WiseairCredentials credentials=UserCredentials(email:"example@wiseair.vision",password:"secret");
await wiseairServices.instance.login(credentials:credentials);

Location location=Location(latitude:45.070,longitude:7.686);
Interval interval=Interval(dateStart=Datetime(2021,10,10,12),dateEnd=Datetime(2021,10,10,15));

List<Prediction> predictions=await WiseairServices.instance.getLocationPredictions(location:location,interval:interval);
copied to clipboard
What's next? #
Read our API documentation to learn more on the concepts used in this package.
Drop us a line at contact@wiseair.vision for any feedback or question on the package!

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.