{"action":"created","issue":{"url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/1187","repository_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map","labels_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/1187/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/1187/comments","events_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/1187/events","html_url":"https://github.com/PokemonGoMap/PokemonGo-Map/pull/1187","id":175380279,"number":1187,"title":"Get IVs for each discovered Pokemon and allow notification for high IVs","user":{"login":"owraight","id":930113,"avatar_url":"https://avatars.githubusercontent.com/u/930113?v=3","gravatar_id":"","url":"https://api.github.com/users/owraight","html_url":"https://github.com/owraight","followers_url":"https://api.github.com/users/owraight/followers","following_url":"https://api.github.com/users/owraight/following{/other_user}","gists_url":"https://api.github.com/users/owraight/gists{/gist_id}","starred_url":"https://api.github.com/users/owraight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owraight/subscriptions","organizations_url":"https://api.github.com/users/owraight/orgs","repos_url":"https://api.github.com/users/owraight/repos","events_url":"https://api.github.com/users/owraight/events{/privacy}","received_events_url":"https://api.github.com/users/owraight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":91,"created_at":"2016-09-06T23:57:34Z","updated_at":"2016-09-09T21:05:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/pulls/1187","html_url":"https://github.com/PokemonGoMap/PokemonGo-Map/pull/1187","diff_url":"https://github.com/PokemonGoMap/PokemonGo-Map/pull/1187.diff","patch_url":"https://github.com/PokemonGoMap/PokemonGo-Map/pull/1187.patch"},"body":"## Description\r\nThis change primarily involves the utils.py, models.py, search.py and map.js files.\r\n\r\nutils.py\r\n- Added a new argument (-iv / --get-ivs) to enable the getting of IVs.\r\n\r\nmodels.py\r\n- A new model (PokemonIVs) was created to hold the IVs for each Pokemon by encounter.\r\n- The Pokemon.get_active method was extended to join with the new model (degrading well with Pokemon who's IVs haven't been recorded.\r\n- parse_map was modified to return newly found Pokemon.\r\n\r\nsearch.py\r\n- search_worker_thread was modified to enter an encounter with newly found Pokemon and retrieve their IVs.\r\n- encounter_request was created to call the encounter api function.\r\n\r\nmap.js\r\n- pokemonLabel was modified to accept the attack, defense and stamina values; displaying them in the label.\r\n- The notification panel was modified to allow the user to be notified on high value IVs (by a percentage of perfection).\r\n\r\n## Motivation and Context\r\nEach Pokemon has its own unique individual values for attack, defense and stamina.  These values, if known, allow the user to catch the Pokemon that have the best potential. Although the IVs are unique to each Pokemon instance, the values are constant across accounts and so the mapping accounts can confidently record them for displaying on the map.\r\n\r\n## How Has This Been Tested?\r\nI have tested running the server with both the -iv argument specified and not.  In both cases, it was tested with and without Pokemon having already been discovered recently with the opposite case.\r\n\r\nI have tested the javascript label code by modifying the IVs for some pokemon manually in the database with various interesting test cases and inspected the map to ensure they were rendered correctly.\r\n\r\nI have tested the notification input by giving valid and invalid numbers as well as text and the empty string.  Then, by manually inserting IVs in the database, I have ascertained that it does indeed only notify when required.\r\n\r\nI believe that this change does not affect any other areas of the code.  I have, however, been using the change for a few days now and have seen no ill effects in the rest of the server.\r\n\r\n## Screenshots (if appropriate):\r\n![screenshot-pokemon go map - google chrome](https://cloud.githubusercontent.com/assets/930113/18295017/bb074c7c-7495-11e6-8ef7-fd095949e0bc.png)\r\n\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] 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- [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."},"comment":{"url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/comments/246039678","html_url":"https://github.com/PokemonGoMap/PokemonGo-Map/pull/1187#issuecomment-246039678","issue_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/1187","id":246039678,"user":{"login":"Spiritvn","id":5210757,"avatar_url":"https://avatars.githubusercontent.com/u/5210757?v=3","gravatar_id":"","url":"https://api.github.com/users/Spiritvn","html_url":"https://github.com/Spiritvn","followers_url":"https://api.github.com/users/Spiritvn/followers","following_url":"https://api.github.com/users/Spiritvn/following{/other_user}","gists_url":"https://api.github.com/users/Spiritvn/gists{/gist_id}","starred_url":"https://api.github.com/users/Spiritvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spiritvn/subscriptions","organizations_url":"https://api.github.com/users/Spiritvn/orgs","repos_url":"https://api.github.com/users/Spiritvn/repos","events_url":"https://api.github.com/users/Spiritvn/events{/privacy}","received_events_url":"https://api.github.com/users/Spiritvn/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T21:05:28Z","updated_at":"2016-09-09T21:05:28Z","body":"@Gallifery i dont think so, without filter, you will have it double requests to the server because it would make a bonus API call after any pokemon founds. It couldn't be same time, we only have encounter id to use to know its IV after found it. "}}
{"actor":{"display_login":"Spiritvn"}}