numverify v1.0.0 Numverify

Verify numbers through the Numverify API.

A valid Numverify API key must be used to do anything. It can either be in the application configuration under :key or as an environment variable under the name of NUMVERIFY_KEY.

Summary

Functions

Returns a map of countries and their telephone codes

Convenience function to quickly test the validity of a number

Validate the given opts, a map of inputs to the API

Functions

countries()
countries :: {:ok, map}

Returns a map of countries and their telephone codes.

is_valid?(number)
is_valid?(integer | String.t) :: boolean

Convenience function to quickly test the validity of a number.

Returns true if the number is valid, false if not, and nil if there was an error.

validate(opts)
validate(map) :: {:ok, map} | {:error, integer, String.t}

Validate the given opts, a map of inputs to the API.

A number field must be present.

Refer to the Numverify documentation for more information.