Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def get_commit_hash():

while True:
bot.tick()
inventory.refresh_inventory()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this trigger API protocol call to contact server?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does. Once we got our new map we’ll get rid of this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the local file server or The Niantic server?

Copy link
Member Author

@BriceSD BriceSD Aug 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niantic server inventory = self.bot.api.get_inventory().

Copy link
Contributor

@solderzzc solderzzc Aug 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mobile app contact server every 10s as know as the heartbeat, we should not change the api sequence. Even now, we have much work to refactor the call sequence.

Copy link
Member Author

@BriceSD BriceSD Aug 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An other solution could be to add something like inventory.to_json(). This way we wouldn’t need to make a call to the server.
But this seems pretty annoying to do. Definitely not on top of my priority list, I won’t do it myself.

Oohhh so that’s what hearbeat represent

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so we are good here :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also move this to the heartbeat method. It’s up to you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in the heartbeat function, not everyone uses the webui and not everyone should have to suffer a potential ban by doing api calls every tick because of a small minority who want a fancy gui


except KeyboardInterrupt:
bot.event_manager.emit(
Expand Down