pingmyip-rs

Crates.iopingmyip-rs
lib.rspingmyip-rs
version0.0.2
sourcesrc
created_at2024-07-06 08:30:32.421108
updated_at2024-08-05 17:26:54.708663
descriptionA simple Rust library to fetch your public IP address from pingmyip.io
homepage
repositoryhttps://github.com/codanaut/pingmyip-rs
max_upload_size
id1293850
size2,999
Codanaut (codanaut)

documentation

README

PingMyIP

A simple Rust library to fetch your public IP address

Features

  • Fetch IP details in JSON format.
  • Fetch IP details in plain text format.

Installation

Add this to your Cargo.toml:

[dependencies]
pingmyip = "0.0.2"

Usage

Example of using PingMyIP:

async fn get_ip_details() {
    let json_details = pingmyip::fetch_ip_json().await.unwrap();
    println!("IP Details in JSON: {}", json_details);

    let text_details = pingmyip::fetch_ip_text().await.unwrap();
    println!("IP Details in Text: {}", text_details);
}
Commit count: 3

cargo fmt