Giter VIP home page Giter VIP logo

Comments (50)

Armax avatar Armax commented on July 18, 2024 7

You can get exact location only for catchable pokemons (I will close the issue but you can keep commenting)

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024 7

@Armax I was thinking that too - reverting back to simple-s2-node works for me currently. If anyone wants to test it - its in my fork of this repo @dddicillo @Armax

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024 4

selection_037

ITS ALIVEEEEEEEEEEEE - Okay, gonna clean up my code a bit and commit it to my fork, I don't think merging into this version is possible anymore because its deviated to ES5

from pokemon-go-node-api.

dddicillo avatar dddicillo commented on July 18, 2024 3

Can confirm that @d-pollard's fork still works using simple-s2-node

from pokemon-go-node-api.

Armax avatar Armax commented on July 18, 2024 2

Just tryed, I can get the pokemons and pokestop in my location o.O

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024 2

I haven't found another location that works right now.

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024 1

Yes, for london there are some Nearby

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024

I would assume server issue, but login and GetProfile are working fine. Tried a different location, same thing, going to try another account now.

from pokemon-go-node-api.

Upguard avatar Upguard commented on July 18, 2024

I tried 3 different locations. Times Square, Indianapolis, and London.. London was the only one that returned data.

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024

@Upguard is right, it's the location... London works for me too.

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024

Strange because it's parsing the lat/long fine with other locations, they just aren't returning data. I tried a lat/long that I know to have tons of Pokestops and gyms around it.

from pokemon-go-node-api.

chl03ks avatar chl03ks commented on July 18, 2024

I tried with London but i alway get the NearbyPokemon: [] array empty

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024

For London right now I am getting this (I added gym stuff):

[+] There is a Starmie guarding a 1 gym nearby
[+] There is a Rhydon guarding a 2 gym nearby
[+] There is a Snorlax guarding a 1 gym nearby
[+] There is a Venonat at 200 meters
[+] There is a Lapras at 200 meters
[+] There is a Drowzee at 200 meters
[+] There is a Snorlax guarding a 2 gym nearby

from pokemon-go-node-api.

MichaelCWarren avatar MichaelCWarren commented on July 18, 2024

+1 London works, but nothing else for me...

from pokemon-go-node-api.

devtin avatar devtin commented on July 18, 2024

same here...

from pokemon-go-node-api.

chl03ks avatar chl03ks commented on July 18, 2024

But can you get the nerby pokemons?

from pokemon-go-node-api.

chl03ks avatar chl03ks commented on July 18, 2024

Can you provideme with your lat/long

from pokemon-go-node-api.

MichaelCWarren avatar MichaelCWarren commented on July 18, 2024

I'm not using lat/long...

Carmel, IN
Indianapolis, IN

everything I try around here...

from pokemon-go-node-api.

devtin avatar devtin commented on July 18, 2024

I'm doing it with the following coords:

coords:{ latitude:25.8422642, longitude:-80.1848151, altitude:0 }

Nothing is shown nearby... Also tried with my address: 7300 Biscayne Blvd, it resolves more less the same coords, same results: nothing nearby. If I set London, it shows some pokemons nearby.

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024

@gvsdan I just used "London" and let the location script figure it out, came out with these coords: 51.5073509 -0.1277583... but yeah it remains the only place I can get stuff to show up.

from pokemon-go-node-api.

devtin avatar devtin commented on July 18, 2024

Basically, I noticed it's working with locations in Europe, Australia, Asia and Africa. Tried "Barcelona, EspaΓ±a", "Amsterdam", "London", "Rome, Italy", "Melbourne, Australia", "Shanghai, China", "Casablanca, Morocco" and ALL of them are working fine. Any chance the endpoint for America locations is a different one?

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024

@devtin I was just on the same train of thought and tested a bunch of similar locations, I think you're right

from pokemon-go-node-api.

segura2010 avatar segura2010 commented on July 18, 2024

There is no way to get location coords of the nearby pokemons?? :(

@Armax , what about the catch pokemon functions, have you tried them?? :)

from pokemon-go-node-api.

dddicillo avatar dddicillo commented on July 18, 2024

Looking at tejado/pgoapi, it looks like the login response may return an updated endpoint.

def login(self, provider, username, password):

        if not isinstance(username, str) or not isinstance(password, str):
            raise AuthException("Username/password not correctly specified")

        if provider == 'ptc':
            self._auth_provider = AuthPtc()
        elif provider == 'google':
            self._auth_provider = AuthGoogle()
        else:
            raise AuthException("Invalid authentication provider - only ptc/google available.")

        self.log.debug('Auth provider: %s', provider)

        if not self._auth_provider.login(username, password):
            self.log.info('Login process failed') 
            return False

        self.log.info('Starting RPC login sequence (app simulation)')

        # making a standard call, like it is also done by the client
        self.get_player()
        self.get_hatched_eggs()
        self.get_inventory()
        self.check_awarded_badges()
        self.download_settings(hash="05daf51635c82611d1aac95c0b051d3ec088a930")

        response = self.call()

        if not response: 
            self.log.info('Login failed!') 
            return False

        if 'api_url' in response:
            self._api_endpoint = ('https://{}/rpc'.format(response['api_url']))
            self.log.debug('Setting API endpoint to: %s', self._api_endpoint)
        else:
            self.log.error('Login failed - unexpected server response!')
            return False

        if 'auth_ticket' in response:
            self._auth_provider.set_ticket(response['auth_ticket'].values())

        self.log.info('Finished RPC login sequence (app simulation)')
        self.log.info('Login process completed') 

        return True

I'm at work so I can't test this theory right now. Thoughts?

from pokemon-go-node-api.

carldanley avatar carldanley commented on July 18, 2024

It does return a proper endpoint: https://github.com/tejado/pgoapi/blob/master/pgoapi/pgoapi.py#L163-L168.

from pokemon-go-node-api.

pokejones22 avatar pokejones22 commented on July 18, 2024

@Armax I don't think the original issue is resolved yet, there is still empty heartbeat cells for locations outside of Europe.

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

Something is definitely wrong, last night I got heartbeat cells full of information, and today - nothing. Empty.

from pokemon-go-node-api.

dddicillo avatar dddicillo commented on July 18, 2024

@carldanley Is the endpoint passed into the callback different from the default endpoint assigned during initialization?

from pokemon-go-node-api.

dddicillo avatar dddicillo commented on July 18, 2024

Okay, I just got home and confirmed that the response from the login function contains an updated api_url that differs from the original.

2016-07-21 15:27:27,243 [    pgoapi] [ INFO] Starting RPC login sequence (app simulation)
2016-07-21 15:27:27,243 [    pgoapi] [ INFO] Create new request...
2016-07-21 15:27:27,244 [    pgoapi] [ INFO] Adding 'GET_PLAYER' to RPC request
2016-07-21 15:27:27,246 [    pgoapi] [ INFO] Adding 'GET_HATCHED_EGGS' to RPC request
2016-07-21 15:27:27,246 [    pgoapi] [ INFO] Adding 'GET_INVENTORY' to RPC request
2016-07-21 15:27:27,246 [    pgoapi] [ INFO] Adding 'CHECK_AWARDED_BADGES' to RPC request
2016-07-21 15:27:27,246 [    pgoapi] [ INFO] Adding 'DOWNLOAD_SETTINGS' to RPC request including arguments
2016-07-21 15:27:27,247 [    pgoapi] [ INFO] Execution of RPC
2016-07-21 15:27:27,586 [    pgoapi] [ INFO] Cleanup of request!
2016-07-21 15:27:27,588 [    pgoapi] [ERROR] Looking for new API URL
2016-07-21 15:27:27,588 [    pgoapi] [ERROR] New API URL Found: pgorelease.nianticlabs.com/plfe/479
2016-07-21 15:27:27,589 [    pgoapi] [ INFO] Finished RPC login sequence (app simulation)
2016-07-21 15:27:27,589 [    pgoapi] [ INFO] Login process completed

I'll try modifying the logic in this port to match and see what happens.

from pokemon-go-node-api.

Armax avatar Armax commented on July 18, 2024

@billyriantono

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

@Armax @dddicillo @pokejones22 Did some testing, and @Armax 's code works in my repo, so I doubt its the API_URL

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

Also worth mentioning I upgraded the code keeping with the ES6 half style, and was selective as to what I upgraded from @Armax 's repo into mine

from pokemon-go-node-api.

Armax avatar Armax commented on July 18, 2024

I think that the problem is with the s2 library, because atm I can get pokemons

from pokemon-go-node-api.

dddicillo avatar dddicillo commented on July 18, 2024

You're right. GetApiEndpoint seems to contain the logic I was seeing

from pokemon-go-node-api.

Armax avatar Armax commented on July 18, 2024

simple-s2-node doesn't work for europe (or at least wasn't working)

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

@dddicillo @pokejones22 I'm about to push an update to it that will allow you to catch pokemon

from pokemon-go-node-api.

WilliamIPark avatar WilliamIPark commented on July 18, 2024

@d-pollard I'm trying to run your version through Babel with the ES2015 preset. It's having an issue here:
C:\Users\willi\Desktop\Babel\node_modules\pokemon-go\poke.io.js:23 const {RequestEnvelop, ResponseEnvelop} = pokemonProto; SyntaxError: Unexpected token {

Not the greatest with Babel, any pointers?

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

@WilliamIPark - I suggest installing the most recent version of node

from pokemon-go-node-api.

trickpattyFH20 avatar trickpattyFH20 commented on July 18, 2024

@d-pollard why is it not an official fork of this repo though? :/ it will be more complicated to merge and track the two code bases for somebody that wants to stay up to date with other aspects of this library...

from pokemon-go-node-api.

davidpaulhunt avatar davidpaulhunt commented on July 18, 2024

UPDATE: Forget what I said, I imported my original index.js from an earlier attempt and all works as it should. Probably a syntax error somewhere πŸŽ…

@d-pollard Using this version, I'm able to login successfully but run into the empty cells issue, however, when using your fork, it always throws Error: RPC Server offline.

Any thoughts?

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

@trickpattyFH20 - I had my fork turned into my own repo because my version has deviated significantly. I am probably also going to promisify my version too for simplicities sake.

from pokemon-go-node-api.

devtin avatar devtin commented on July 18, 2024

Last night I started working on a UI implementation for this. Please let me know if any of you want to participate. (cc: @d-pollard @Armax @dddicillo @pokejones22)

https://nearpokemons.com/

from pokemon-go-node-api.

segura2010 avatar segura2010 commented on July 18, 2024

@devtin i think this is difficult.. you only obtain long/lat of pokemons if they are very close, enough to catch them (WildPokemon array).. :(

Actually i have done a web app to see pokestops, and with a simple bot/client which goes to the location you click on the web app map. It gets the route from google maps and use hearbeat to walk using the waypoints. It catchs the pokemons and uses pokestops it find in the path.

from pokemon-go-node-api.

chl03ks avatar chl03ks commented on July 18, 2024

Does anyone is getting wildpokemon data?

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

@segura2010 @gvsdan - I am getting (and catching) wild pokemon successfully with my repo

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

@devtin that looks interesting - got a repo I can follow?

from pokemon-go-node-api.

segura2010 avatar segura2010 commented on July 18, 2024

@d-pollard i did a pull request with some changes to avoid errors when you try to catch pokemons. My forked repo have it working fine, it works with my bot. I think my PR will be merged when @Armax comes. :)

from pokemon-go-node-api.

chl03ks avatar chl03ks commented on July 18, 2024

@d-pollard What is your location (lat/lng)? (Sounds weird )

from pokemon-go-node-api.

d-pollard avatar d-pollard commented on July 18, 2024

@gvsdan I can use any lat/lng

from pokemon-go-node-api.

devtin avatar devtin commented on July 18, 2024

@d-pollard just created a repo for it: https://github.com/devtin/nearpokemons

from pokemon-go-node-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.