{"action":"closed","issue":{"url":"https://api.github.com/repos/sarcasmloading/selene/issues/1","repository_url":"https://api.github.com/repos/sarcasmloading/selene","labels_url":"https://api.github.com/repos/sarcasmloading/selene/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/sarcasmloading/selene/issues/1/comments","events_url":"https://api.github.com/repos/sarcasmloading/selene/issues/1/events","html_url":"https://github.com/sarcasmloading/selene/issues/1","id":335364775,"node_id":"MDU6SXNzdWUzMzUzNjQ3NzU=","number":1,"title":"Request bucketing","user":{"login":"sarcasmloading","id":29299928,"node_id":"MDQ6VXNlcjI5Mjk5OTI4","avatar_url":"https://avatars2.githubusercontent.com/u/29299928?v=4","gravatar_id":"","url":"https://api.github.com/users/sarcasmloading","html_url":"https://github.com/sarcasmloading","followers_url":"https://api.github.com/users/sarcasmloading/followers","following_url":"https://api.github.com/users/sarcasmloading/following{/other_user}","gists_url":"https://api.github.com/users/sarcasmloading/gists{/gist_id}","starred_url":"https://api.github.com/users/sarcasmloading/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarcasmloading/subscriptions","organizations_url":"https://api.github.com/users/sarcasmloading/orgs","repos_url":"https://api.github.com/users/sarcasmloading/repos","events_url":"https://api.github.com/users/sarcasmloading/events{/privacy}","received_events_url":"https://api.github.com/users/sarcasmloading/received_events","type":"User","site_admin":false},"labels":[{"id":974519749,"node_id":"MDU6TGFiZWw5NzQ1MTk3NDk=","url":"https://api.github.com/repos/sarcasmloading/selene/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"closed","locked":false,"assignee":{"login":"sarcasmloading","id":29299928,"node_id":"MDQ6VXNlcjI5Mjk5OTI4","avatar_url":"https://avatars2.githubusercontent.com/u/29299928?v=4","gravatar_id":"","url":"https://api.github.com/users/sarcasmloading","html_url":"https://github.com/sarcasmloading","followers_url":"https://api.github.com/users/sarcasmloading/followers","following_url":"https://api.github.com/users/sarcasmloading/following{/other_user}","gists_url":"https://api.github.com/users/sarcasmloading/gists{/gist_id}","starred_url":"https://api.github.com/users/sarcasmloading/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarcasmloading/subscriptions","organizations_url":"https://api.github.com/users/sarcasmloading/orgs","repos_url":"https://api.github.com/users/sarcasmloading/repos","events_url":"https://api.github.com/users/sarcasmloading/events{/privacy}","received_events_url":"https://api.github.com/users/sarcasmloading/received_events","type":"User","site_admin":false},"assignees":[{"login":"sarcasmloading","id":29299928,"node_id":"MDQ6VXNlcjI5Mjk5OTI4","avatar_url":"https://avatars2.githubusercontent.com/u/29299928?v=4","gravatar_id":"","url":"https://api.github.com/users/sarcasmloading","html_url":"https://github.com/sarcasmloading","followers_url":"https://api.github.com/users/sarcasmloading/followers","following_url":"https://api.github.com/users/sarcasmloading/following{/other_user}","gists_url":"https://api.github.com/users/sarcasmloading/gists{/gist_id}","starred_url":"https://api.github.com/users/sarcasmloading/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarcasmloading/subscriptions","organizations_url":"https://api.github.com/users/sarcasmloading/orgs","repos_url":"https://api.github.com/users/sarcasmloading/repos","events_url":"https://api.github.com/users/sarcasmloading/events{/privacy}","received_events_url":"https://api.github.com/users/sarcasmloading/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-06-25T11:22:42Z","updated_at":"2018-06-26T09:19:59Z","closed_at":"2018-06-26T09:19:59Z","author_association":"OWNER","body":"Request bucketing should be implemented to stop ratelimiting. I'm thinking a `RequestBucket` class on the `RestApi` class. `RequestBucket` should have a `List<RequestToken> tokens` (`RequestToken` being a simple class with a function handler (to be invoked when token is available), a `ready` token, maybe some other stuff) property. This should have a `queueRequest(transport.Request request)` function, which sequentially runs tokens when they become available. Should also parse headers from response. `RestApiBase` (and `RestApi`) will need to be updated to reflect this: their functions will now return requests"}}
{"actor":{"display_login":"sarcasmloading"}}