Skip to content

Getting empty success with Geonames #9

Description

@ux-engineer

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] =>
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions