{"action":"created","issue":{"url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/issues/63","labels_url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/issues/63/comments","events_url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/issues/63/events","html_url":"https://github.com/Josh-Star/AniList-API-Docs/issues/63","id":126327134,"number":63,"title":"AniList API v2","user":{"login":"Josh-Star","id":7507582,"avatar_url":"https://avatars.githubusercontent.com/u/7507582?v=3","gravatar_id":"","url":"https://api.github.com/users/Josh-Star","html_url":"https://github.com/Josh-Star","followers_url":"https://api.github.com/users/Josh-Star/followers","following_url":"https://api.github.com/users/Josh-Star/following{/other_user}","gists_url":"https://api.github.com/users/Josh-Star/gists{/gist_id}","starred_url":"https://api.github.com/users/Josh-Star/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Josh-Star/subscriptions","organizations_url":"https://api.github.com/users/Josh-Star/orgs","repos_url":"https://api.github.com/users/Josh-Star/repos","events_url":"https://api.github.com/users/Josh-Star/events{/privacy}","received_events_url":"https://api.github.com/users/Josh-Star/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/labels/API%20v2","name":"API v2","color":"009800"},{"url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/labels/discussion","name":"discussion","color":"CC317C"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-13T02:38:25Z","updated_at":"2016-01-13T17:08:00Z","closed_at":null,"body":"Currently API v1 is fine but has a large number of issues and inconsistencies, this issue is to discuss possible API breaking improvements and features for a new second version of the API.\r\n\r\nPlease submit any ideas or changes you would like to see for API v2 here.\r\nI would especially love to hear from developers who have used our API in production (@blitzprog, @Kazakuri, @z411, @ratan12, @Nihilate) and developers that have worked on or with other public APIs.\r\n\r\nTime frame for API v2: (This is just an initial idea, very much likely to change) \r\n- January release refactor of AniList front end\r\n- Q1 2016 refactor AniList backend and start initial API v2 work\r\n- Q2 2016 AniList backend released and Open Source AniList\r\n- Q2 2016 release alpha version of API v2 to public, work with community to stable\r\n- Q2/Early Q3 2016 release stable API v2\r\n- +6 months after API v2 release, discontinue API v1 \r\n\r\nHere are a few initial changes I would like to see:\r\n- __Consistent types__, at the moment in API v1 some int are strings, and some booleans are ints (0 or 1). In API v2 everything should be cast to their correct type before output, this can be done easily with Laravel 5's cast feature.\r\n- __More Flexibility__, API v1 is too restrictive with small data models and relational data, API v2 should provide more data and options, possibly even providing [SQLish functionality to the API endpoints](https://github.com/marcelgwerder/laravel-api-handler#filtering).\r\n- __Consistent return models__, some endpoints in API v1 return data along with pagination data, others don't for no real reason. Some errors are returned in a JSON format, while others there is no JSON output and instead developers much rely on HTTP status code. All of this should be standardized for every API output.\r\n- __More Meta Data__, (this continues on for the previous point) API v2 should provide a meta data object with every model, with information like counts, current API url, model API url, model AniList.co site url etc."},"comment":{"url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/issues/comments/171366075","html_url":"https://github.com/Josh-Star/AniList-API-Docs/issues/63#issuecomment-171366075","issue_url":"https://api.github.com/repos/Josh-Star/AniList-API-Docs/issues/63","id":171366075,"user":{"login":"ratan12","id":5322473,"avatar_url":"https://avatars.githubusercontent.com/u/5322473?v=3","gravatar_id":"","url":"https://api.github.com/users/ratan12","html_url":"https://github.com/ratan12","followers_url":"https://api.github.com/users/ratan12/followers","following_url":"https://api.github.com/users/ratan12/following{/other_user}","gists_url":"https://api.github.com/users/ratan12/gists{/gist_id}","starred_url":"https://api.github.com/users/ratan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ratan12/subscriptions","organizations_url":"https://api.github.com/users/ratan12/orgs","repos_url":"https://api.github.com/users/ratan12/repos","events_url":"https://api.github.com/users/ratan12/events{/privacy}","received_events_url":"https://api.github.com/users/ratan12/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T17:08:00Z","updated_at":"2016-01-13T17:08:00Z","body":"- The headers are working fine here.\r\n@blitzprog Make sure that you send this:\r\nheader: \"Authorization\"\r\nvalue: \"Bearer \" followed by the access_token\r\n- It would be nice if you add a test page in the settings -> apps. With test page I mean a page where we could enter the url like: user/ratan12/animelist which will return the proper json format trough the API. So no auth or something. This will actually save time when developing and will only be available if the developer is logged in AL\r\n- How are you planning to version the API? \"https://anilist.co/api2/\" or \"https://anilist.co/api/2/\"\r\n- It will be nice to mark new changes in the documentation.\r\n- Make sure that users can use the API on multipe devices\r\n- Crunchyroll url would've be awesome"}}