{"action":"created","issue":{"url":"https://api.github.com/repos/dustinfarris/ember-django-adapter/issues/147","labels_url":"https://api.github.com/repos/dustinfarris/ember-django-adapter/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/dustinfarris/ember-django-adapter/issues/147/comments","events_url":"https://api.github.com/repos/dustinfarris/ember-django-adapter/issues/147/events","html_url":"https://github.com/dustinfarris/ember-django-adapter/issues/147","id":115228274,"number":147,"title":"Unable to send meta data in GET response without including pagination attributes","user":{"login":"indvinoth","id":836863,"avatar_url":"https://avatars.githubusercontent.com/u/836863?v=3","gravatar_id":"","url":"https://api.github.com/users/indvinoth","html_url":"https://github.com/indvinoth","followers_url":"https://api.github.com/users/indvinoth/followers","following_url":"https://api.github.com/users/indvinoth/following{/other_user}","gists_url":"https://api.github.com/users/indvinoth/gists{/gist_id}","starred_url":"https://api.github.com/users/indvinoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indvinoth/subscriptions","organizations_url":"https://api.github.com/users/indvinoth/orgs","repos_url":"https://api.github.com/users/indvinoth/repos","events_url":"https://api.github.com/users/indvinoth/events{/privacy}","received_events_url":"https://api.github.com/users/indvinoth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"benkonrath","id":494758,"avatar_url":"https://avatars.githubusercontent.com/u/494758?v=3","gravatar_id":"","url":"https://api.github.com/users/benkonrath","html_url":"https://github.com/benkonrath","followers_url":"https://api.github.com/users/benkonrath/followers","following_url":"https://api.github.com/users/benkonrath/following{/other_user}","gists_url":"https://api.github.com/users/benkonrath/gists{/gist_id}","starred_url":"https://api.github.com/users/benkonrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkonrath/subscriptions","organizations_url":"https://api.github.com/users/benkonrath/orgs","repos_url":"https://api.github.com/users/benkonrath/repos","events_url":"https://api.github.com/users/benkonrath/events{/privacy}","received_events_url":"https://api.github.com/users/benkonrath/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-11-05T07:55:20Z","updated_at":"2015-11-12T08:41:16Z","closed_at":null,"body":"Currently we are invoking a GET request to Django with some filter parameters applied. The results wont be more than 20 or 30, so we are not using pagination. \r\n\r\nThe problem is we are unable to send meta data without the pagination attributes due to the following check in the `normalizeResponse` function\r\n\r\n      if (!Ember.isNone(payload) &&\r\n          payload.hasOwnProperty('next') &&\r\n          payload.hasOwnProperty('previous') &&\r\n          payload.hasOwnProperty('results')) {\r\n          ...\r\n      }\r\n\r\nSo we are sending dummy count, next and previous values and adding our meta data along with the results array. \r\nCould some one please suggest me a better way of doing this or to stick with the current approach?\r\nThank you."},"comment":{"url":"https://api.github.com/repos/dustinfarris/ember-django-adapter/issues/comments/156034592","html_url":"https://github.com/dustinfarris/ember-django-adapter/issues/147#issuecomment-156034592","issue_url":"https://api.github.com/repos/dustinfarris/ember-django-adapter/issues/147","id":156034592,"user":{"login":"indvinoth","id":836863,"avatar_url":"https://avatars.githubusercontent.com/u/836863?v=3","gravatar_id":"","url":"https://api.github.com/users/indvinoth","html_url":"https://github.com/indvinoth","followers_url":"https://api.github.com/users/indvinoth/followers","following_url":"https://api.github.com/users/indvinoth/following{/other_user}","gists_url":"https://api.github.com/users/indvinoth/gists{/gist_id}","starred_url":"https://api.github.com/users/indvinoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indvinoth/subscriptions","organizations_url":"https://api.github.com/users/indvinoth/orgs","repos_url":"https://api.github.com/users/indvinoth/repos","events_url":"https://api.github.com/users/indvinoth/events{/privacy}","received_events_url":"https://api.github.com/users/indvinoth/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T08:41:16Z","updated_at":"2015-11-12T08:41:16Z","body":"Sorry for the delayed response @benkonrath, @dustinfarris. Diwali holidays here in India. \r\n\r\nTo make it work we have extended the default pagination class from Django and used it in the viewset. Count, next and prev meta are added as part of pagination and we have set the page size to 30 since the items will not be more than 20.\r\n\r\nThe following JSON response is received from the Django REST API.\r\n\r\n    {\r\n       \"next\": null,\r\n       \"time_left\": 1447351200,\r\n       \"previous\": null,\r\n       \"count\": 0,\r\n       \"results\": [...]\r\n     }"}}