{"action":"opened","issue":{"url":"https://api.github.com/repos/rererecursive/Seller/issues/1","repository_url":"https://api.github.com/repos/rererecursive/Seller","labels_url":"https://api.github.com/repos/rererecursive/Seller/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/rererecursive/Seller/issues/1/comments","events_url":"https://api.github.com/repos/rererecursive/Seller/issues/1/events","html_url":"https://github.com/rererecursive/Seller/issues/1","id":193343730,"number":1,"title":"API to change when accessing resources","user":{"login":"rererecursive","id":16022429,"avatar_url":"https://avatars.githubusercontent.com/u/16022429?v=3","gravatar_id":"","url":"https://api.github.com/users/rererecursive","html_url":"https://github.com/rererecursive","followers_url":"https://api.github.com/users/rererecursive/followers","following_url":"https://api.github.com/users/rererecursive/following{/other_user}","gists_url":"https://api.github.com/users/rererecursive/gists{/gist_id}","starred_url":"https://api.github.com/users/rererecursive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rererecursive/subscriptions","organizations_url":"https://api.github.com/users/rererecursive/orgs","repos_url":"https://api.github.com/users/rererecursive/repos","events_url":"https://api.github.com/users/rererecursive/events{/privacy}","received_events_url":"https://api.github.com/users/rererecursive/received_events","type":"User","site_admin":false},"labels":[{"id":466070338,"url":"https://api.github.com/repos/rererecursive/Seller/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"rererecursive","id":16022429,"avatar_url":"https://avatars.githubusercontent.com/u/16022429?v=3","gravatar_id":"","url":"https://api.github.com/users/rererecursive","html_url":"https://github.com/rererecursive","followers_url":"https://api.github.com/users/rererecursive/followers","following_url":"https://api.github.com/users/rererecursive/following{/other_user}","gists_url":"https://api.github.com/users/rererecursive/gists{/gist_id}","starred_url":"https://api.github.com/users/rererecursive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rererecursive/subscriptions","organizations_url":"https://api.github.com/users/rererecursive/orgs","repos_url":"https://api.github.com/users/rererecursive/repos","events_url":"https://api.github.com/users/rererecursive/events{/privacy}","received_events_url":"https://api.github.com/users/rererecursive/received_events","type":"User","site_admin":false},"assignees":[{"login":"rererecursive","id":16022429,"avatar_url":"https://avatars.githubusercontent.com/u/16022429?v=3","gravatar_id":"","url":"https://api.github.com/users/rererecursive","html_url":"https://github.com/rererecursive","followers_url":"https://api.github.com/users/rererecursive/followers","following_url":"https://api.github.com/users/rererecursive/following{/other_user}","gists_url":"https://api.github.com/users/rererecursive/gists{/gist_id}","starred_url":"https://api.github.com/users/rererecursive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rererecursive/subscriptions","organizations_url":"https://api.github.com/users/rererecursive/orgs","repos_url":"https://api.github.com/users/rererecursive/repos","events_url":"https://api.github.com/users/rererecursive/events{/privacy}","received_events_url":"https://api.github.com/users/rererecursive/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-12-04T10:32:50Z","updated_at":"2016-12-04T10:32:50Z","closed_at":null,"body":"In the current design, whenever we `POST` data to the server for some resource, there are a set of required arguments for every method. For example, deleting a `Transaction` (i.e. `POST transaction/delete`) requires we provide arguments `product`, `contact`, `price`, and so on. This is obviously unnecessary if we instead gave each record a unique `id`. This way, deleting a record would be done like: `POST transaction/delete` with arguments `{ \"id\" : \"4\" }`.\r\n\r\nTherefore, instead of each method requiring the same set of arguments, the new design will be the following:\r\n\r\nAdd:\r\n\t- check the required arguments exist for this resource.\r\n\t- check the 'optional' arguments exist.\r\n\t- add to DB\r\n\r\nUpdate:\r\n\t- check `id` is supplied in the arguments\r\n\t- check the other arguments exist.\r\n\t- ensure the `id` corresponds to a row in the DB\r\n\r\nDelete:\r\n\t- check `id` is supplied in the arguments\r\n\t- ensure the `id` corresponds to a row in the DB\r\n\r\nEach resource has a set of required arguments. These are checked when adding or updating a record."}}
{"actor":{"display_login":"rererecursive"}}