{"action":"created","issue":{"url":"https://api.github.com/repos/OpenPoGo/OpenPoGoWeb/issues/27","repository_url":"https://api.github.com/repos/OpenPoGo/OpenPoGoWeb","labels_url":"https://api.github.com/repos/OpenPoGo/OpenPoGoWeb/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/OpenPoGo/OpenPoGoWeb/issues/27/comments","events_url":"https://api.github.com/repos/OpenPoGo/OpenPoGoWeb/issues/27/events","html_url":"https://github.com/OpenPoGo/OpenPoGoWeb/issues/27","id":167284347,"number":27,"title":"Add 'Candy' Menu item to trainer","user":{"login":"ththompson","id":347695,"avatar_url":"https://avatars.githubusercontent.com/u/347695?v=3","gravatar_id":"","url":"https://api.github.com/users/ththompson","html_url":"https://github.com/ththompson","followers_url":"https://api.github.com/users/ththompson/followers","following_url":"https://api.github.com/users/ththompson/following{/other_user}","gists_url":"https://api.github.com/users/ththompson/gists{/gist_id}","starred_url":"https://api.github.com/users/ththompson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ththompson/subscriptions","organizations_url":"https://api.github.com/users/ththompson/orgs","repos_url":"https://api.github.com/users/ththompson/repos","events_url":"https://api.github.com/users/ththompson/events{/privacy}","received_events_url":"https://api.github.com/users/ththompson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-25T05:17:06Z","updated_at":"2016-07-25T07:02:29Z","closed_at":null,"body":"View current candies for all base pokemons.\r\n\r\nUnable to PR atm. Menu code dump:\r\n\r\n```Javascript\r\nif (menu == 5) {\r\n    /*Candy Menu*/\r\n    var current_user_candy = user_data[users[user_id]].bagCandy;\r\n    var total_candy = 0;\r\n\r\n    document.getElementById('sortButtons').innerHTML = \"\";\r\n    out = '<div class=\"row items\">';\r\n    for (i = 0; i < current_user_candy.length; i++) {\r\n      pkmnNum = current_user_candy[i].inventory_item_data.pokemon_family.family_id;\r\n      pkmnImage = pad_with_zeroes(pkmnNum, 3) +'.png';\r\n      pkmnName = pokemonArray[pkmnNum-1].Name;\r\n\r\n      out += '<div class=\"col s12 m4 l3 center\"><img src=\"image/pokemon/' +\r\n              pkmnImage +\r\n              '\" class=\"png_img\"><br><b> ' +\r\n              pkmnName +\r\n              '</b><br>Candy: ' +\r\n              current_user_candy[i].inventory_item_data.pokemon_family.candy +\r\n              '</div>';\r\n      total_candy += current_user_candy[i].inventory_item_data.pokemon_family.candy;\r\n    }\r\n    out += '</div>';\r\n    document.getElementById('subtitle').innerHTML = \"Candy. \" +current_user_candy.length+\" types. \" +total_candy+ \" total.\" ;\r\n    document.getElementById('subcontent').innerHTML = out;\r\n  }\r\n```\r\n\r\nEdit: code to display as per copypasta of existing menus."},"comment":{"url":"https://api.github.com/repos/OpenPoGo/OpenPoGoWeb/issues/comments/234857842","html_url":"https://github.com/OpenPoGo/OpenPoGoWeb/issues/27#issuecomment-234857842","issue_url":"https://api.github.com/repos/OpenPoGo/OpenPoGoWeb/issues/27","id":234857842,"user":{"login":"Reaver01","id":1864450,"avatar_url":"https://avatars.githubusercontent.com/u/1864450?v=3","gravatar_id":"","url":"https://api.github.com/users/Reaver01","html_url":"https://github.com/Reaver01","followers_url":"https://api.github.com/users/Reaver01/followers","following_url":"https://api.github.com/users/Reaver01/following{/other_user}","gists_url":"https://api.github.com/users/Reaver01/gists{/gist_id}","starred_url":"https://api.github.com/users/Reaver01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reaver01/subscriptions","organizations_url":"https://api.github.com/users/Reaver01/orgs","repos_url":"https://api.github.com/users/Reaver01/repos","events_url":"https://api.github.com/users/Reaver01/events{/privacy}","received_events_url":"https://api.github.com/users/Reaver01/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T07:02:29Z","updated_at":"2016-07-25T07:02:29Z","body":"Would rather add this to the Pokemon list, possibly the Pokedex as well (So you can see how many candies you have for pokemon not currently in your inventory.)  \r\nIt is something I have had my eye on though."}}
{"actor":{"display_login":"Reaver01"}}