antonioribeiro / antonioribeiro/zipcode

Getting empty success with Geonames

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
97
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm having trouble debugging what went wrong with this Geonames API query, as I'm getting only an empty response object?

Here's output on psy shell (using Laravel's 'artisan tinker' -tool):

>>> $zip = new PragmaRX\ZipCode\ZipCode;
=> PragmaRX\ZipCode\ZipCode {#693
+"finder": PragmaRX\ZipCode\Support\Finder {#694
+"timer": PragmaRX\Support\Timer {#696},
+"result": PragmaRX\ZipCode\Support\Result {#697},
},
}
>>> $zip->setCountry('FI');
=> null
>>> $zip->setPreferredWebService('Geonames');
=> null
>>> $zip->setQueryParameter('geonames_username', 'xxxxxxx');
=> null
>>> $res = $zip->find('07420');
=> PragmaRX\ZipCode\Support\Result {#715}
>>> print_r($res->toArray());
Array
(
[success] =>
)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.