diff --git a/README.md b/README.md new file mode 100644 index 0000000..5bda851 --- /dev/null +++ b/README.md @@ -0,0 +1,68 @@ +# Ziptastic PHP + +This library is a simple interface for the [Ziptastic API](https://www.getziptastic.com/). + +Using Ziptastic requires an API key. + +## Installing + +Ziptastic PHP can be installed via composer: + +```` +composer require ziptastic/ziptastic +```` + +## Usage + +The simplest usage defaults to the provided Curl service: + +````php +lookup(48038); + +?> +```` + +You can also use a normal instantiation technique: + +````php +lookup(48038); + +?> +```` + +Results are returned as a collection of class LookupModel: + +````php +county(); // Macomb +echo $lookup->city(); // Clinton Township +echo $lookup->state(); // Michigan +echo $lookup->stateShort(); // MI +echo $lookup->postalCode(); // 48038 +echo $lookup->latitude(); // 42.5868882 +echo $lookup->longitude(); // -82.9195514 + +// timezone() returns an instance of \DateTimeZone +echo $lookup->timezone()->getName(); // America/Detroit + +?> +```` + +## License + +Ziptastic PHP is licensed under the MIT license. \ No newline at end of file