Skip to content

Go library for the ipify API. A simple public IP address API, easy to integrate into any application in seconds.

License

Notifications You must be signed in to change notification settings

go-api-libs/ipify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 ipify API

Go Reference Official Documentation OpenAPI Go Report Card Code Coverage API Health License: MIT

A simple public IP address API, easy to integrate into any application in seconds. (Source)

Installation

To install the library, use the following command:

go get github.com/go-api-libs/ipify/pkg/ipify

Usage

Example: Get you public IP address

package main

import (
	"context"

	"github.com/go-api-libs/ipify/pkg/ipify"
)

func main() {
	c, err := ipify.NewClient()
	if err != nil {
		panic(err)
	}

	ctx := context.Background()
	ipWrapper, err := c.GetIP(ctx, &ipify.GetIPParams{Format: "json"})
	if err != nil {
		panic(err)
	}

	// Use ipWrapper object
}

Additional Information

Contributing

If you have any contributions to make, please submit a pull request or open an issue on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Go library for the ipify API. A simple public IP address API, easy to integrate into any application in seconds.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages