{"action":"created","issue":{"url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/issues/1844","repository_url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map","labels_url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/issues/1844/labels{/name}","comments_url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/issues/1844/comments","events_url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/issues/1844/events","html_url":"https://github.com/AHAAAAAAA/PokemonGo-Map/pull/1844","id":167240322,"number":1844,"title":"Minimize update-size in raw_data","user":{"login":"Chlodochar","id":20544269,"avatar_url":"https://avatars.githubusercontent.com/u/20544269?v=3","gravatar_id":"","url":"https://api.github.com/users/Chlodochar","html_url":"https://github.com/Chlodochar","followers_url":"https://api.github.com/users/Chlodochar/followers","following_url":"https://api.github.com/users/Chlodochar/following{/other_user}","gists_url":"https://api.github.com/users/Chlodochar/gists{/gist_id}","starred_url":"https://api.github.com/users/Chlodochar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chlodochar/subscriptions","organizations_url":"https://api.github.com/users/Chlodochar/orgs","repos_url":"https://api.github.com/users/Chlodochar/repos","events_url":"https://api.github.com/users/Chlodochar/events{/privacy}","received_events_url":"https://api.github.com/users/Chlodochar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-24T16:06:02Z","updated_at":"2016-07-26T21:18:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/pulls/1844","html_url":"https://github.com/AHAAAAAAA/PokemonGo-Map/pull/1844","diff_url":"https://github.com/AHAAAAAAA/PokemonGo-Map/pull/1844.diff","patch_url":"https://github.com/AHAAAAAAA/PokemonGo-Map/pull/1844.patch"},"body":"## Description\r\nThis optimizes the updates send using `raw_data` to only contain items that were changed in-between updates.\r\n\r\n### Database\r\n\r\nThis adds `last_modified` to Pokemon, so that the server knows when a Pokemon was found.\r\nThis also restructures the queries, so that lastModified can be used optionally.\r\n\r\n### Server\r\n\r\nThis restructures the `raw_data` function a bit so that queries are done in a more flexible manner. This was not required, but it made the resulting code smaller and (imo) more readable. Another side-effect is that the viewmodels are created in `app.py` instead of `model.py`. It seemed to me `model.py` should only contain the database models.\r\n\r\n### Client\r\n\r\nThe client now tracks when it was last updated and with what parameters (bounds, showPokemon, showGym, etc). If the parameters stay the same, a minimal update can be done. If the parameters do change (by moving the map) a full update is required.\r\n\r\n## Motivation and Context\r\n\r\nI have a limited data subscription on my phone and sending over the whole set of pokemon, pokestops and gyms every 5 seconds took quite a bit of data.\r\n\r\n## How Has This Been Tested?\r\n\r\nRan on my PC. Checked network activity in browser and checked console.\r\n\r\n## Types of changes\r\n\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n"},"comment":{"url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/issues/comments/235408591","html_url":"https://github.com/AHAAAAAAA/PokemonGo-Map/pull/1844#issuecomment-235408591","issue_url":"https://api.github.com/repos/AHAAAAAAA/PokemonGo-Map/issues/1844","id":235408591,"user":{"login":"Chlodochar","id":20544269,"avatar_url":"https://avatars.githubusercontent.com/u/20544269?v=3","gravatar_id":"","url":"https://api.github.com/users/Chlodochar","html_url":"https://github.com/Chlodochar","followers_url":"https://api.github.com/users/Chlodochar/followers","following_url":"https://api.github.com/users/Chlodochar/following{/other_user}","gists_url":"https://api.github.com/users/Chlodochar/gists{/gist_id}","starred_url":"https://api.github.com/users/Chlodochar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chlodochar/subscriptions","organizations_url":"https://api.github.com/users/Chlodochar/orgs","repos_url":"https://api.github.com/users/Chlodochar/repos","events_url":"https://api.github.com/users/Chlodochar/events{/privacy}","received_events_url":"https://api.github.com/users/Chlodochar/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T21:18:27Z","updated_at":"2016-07-26T21:18:27Z","body":"I'd like to get this merged. I've been running this on my server for a while. It seems to be working well. Last change also removed a dependency on dateutil.\r\n\r\nQuite a lot of changes and a added column to the pokemon table in the database. It would be nice to know what others think. Atm this PR seems to be dying :(. Is this an unwanted feature? Should I split this PR up into database-related changes and http-related changes?\r\n\r\nAny feedback is welcome!"}}
{"actor":{"display_login":"Chlodochar"}}