Skip to content

Limeth/ip-api-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip-api-rust

An API for http://ip-api.com/ written in the Rust language.

Dual-licensed under MIT or the UNLICENSE.

Features

This library lets you request information about an IP address. It uses futures to deliver the result.

pub struct Response {
    pub query: String,
    pub country: Option<NameAndCode>,  // NameAndCode { name: String, code: String }
    pub region: Option<NameAndCode>,
    pub city: Option<String>,
    pub zip: Option<String>,
    pub location: Option<Coordinates>,  // Cooridnates { latitude: f32, longitude: f32 }
    pub timezone: Option<String>,
    pub isp: Option<String>,
    pub organization: Option<String>,
    pub autonomous_system: Option<String>,
    pub reverse: Option<String>,
    pub mobile: bool,
    pub proxy: bool,
}

Requirements

You need Rust 1.26 or later for impl Trait.

About

An API for http://ip-api.com/ written in the Rust language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages