#api-client #api #client #rate-limit


An unofficial Rust client for the Airly's API (https://developer.airly.eu/docs)

3 releases (breaking)

0.2.0 Dec 22, 2018
0.1.0 Mar 12, 2018
0.0.1 Jan 13, 2018

#1342 in Web programming

27 downloads per month

MIT license

345 lines


Version Documentation

pwr_airly is an unofficial client for the Airly's v2 API.


A few examples are ready for you inside the examples directory - just replace the my-api-key string with your actual key and you'll be able to run them with cargo run --example example-name.

As for a sneak peek, here's the getting-measurements-for-installation.rs:

use std::error::Error;
use std::result::Result;

use pwr_airly::AirlyClient;

fn main() -> Result<(), Box<Error>> {
    let airly = AirlyClient::new("my-api-key");

    // To query for measurements of a specific installation, you can use the `measurements().get()` method.
    // It models the <https://developer.airly.eu/docs#endpoints.measurements.installation> endpoint.
    let response = airly.measurements().get(250)?;

    // After the response has been fetched, you can use the `rate_limit()` method to access
    // information about the rate-limiting (i.e. how many requests per API key you can perform), and
    // you can use the `model()` method to access the model (contents) of the response.
    println!("{:#?}", response.rate_limit());
    println!("{:#?}", response.model());



  1. Implement all the /v2/meta endpoints.
  2. Add support for asynchronous requests.


Copyright (c) 2018, Patryk Wychowaniec <wychowaniec.patryk@gmail.com>.
Licensed under the MIT license.


~441K SLoC