{"action":"created","issue":{"url":"https://api.github.com/repos/baugarten/node-restful/issues/77","repository_url":"https://api.github.com/repos/baugarten/node-restful","labels_url":"https://api.github.com/repos/baugarten/node-restful/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/baugarten/node-restful/issues/77/comments","events_url":"https://api.github.com/repos/baugarten/node-restful/issues/77/events","html_url":"https://github.com/baugarten/node-restful/issues/77","id":47706075,"number":77,"title":"Pagination info","user":{"login":"Falci","id":1330573,"avatar_url":"https://avatars.githubusercontent.com/u/1330573?v=3","gravatar_id":"","url":"https://api.github.com/users/Falci","html_url":"https://github.com/Falci","followers_url":"https://api.github.com/users/Falci/followers","following_url":"https://api.github.com/users/Falci/following{/other_user}","gists_url":"https://api.github.com/users/Falci/gists{/gist_id}","starred_url":"https://api.github.com/users/Falci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falci/subscriptions","organizations_url":"https://api.github.com/users/Falci/orgs","repos_url":"https://api.github.com/users/Falci/repos","events_url":"https://api.github.com/users/Falci/events{/privacy}","received_events_url":"https://api.github.com/users/Falci/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2014-11-04T12:06:04Z","updated_at":"2016-08-14T11:41:32Z","closed_at":null,"body":"Would like an option to receive along with the data, or other request for pagination information at least the total records.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/baugarten/node-restful/issues/comments/239669189","html_url":"https://github.com/baugarten/node-restful/issues/77#issuecomment-239669189","issue_url":"https://api.github.com/repos/baugarten/node-restful/issues/77","id":239669189,"user":{"login":"slavede","id":2838038,"avatar_url":"https://avatars.githubusercontent.com/u/2838038?v=3","gravatar_id":"","url":"https://api.github.com/users/slavede","html_url":"https://github.com/slavede","followers_url":"https://api.github.com/users/slavede/followers","following_url":"https://api.github.com/users/slavede/following{/other_user}","gists_url":"https://api.github.com/users/slavede/gists{/gist_id}","starred_url":"https://api.github.com/users/slavede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavede/subscriptions","organizations_url":"https://api.github.com/users/slavede/orgs","repos_url":"https://api.github.com/users/slavede/repos","events_url":"https://api.github.com/users/slavede/events{/privacy}","received_events_url":"https://api.github.com/users/slavede/received_events","type":"User","site_admin":false},"created_at":"2016-08-14T11:41:32Z","updated_at":"2016-08-14T11:41:32Z","body":"I see...so I've implemented after method. Here is the body of the function doing conversion if someone needs it:\r\n\r\n```\r\nexports.convertNodeRestful = function(query) {\r\n    var mongooseQuery = {},\r\n        splittedKey,\r\n        operator;\r\n    Object.keys(query).forEach(function(key) {\r\n        if (nodeRestfulKeywords.indexOf(key) === -1) {\r\n            splittedKey = key.split('__');\r\n            if (splittedKey.length === 2) {\r\n                operator = '$' + splittedKey[1];\r\n            } else {\r\n                operator = '$eq';\r\n            }\r\n\r\n            mongooseQuery[splittedKey[0]] = {};\r\n            mongooseQuery[splittedKey[0]][operator] = query[key];\r\n        }\r\n    });\r\n\r\n    return mongooseQuery;\r\n};\r\n```\r\n\r\nI guess that you can close this one if you don't think it's valid request."}}
{"actor":{"display_login":"slavede"}}