{"action":"created","issue":{"url":"https://api.github.com/repos/uranusjr/pythonup-windows/issues/11","repository_url":"https://api.github.com/repos/uranusjr/pythonup-windows","labels_url":"https://api.github.com/repos/uranusjr/pythonup-windows/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/uranusjr/pythonup-windows/issues/11/comments","events_url":"https://api.github.com/repos/uranusjr/pythonup-windows/issues/11/events","html_url":"https://github.com/uranusjr/pythonup-windows/issues/11","id":365803445,"node_id":"MDU6SXNzdWUzNjU4MDM0NDU=","number":11,"title":"Fetch releases automatically instead of shipping a static data file","user":{"login":"uranusjr","id":605277,"node_id":"MDQ6VXNlcjYwNTI3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/605277?v=4","gravatar_id":"","url":"https://api.github.com/users/uranusjr","html_url":"https://github.com/uranusjr","followers_url":"https://api.github.com/users/uranusjr/followers","following_url":"https://api.github.com/users/uranusjr/following{/other_user}","gists_url":"https://api.github.com/users/uranusjr/gists{/gist_id}","starred_url":"https://api.github.com/users/uranusjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uranusjr/subscriptions","organizations_url":"https://api.github.com/users/uranusjr/orgs","repos_url":"https://api.github.com/users/uranusjr/repos","events_url":"https://api.github.com/users/uranusjr/events{/privacy}","received_events_url":"https://api.github.com/users/uranusjr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-02T09:02:25Z","updated_at":"2018-10-17T08:45:24Z","closed_at":null,"author_association":"OWNER","body":"Maybe it’d be a good idea to use the (public?) API endpoint https://www.python.org/api/v1/downloads/release/\r\n\r\nBased on how the API is implemented (no real version filtering), it might be best to implement this a la API/Homebrew etc. `pythonup update` queries the API to generate a new on-disk manifest, and `install` and `upgrade` uses that manifest to determine whether there is a new version.\r\n\r\n1. Fetch `/downloads/release/` (maybe set `limit` to somewhere around 100?)\r\n2. Parse `slug` to find the best release for each X.Y (only stable right now, maybe prerelease support can be added in the future)\r\n3. Parse `resource_uri` to find the release ID (this is quite bad, but I don’t think there is a better way; maybe I should file an issue to pythonorg to allow `release_file` to be filterable on release by slug).\r\n4. Fetch `/downloads/release_file/release=<id>&os=1` to get a list of files for Windows (1 means Windows, this is quite bad too, but making an extra request to `/downloads/os/?slug=windows` is also ridiculous; maybe another issue to filter `release_file` on os slug).\r\n5. Parse the slug to find what we want. I think this is actually *the* way? The slug seems quite consistent across versions.\r\n6. Save the MD5 sum and download URL."},"comment":{"url":"https://api.github.com/repos/uranusjr/pythonup-windows/issues/comments/430542923","html_url":"https://github.com/uranusjr/pythonup-windows/issues/11#issuecomment-430542923","issue_url":"https://api.github.com/repos/uranusjr/pythonup-windows/issues/11","id":430542923,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDU0MjkyMw==","user":{"login":"uranusjr","id":605277,"node_id":"MDQ6VXNlcjYwNTI3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/605277?v=4","gravatar_id":"","url":"https://api.github.com/users/uranusjr","html_url":"https://github.com/uranusjr","followers_url":"https://api.github.com/users/uranusjr/followers","following_url":"https://api.github.com/users/uranusjr/following{/other_user}","gists_url":"https://api.github.com/users/uranusjr/gists{/gist_id}","starred_url":"https://api.github.com/users/uranusjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uranusjr/subscriptions","organizations_url":"https://api.github.com/users/uranusjr/orgs","repos_url":"https://api.github.com/users/uranusjr/repos","events_url":"https://api.github.com/users/uranusjr/events{/privacy}","received_events_url":"https://api.github.com/users/uranusjr/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T08:45:24Z","updated_at":"2018-10-17T08:45:24Z","author_association":"OWNER","body":"I guess it would be good enough to just fetch releases for 3.5+ and use a static file for 2.7 and 3.4. I really don’t want to complicate things because of old stuff."}}
{"actor":{"display_login":"uranusjr"}}