Skip to content

Comments

Update web inventory at every tick#4507

Closed
BriceSD wants to merge 1 commit intoPokemonGoF:devfrom
BriceSD:feature/update-web-inventory
Closed

Update web inventory at every tick#4507
BriceSD wants to merge 1 commit intoPokemonGoF:devfrom
BriceSD:feature/update-web-inventory

Conversation

@BriceSD
Copy link
Member

@BriceSD BriceSD commented Aug 21, 2016

Short Description:

Now update again web inventory

Fixes/Resolves/Closes :

@mention-bot
Copy link

@BriceSD, thanks for your PR! By analyzing the annotation information on this pull request, we identified @douglascamata, @TheSavior and @Quantra to be potential reviewers


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

@solderzzc
Copy link
Contributor

We'd better compare the MITM package with real app. To understand what do they including in the heartbeat.

@BriceSD
Copy link
Member Author

BriceSD commented Aug 22, 2016

Closed in favour of #4513

@BriceSD BriceSD closed this Aug 22, 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.

4 participants