Categorygithub.com/grokify/gophonenumbers
modulepackage
0.4.9
Repository: https://github.com/grokify/gophonenumbers.git
Documentation: pkg.go.dev

# README

GoPhoneNumbers

Build Status Go Report Card Docs License

This library provides phone number information functionality including ability to access number look up APIs. It includes a Go client and CLI app for the Numverify API, and Twilio API.

https://numverify.com/documentation

Installation

InstallCommand
SDK only$ go get github.com/grokify/gophonenumbers
CLI only$ go get github.com/grokify/gophonenumbers/apps/numverify
SDK and CLI$ go get github.com/grokify/gophonenumbers/...

Usage

CLI App

OptionsLongShortExample
.env File--env-e-e=/path/to/.env
Access Token--token-t-t=<myToken>
Validate Number--number-n-n=<number>
List Countries--countries-c-c

Example Commands

$ numverify -e=/path/to/.env -n=+16505550100
$ numverify -t=<myToken> -n=+16505550100
$ numverify -e=/path/to/.env -c
$ numverify -t=<myToken> -c

SDK

Validate Number

import(
	nv "github.com/grokify/gophonenumbers/numverify"
)

func main() {
	client := nv.NumverifyClient{AccessKey: "myAccessKey"}

	apiSuccessInfo, apiErrorInfo, resp, err := client.Validate(
		nv.NumverifyParams{Number: number})

	[...]
}

Get Countries

import(
	nv "github.com/grokify/gophonenumbers/numverify"
)

func main() {
	client := nv.NumverifyClient{AccessKey: "myAccessKey"}

	countries, apiErrorInfo, resp, err := client.Countries()

	[...]
}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

A2gCsvFullPath reads data from: https://github.com/ravisorg/Area-Code-Geolocation-Database.
No description provided by the author
No description provided by the author
LocalNumberUS returns a US E.164 number given an areacode and line number.
No description provided by the author
No description provided by the author
NewAreaCodeInfoStrings returns an AreaCodeInfo based on string area code, lat and lon values.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPointString returns a *geo.Point based on string lat and lon values.
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author