{"action":"opened","issue":{"url":"https://api.github.com/repos/ngonzalvez/rest-facade/issues/15","repository_url":"https://api.github.com/repos/ngonzalvez/rest-facade","labels_url":"https://api.github.com/repos/ngonzalvez/rest-facade/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/ngonzalvez/rest-facade/issues/15/comments","events_url":"https://api.github.com/repos/ngonzalvez/rest-facade/issues/15/events","html_url":"https://github.com/ngonzalvez/rest-facade/issues/15","id":230195202,"number":15,"title":"Add support for custom endpoints.","user":{"login":"ngonzalvez","id":1501339,"avatar_url":"https://avatars0.githubusercontent.com/u/1501339?v=3","gravatar_id":"","url":"https://api.github.com/users/ngonzalvez","html_url":"https://github.com/ngonzalvez","followers_url":"https://api.github.com/users/ngonzalvez/followers","following_url":"https://api.github.com/users/ngonzalvez/following{/other_user}","gists_url":"https://api.github.com/users/ngonzalvez/gists{/gist_id}","starred_url":"https://api.github.com/users/ngonzalvez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngonzalvez/subscriptions","organizations_url":"https://api.github.com/users/ngonzalvez/orgs","repos_url":"https://api.github.com/users/ngonzalvez/repos","events_url":"https://api.github.com/users/ngonzalvez/events{/privacy}","received_events_url":"https://api.github.com/users/ngonzalvez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-21T04:01:20Z","updated_at":"2017-05-21T04:01:20Z","closed_at":null,"body":"The current API doesn't allow to do a `POST /users/login`. It should allow the user to define custom endpoints in the initial config object. E.g.:\r\n\r\n~~~javascript\r\nvar Resource = require('rest-facade').Client;\r\n\r\nvar Users = new Resource('http://domain.com/users/:id', {\r\n    actions: {\r\n        login: {\r\n            method: 'POST',\r\n            defaults: { id: 'login' }\r\n        }\r\n    }\r\n});\r\n\r\n// This this should perform a POST to /users/login with the following data \r\n// in the body of the request.\r\nUsers.login({ email: 'jdoe@mail.com', password: 'john123' });\r\n~~~"}}
{"actor":{"display_login":"ngonzalvez"}}