{"action":"created","issue":{"url":"https://api.github.com/repos/yunity/foodsaving-backend/issues/280","repository_url":"https://api.github.com/repos/yunity/foodsaving-backend","labels_url":"https://api.github.com/repos/yunity/foodsaving-backend/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/yunity/foodsaving-backend/issues/280/comments","events_url":"https://api.github.com/repos/yunity/foodsaving-backend/issues/280/events","html_url":"https://github.com/yunity/foodsaving-backend/issues/280","id":213202023,"number":280,"title":"API documentation needs update","user":{"login":"nicco11a","id":8119306,"avatar_url":"https://avatars2.githubusercontent.com/u/8119306?v=3","gravatar_id":"","url":"https://api.github.com/users/nicco11a","html_url":"https://github.com/nicco11a","followers_url":"https://api.github.com/users/nicco11a/followers","following_url":"https://api.github.com/users/nicco11a/following{/other_user}","gists_url":"https://api.github.com/users/nicco11a/gists{/gist_id}","starred_url":"https://api.github.com/users/nicco11a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicco11a/subscriptions","organizations_url":"https://api.github.com/users/nicco11a/orgs","repos_url":"https://api.github.com/users/nicco11a/repos","events_url":"https://api.github.com/users/nicco11a/events{/privacy}","received_events_url":"https://api.github.com/users/nicco11a/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-09T23:50:28Z","updated_at":"2017-03-11T19:28:43Z","closed_at":null,"body":"The API documentation is not in sync, for example in the user API call /users only describes the option to search for a display_name:\r\nhttps://foodsaving.world/api/users/\r\n \r\nWhile the docs users section describes 8 more functions:\r\nhttps://foodsaving.world/docs/#!/users\r\n\r\nThe result of this was that I logged #273 did not think there was a way to search for a user id while it was as easy as specifying /users/{id}/."},"comment":{"url":"https://api.github.com/repos/yunity/foodsaving-backend/issues/comments/285893662","html_url":"https://github.com/yunity/foodsaving-backend/issues/280#issuecomment-285893662","issue_url":"https://api.github.com/repos/yunity/foodsaving-backend/issues/280","id":285893662,"user":{"login":"tiltec","id":4410802,"avatar_url":"https://avatars0.githubusercontent.com/u/4410802?v=3","gravatar_id":"","url":"https://api.github.com/users/tiltec","html_url":"https://github.com/tiltec","followers_url":"https://api.github.com/users/tiltec/followers","following_url":"https://api.github.com/users/tiltec/following{/other_user}","gists_url":"https://api.github.com/users/tiltec/gists{/gist_id}","starred_url":"https://api.github.com/users/tiltec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiltec/subscriptions","organizations_url":"https://api.github.com/users/tiltec/orgs","repos_url":"https://api.github.com/users/tiltec/repos","events_url":"https://api.github.com/users/tiltec/events{/privacy}","received_events_url":"https://api.github.com/users/tiltec/received_events","type":"User","site_admin":false},"created_at":"2017-03-11T19:28:43Z","updated_at":"2017-03-11T19:28:43Z","body":"That would need some hacks. /api comes from the Django REST Framework, it determines the content type and delivers an appropriate response.\r\nExample: `https://foodsaving.world/api/users/?format=json` gives you json, while `https://foodsaving.world/api/users/?format=api` gives you the browser.\r\n\r\nHere's more documentation on the API renderer: http://www.django-rest-framework.org/topics/browsable-api/\r\nAnd here's more on API documentation generally: http://www.django-rest-framework.org/topics/documenting-your-api/\r\n\r\nThese renderers are available in DRF: http://www.django-rest-framework.org/api-guide/renderers/\r\nWe could either modify the built-in `BrowsableAPIRenderer` and `AdminRenderer` or use a static template to redirect the users to Swagger."}}
{"actor":{"display_login":"tiltec"}}