Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented the faster /geo call #3

Merged
merged 2 commits into from
Jan 19, 2015

Conversation

rvanlaak
Copy link
Contributor

... as can be found on http://ipinfo.io/developers

@cmwelsh
Copy link
Contributor

cmwelsh commented Jan 16, 2015

This is already implemented. Here is the code I use:

    $ipInfo = new Ipinfo();
    $ip = '127.0.0.1';
    $host = $ipInfo->getSpecificField($ip, Ipinfo::GEO);
    $city = $host->getCity();
    $state = $host->getRegion();
    $country = $host->getCountry();

@rvanlaak
Copy link
Contributor Author

You are totally right, but it isn't that clear in my opinion. Will be better to make a sort of stub call for this in my opinion. I modified my PR and improved the readme.

@DavidePastore DavidePastore self-assigned this Jan 17, 2015
@DavidePastore
Copy link
Owner

Hi @rvanlaak, thanks for the interest in this project. 😄
Did you try to test it with phpunit? It seems they added the postal field that is not yet documented. Can you confirm this? Thanks. 🍰

@DavidePastore
Copy link
Owner

@rvanlaak can you please rebase your PR in one commit?

... as documented on http://ipinfo.io/developers

Add test for geoDetails call

Stub the ipGeo call to use the getSpecificField function
@rvanlaak
Copy link
Contributor Author

Rebased the commits, left the documentation commit a separate one. Will test the postal for you later today

DavidePastore added a commit that referenced this pull request Jan 19, 2015
Implemented the faster `/geo` call
@DavidePastore DavidePastore merged commit 66ff336 into DavidePastore:master Jan 19, 2015
@DavidePastore
Copy link
Owner

Thanks @rvanlaak ! You rock 🎸

@rvanlaak rvanlaak deleted the patch-2 branch January 19, 2015 13:21
@DavidePastore DavidePastore added this to the v0.1.1 milestone Nov 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants