{"id":17684354,"url":"https://github.com/nigelhorne/geo-coder-geoapify","last_synced_at":"2025-04-19T20:21:58.774Z","repository":{"id":259242647,"uuid":"877366357","full_name":"nigelhorne/Geo-Coder-GeoApify","owner":"nigelhorne","description":"Provides a geocoding functionality using https://www.geoapify.com/maps-api/","archived":false,"fork":false,"pushed_at":"2025-03-04T14:56:44.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T23:45:33.142Z","etag":null,"topics":["cpan","cpan-module","geocode","geocoder","geocoding","perl","perl5","perl5-module"],"latest_commit_sha":null,"homepage":"https://www.geoapify.com/maps-api/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigelhorne.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T14:26:52.000Z","updated_at":"2025-03-04T14:56:48.000Z","dependencies_parsed_at":"2024-10-23T20:41:17.483Z","dependency_job_id":"19b7a4e3-7552-4106-9136-f711f77339fd","html_url":"https://github.com/nigelhorne/Geo-Coder-GeoApify","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":0.2222222222222222,"last_synced_commit":"b6c6434b9dd201e05ba60372edc1965d26e69149"},"previous_names":["nigelhorne/geo-coder-geoapify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FGeo-Coder-GeoApify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FGeo-Coder-GeoApify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FGeo-Coder-GeoApify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FGeo-Coder-GeoApify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelhorne","download_url":"https://codeload.github.com/nigelhorne/Geo-Coder-GeoApify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249792518,"owners_count":21326357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpan","cpan-module","geocode","geocoder","geocoding","perl","perl5","perl5-module"],"created_at":"2024-10-24T10:05:06.990Z","updated_at":"2025-04-19T20:21:58.768Z","avatar_url":"https://github.com/nigelhorne.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nGeo::Coder::GeoApify - Provides a Geo-Coding functionality using [https://www.geoapify.com/maps-api/](https://www.geoapify.com/maps-api/)\n\n# VERSION\n\nVersion 0.02\n\n# SYNOPSIS\n\n    use Geo::Coder::GeoApify;\n\n    my $geo_coder = Geo::Coder::GeoApify-\u003enew(apiKey =\u003e $ENV{'GEOAPIFY_KEY'});\n    my $location = $geo_coder-\u003egeocode(location =\u003e '10 Downing St., London, UK');\n\n# DESCRIPTION\n\nGeo::Coder::GeoApify provides an interface to https://www.geoapify.com/maps-api/,\na free Geo-Coding database covering many countries.\n\n- Caching\n\n    Identical geocode requests are cached (using [CHI](https://metacpan.org/pod/CHI) or a user-supplied caching object),\n    reducing the number of HTTP requests to the API and speeding up repeated queries.\n\n    This module leverages [CHI](https://metacpan.org/pod/CHI) for caching geocoding responses.\n    When a geocode request is made,\n    a cache key is constructed from the request.\n    If a cached response exists,\n    it is returned immediately,\n    avoiding unnecessary API calls.\n\n- Rate-Limiting\n\n    A minimum interval between successive API calls can be enforced to ensure that the API is not overwhelmed and to comply with any request throttling requirements.\n\n    Rate-limiting is implemented using [Time::HiRes](https://metacpan.org/pod/Time%3A%3AHiRes).\n    A minimum interval between API\n    calls can be specified via the `min_interval` parameter in the constructor.\n    Before making an API call,\n    the module checks how much time has elapsed since the\n    last request and,\n    if necessary,\n    sleeps for the remaining time.\n\n# METHODS\n\n## new\n\n    $geo_coder = Geo::Coder::GeoApify-\u003enew(apiKey =\u003e $ENV{'GEOAPIFY_KEY'});\n\nCreates a new `Geo::Coder::GeoApify` object with the provided apiKey.\n\nIt takes several optional parameters:\n\n- `cache`\n\n    A caching object.\n    If not provided,\n    an in-memory cache is created with a default expiration of one hour.\n\n- `host`\n\n    The API host endpoint.\n    Defaults to [https://api.geoapify.com/v1/geocode](https://api.geoapify.com/v1/geocode).\n\n- `min_interval`\n\n    Minimum number of seconds to wait between API requests.\n    Defaults to `0` (no delay).\n    Use this option to enforce rate-limiting.\n\n- `ua`\n\n    An object to use for HTTP requests.\n    If not provided, a default user agent is created.\n\n## geocode\n\n    $location = $geo_coder-\u003egeocode(location =\u003e $location);\n\n    print 'Latitude: ', $location-\u003e{'features'}[0]{'geometry'}{'coordinates'}[1], \"\\n\";\n    print 'Longitude: ', $location-\u003e{'features'}[0]{'geometry'}{'coordinates'}[0], \"\\n\";\n\n    @locations = $geo_coder-\u003egeocode('Portland, USA');\n    print 'There are Portlands in ', join (', ', map { $_-\u003e{'state'} } @locations), \"\\n\";\n\n## ua\n\nAccessor method to get and set UserAgent object used internally. You\ncan call _env\\_proxy_ for example, to get the proxy information from\nenvironment variables:\n\n    $geo_coder-\u003eua()-\u003eenv_proxy(1);\n\nYou can also set your own User-Agent object:\n\n    use LWP::UserAgent::Throttled;\n\n    my $ua = LWP::UserAgent::Throttled-\u003enew();\n    $ua-\u003ethrottle({ 'api.geoapify.com' =\u003e 5 });\n    $ua-\u003eenv_proxy(1);\n    $geo_coder = Geo::Coder::GeoApify-\u003enew({ ua =\u003e $ua, apiKey =\u003e $ENV{'GEOAPIFY_KEY'} });\n\n## reverse\\_geocode\n\n    my $address = $geo_coder-\u003ereverse_geocode(lat =\u003e 37.778907, lon =\u003e -122.39732);\n    print 'City: ', $address-\u003e{features}[0]-\u003e{'properties'}{'city'}, \"\\n\";\n\nSimilar to geocode except it expects a latitude,longitude pair.\n\n# AUTHOR\n\nNigel Horne, `\u003cnjh at bandsman.co.uk\u003e`\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n\nLots of thanks to the folks at geoapify.com\n\n# SEE ALSO\n\n[Geo::Coder::GooglePlaces](https://metacpan.org/pod/Geo%3A%3ACoder%3A%3AGooglePlaces), [HTML::GoogleMaps::V3](https://metacpan.org/pod/HTML%3A%3AGoogleMaps%3A%3AV3)\n\n# LICENSE AND COPYRIGHT\n\nCopyright 2024 Nigel Horne.\n\nThis program is released under the following licence: GPL2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fgeo-coder-geoapify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelhorne%2Fgeo-coder-geoapify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fgeo-coder-geoapify/lists"}