ipbase-rs

Crates.ioipbase-rs
lib.rsipbase-rs
version0.1.0
sourcesrc
created_at2022-09-09 11:18:27.110299
updated_at2022-09-09 11:18:27.110299
descriptionAn api wrapper for ipbase.com
homepagehttps://github.com/everapihq/ipbase-rs
repositoryhttps://github.com/everapihq/ipbase-rs
max_upload_size
id661801
size11,064
(lookaze)

documentation

https://ipbase.com/docs

README

ipbase-rs: Rust geolocation service via ipbase.com

This package is a Rust wrapper for ipbase.com that aims to make the usage of the API as easy as possible in your project.

Installation

This crate is under development. Especially the response parsing needs some more testing. However, if you still want to use it, you can install it by adding this to your Cargo.toml:

[dependencies]
ipbase = "0.1.0"

Requirements

  1. API Key for ipbase.com
  2. Async runtime like tokio

Quickstart

use ipbase::Ipbase;
use ipbase::models;

async fn request_latest() -> Result<models::DetailsResponse, ipbase::Error> {
    let ipbase_api = Ipbase::new("<your-api-key>")?;
    let details = ipbase_api.info("1.1.1.1").await?;
     Ok(details)
}

Find out more about our endpoints, parameters and response data structure in the docs

License

The MIT License (MIT). Please see License File for more information.

Commit count: 1

cargo fmt