{"action":"created","issue":{"url":"https://api.github.com/repos/FuelRats/pipsqueak/issues/2","labels_url":"https://api.github.com/repos/FuelRats/pipsqueak/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/FuelRats/pipsqueak/issues/2/comments","events_url":"https://api.github.com/repos/FuelRats/pipsqueak/issues/2/events","html_url":"https://github.com/FuelRats/pipsqueak/issues/2","id":117229571,"number":2,"title":"Station search implementation","user":{"login":"kenneaal","id":3196591,"avatar_url":"https://avatars.githubusercontent.com/u/3196591?v=3","gravatar_id":"","url":"https://api.github.com/users/kenneaal","html_url":"https://github.com/kenneaal","followers_url":"https://api.github.com/users/kenneaal/followers","following_url":"https://api.github.com/users/kenneaal/following{/other_user}","gists_url":"https://api.github.com/users/kenneaal/gists{/gist_id}","starred_url":"https://api.github.com/users/kenneaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenneaal/subscriptions","organizations_url":"https://api.github.com/users/kenneaal/orgs","repos_url":"https://api.github.com/users/kenneaal/repos","events_url":"https://api.github.com/users/kenneaal/events{/privacy}","received_events_url":"https://api.github.com/users/kenneaal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FuelRats/pipsqueak/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-16T22:07:20Z","updated_at":"2015-11-17T08:59:03Z","closed_at":null,"body":"I'd like to suggest a few additions to pipsqueak to enable rats to search for a few vital points of information.\r\n\r\n## !scoopable <system name> [Jump range]\r\nReturns the closest class KGBFOAM star to specified system, alternatively with a specified jump range.\r\n\r\nExample output:\r\n\r\n**!scoopable COL 123 AB-C 1-33**\r\n*Mechasqueak: Nearest fuel source is COL 123 AB-C 2-4 (11.6 LY, class M)*\r\n**!scoopable COL 123 AB-C 1-33 5.35**\r\n*Mechasqueak: Nearest fuel source is COL 123 AB-C 2-4 (11.6 LY, Class M, 3 jumps)*\r\n\r\n## !refuel <system name> [pad size] [jump range]\r\nReturns the closest station with refuel capabilities and optionally specified minimum pad size.\r\n\r\nExample output:\r\n\r\n**!refuel COL 123 AB-C 1-33**\r\n*Mechasqueak: Nearest station is Happy Terminal, COL 123 AB-C 2-4 (11.6 LY, Size M pad)*\r\n**!refuel COL 123 AB-C 1-33 Large**\r\n*Mechasqueak: Nearest station is Bigpad Orbiter, COL 123 AB-C 2-4 (11.6 LY, Size L pad)*\r\n\r\n## !rearm <system name> [pad size] [jump range]\r\nReturns the closest station with rearm capabilities and optionally specified minimum pad size.\r\n\r\nExample output:\r\n\r\n**!refuel COL 123 AB-C 1-33**\r\n*Mechasqueak: Nearest station is Happy Terminal, COL 123 AB-C 2-4 (11.6 LY, Size M pad)*\r\n**!refuel COL 123 AB-C 1-33 Large**\r\n*Mechasqueak: Nearest station is Bigpad Orbiter, COL 123 AB-C 2-4 (11.6 LY, Size L pad)*\r\n\r\nAlot has already most of the groundwork that would be needed for this in his pathfinding Python, so this should be fairly easy to implement."},"comment":{"url":"https://api.github.com/repos/FuelRats/pipsqueak/issues/comments/157312599","html_url":"https://github.com/FuelRats/pipsqueak/issues/2#issuecomment-157312599","issue_url":"https://api.github.com/repos/FuelRats/pipsqueak/issues/2","id":157312599,"user":{"login":"tyrope","id":516490,"avatar_url":"https://avatars.githubusercontent.com/u/516490?v=3","gravatar_id":"","url":"https://api.github.com/users/tyrope","html_url":"https://github.com/tyrope","followers_url":"https://api.github.com/users/tyrope/followers","following_url":"https://api.github.com/users/tyrope/following{/other_user}","gists_url":"https://api.github.com/users/tyrope/gists{/gist_id}","starred_url":"https://api.github.com/users/tyrope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyrope/subscriptions","organizations_url":"https://api.github.com/users/tyrope/orgs","repos_url":"https://api.github.com/users/tyrope/repos","events_url":"https://api.github.com/users/tyrope/events{/privacy}","received_events_url":"https://api.github.com/users/tyrope/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T08:59:03Z","updated_at":"2015-11-17T08:59:03Z","body":"Since EDDB has a terrible .json download documentation (it's not even an API). Here's an example of both the JSONs (using the first set of {})\r\n\r\nsystems.json:\r\n```\r\n[\r\n    {\r\n        \"id\":1,\r\n        \"name\":\"1 G. Caeli\",\r\n        \"x\":80.90625,\r\n        \"y\":-83.53125,\r\n        \"z\":-30.8125,\r\n        \"faction\":\"1 G. Caeli Empire League\",\r\n        \"population\":6544826,\r\n        \"government\":\"Patronage\",\r\n        \"allegiance\":\"Empire\",\r\n        \"state\":\"None\",\r\n        \"security\":\"Medium\",\r\n        \"primary_economy\":\"Industrial\",\r\n        \"power\":null,\r\n        \"power_state\":null,\r\n        \"needs_permit\":0,\r\n        \"updated_at\":1444493764,\r\n        \"simbad_ref\":\"\"\r\n    }\r\n]\r\n```\r\nstations.json:\r\n```\r\n[\r\n    {\r\n        \"id\":1,\r\n        \"name\":\"Bain Colony\",\r\n        \"system_id\":18370,\r\n        \"max_landing_pad_size\":\"L\",\r\n        \"distance_to_star\":16253,\r\n        \"faction\":\"V492 Lyrae Co\",\r\n        \"government\":\"Corporate\",\r\n        \"allegiance\":\"Federation\",\r\n        \"state\":null,\r\n        \"type\":\"Unknown Starport\",\r\n        \"has_blackmarket\":0,\r\n        \"has_market\":1,\r\n        \"has_refuel\":1,\r\n        \"has_repair\":1,\r\n        \"has_rearm\":1,\r\n        \"has_outfitting\":1,\r\n        \"has_shipyard\":1,\r\n        \"has_commodities\":1,\r\n        \"import_commodities\":[],\r\n        \"export_commodities\":[],\r\n        \"prohibited_commodities\":[],\r\n        \"economies\":[\r\n            \"Tourism\"\r\n        ],\r\n        \"updated_at\":1444494520,\r\n        \"shipyard_updated_at\":null,\r\n        \"outfitting_updated_at\":null,\r\n        \"selling_ships\":[],\r\n        \"selling_modules\":[\r\n            738,\r\n            739,\r\n            740,\r\n            741,\r\n            742,\r\n            778,\r\n            779,\r\n            780,\r\n            781,\r\n            782,\r\n            871,\r\n            1085,\r\n            1191,\r\n            1207,\r\n            1239,\r\n            1242,\r\n            1286,\r\n            1306\r\n        ]\r\n    }\r\n]\r\n```\r\n\r\nthis information is technically enough for both !refuel and !rearm, but not !scoopable.\r\n\r\n@kenneaal Do you have an API that has star class information? (Bonus points for being better documented and/or lower filesize.)"}}