{"action":"created","issue":{"url":"https://api.github.com/repos/wmde/Lizenzverweisgenerator/issues/203","labels_url":"https://api.github.com/repos/wmde/Lizenzverweisgenerator/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/wmde/Lizenzverweisgenerator/issues/203/comments","events_url":"https://api.github.com/repos/wmde/Lizenzverweisgenerator/issues/203/events","html_url":"https://github.com/wmde/Lizenzverweisgenerator/pull/203","id":126884853,"number":203,"title":"Get all the templates","user":{"login":"wmde-manicki","id":12729452,"avatar_url":"https://avatars.githubusercontent.com/u/12729452?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde-manicki","html_url":"https://github.com/wmde-manicki","followers_url":"https://api.github.com/users/wmde-manicki/followers","following_url":"https://api.github.com/users/wmde-manicki/following{/other_user}","gists_url":"https://api.github.com/users/wmde-manicki/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde-manicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde-manicki/subscriptions","organizations_url":"https://api.github.com/users/wmde-manicki/orgs","repos_url":"https://api.github.com/users/wmde-manicki/repos","events_url":"https://api.github.com/users/wmde-manicki/events{/privacy}","received_events_url":"https://api.github.com/users/wmde-manicki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-15T14:39:07Z","updated_at":"2016-01-18T11:19:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wmde/Lizenzverweisgenerator/pulls/203","html_url":"https://github.com/wmde/Lizenzverweisgenerator/pull/203","diff_url":"https://github.com/wmde/Lizenzverweisgenerator/pull/203.diff","patch_url":"https://github.com/wmde/Lizenzverweisgenerator/pull/203.patch"},"body":"Task: https://phabricator.wikimedia.org/T123520\r\nDemo: https://tools.wmflabs.org/file-reuse-test/api-continuation/\r\n\r\nThe problem that has been discovered using: `https://commons.wikimedia.org/wiki/File:Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg`. The page of that file has some 147 templates or so, while the tool has been only fetching 100 templates. That was usually OK but as the licence templates of the Mona Lisa didn't make it in the first hundred, the tool assumed there is no known licence template, and showed the relevant error message.\r\nThe quick fix would be probably increasing the number of templates fetched for a page (API's limit being 500) but I doubt it is a way to go. API offers a possibility to continue the previous query if number of stuffs to return is bigger than requested amount (100 in our case).\r\nThis patch intends to use this feature of the API. (At least) in theory, it should be used for all other API calls tool is doing, not only templates, but as I find it rather unlikely that it makes any sense in other types of queries, only template query uses it for now.\r\n\r\nI am not super happy with the way those recursive deferred/promise objects are done here, so I'd be glad to see some comments and suggestions how to make it cleaner."},"comment":{"url":"https://api.github.com/repos/wmde/Lizenzverweisgenerator/issues/comments/172501615","html_url":"https://github.com/wmde/Lizenzverweisgenerator/pull/203#issuecomment-172501615","issue_url":"https://api.github.com/repos/wmde/Lizenzverweisgenerator/issues/203","id":172501615,"user":{"login":"addshore","id":3308769,"avatar_url":"https://avatars.githubusercontent.com/u/3308769?v=3","gravatar_id":"","url":"https://api.github.com/users/addshore","html_url":"https://github.com/addshore","followers_url":"https://api.github.com/users/addshore/followers","following_url":"https://api.github.com/users/addshore/following{/other_user}","gists_url":"https://api.github.com/users/addshore/gists{/gist_id}","starred_url":"https://api.github.com/users/addshore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addshore/subscriptions","organizations_url":"https://api.github.com/users/addshore/orgs","repos_url":"https://api.github.com/users/addshore/repos","events_url":"https://api.github.com/users/addshore/events{/privacy}","received_events_url":"https://api.github.com/users/addshore/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T11:19:30Z","updated_at":"2016-01-18T11:19:30Z","body":"+1 from me!\r\n\r\nIt might be a nice idea to have some sort of HARD limit on the recursion so that if something off happens it doesn't consume all of the memory and make all of the requests!"}}