{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/16075","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/16075/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/16075/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/16075/events","html_url":"https://github.com/magento/magento2/pull/16075","id":331696993,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MzY0NTIy","number":16075,"title":"Wishlist Rest API implementation","user":{"login":"Tickles-BV","id":9114273,"node_id":"MDQ6VXNlcjkxMTQyNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/9114273?v=4","gravatar_id":"","url":"https://api.github.com/users/Tickles-BV","html_url":"https://github.com/Tickles-BV","followers_url":"https://api.github.com/users/Tickles-BV/followers","following_url":"https://api.github.com/users/Tickles-BV/following{/other_user}","gists_url":"https://api.github.com/users/Tickles-BV/gists{/gist_id}","starred_url":"https://api.github.com/users/Tickles-BV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tickles-BV/subscriptions","organizations_url":"https://api.github.com/users/Tickles-BV/orgs","repos_url":"https://api.github.com/users/Tickles-BV/repos","events_url":"https://api.github.com/users/Tickles-BV/events{/privacy}","received_events_url":"https://api.github.com/users/Tickles-BV/received_events","type":"User","site_admin":false},"labels":[{"id":948384282,"node_id":"MDU6TGFiZWw5NDgzODQyODI=","url":"https://api.github.com/repos/magento/magento2/labels/Component:%20Wishlist","name":"Component: Wishlist","color":"7fb703","default":false},{"id":161563561,"node_id":"MDU6TGFiZWwxNjE1NjM1NjE=","url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-06-12T18:12:07Z","updated_at":"2018-06-30T23:07:24Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/magento/magento2/pulls/16075","html_url":"https://github.com/magento/magento2/pull/16075","diff_url":"https://github.com/magento/magento2/pull/16075.diff","patch_url":"https://github.com/magento/magento2/pull/16075.patch"},"body":"<!---\r\n    Thank you for contributing to Magento.\r\n    To help us process this pull request we recommend that you add the following information:\r\n     - Summary of the pull request,\r\n     - Issue(s) related to the changes made,\r\n     - Manual testing scenarios,\r\n-->\r\n\r\n<!--- Please provide a general summary of the Pull Request in the Title above -->\r\n\r\n### Description\r\n<!---\r\n    Please provide a description of the changes proposed in the pull request.\r\n    Letting us know what has changed and why it needed changing will help us validate this pull request.\r\n-->\r\n\r\nThis pull request is a small start at adding an api part for the wishlist functionality in magento 2.\r\nBecause it adds new interfaces I have tried to only implement the smallest possible set of changes so this can be discussed and implemented further.\r\n\r\nI have added a wishlist repository, which allows one to retrieve a wishlist for a customer, and to add products to a customer's wishlist. I've also added an interface for the wishlist model itself, also for use in the rest api. The wishlist model interface currently only interfaces 'getName', because I'm unsure which properties should be added to it.\r\n\r\nI have a few questions about implementation details.\r\n\r\n1. How do I know which attributes should be made available in data api? For instance, should you get a list of wishlist products when retrieving a wishlist by customer? Or should you simply get a wishlist id, which can then be used to retrieve the items via another API call. This seems like a cleaner seperation of logic, but I'd like confirmation.\r\n2. I've added two methods to the repository: `getWishlistForCustomer` and `addWishlistForCustomer`, should these be in the repository? Or should these be extracted to a WishlistManagement class.\r\n3. I've simply made the api route 'V1/wishlist' are there conventions for this? If so, where can I find these?\r\n4. In the wishlist model, method 'getSharingCode' is added via @property docblock tag, can I add these to api response without adding to new const and wrapping in own method?\r\n\r\n Sorry for the amount of questions but I'm trying to wrap my head around a lot of magento 2 internals implementing this.\r\n\r\n\r\n### Fixed Issues (if relevant)\r\n<!---\r\n    If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.\r\n    There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.\r\n-->\r\n1. magento/community-features#56: API: Wishlist\r\n\r\n\r\n### Contribution checklist\r\n - [ ] Pull request has a meaningful description of its purpose\r\n - [ ] All commits are accompanied by meaningful commit messages\r\n - [ ] All new or changed code is covered with unit/integration tests (if applicable)\r\n - [ ] All automated tests passed successfully (all builds on Travis CI are green)\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/401571829","html_url":"https://github.com/magento/magento2/pull/16075#issuecomment-401571829","issue_url":"https://api.github.com/repos/magento/magento2/issues/16075","id":401571829,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTU3MTgyOQ==","user":{"login":"Tickles-BV","id":9114273,"node_id":"MDQ6VXNlcjkxMTQyNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/9114273?v=4","gravatar_id":"","url":"https://api.github.com/users/Tickles-BV","html_url":"https://github.com/Tickles-BV","followers_url":"https://api.github.com/users/Tickles-BV/followers","following_url":"https://api.github.com/users/Tickles-BV/following{/other_user}","gists_url":"https://api.github.com/users/Tickles-BV/gists{/gist_id}","starred_url":"https://api.github.com/users/Tickles-BV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tickles-BV/subscriptions","organizations_url":"https://api.github.com/users/Tickles-BV/orgs","repos_url":"https://api.github.com/users/Tickles-BV/repos","events_url":"https://api.github.com/users/Tickles-BV/events{/privacy}","received_events_url":"https://api.github.com/users/Tickles-BV/received_events","type":"User","site_admin":false},"created_at":"2018-06-30T23:07:24Z","updated_at":"2018-06-30T23:07:24Z","author_association":"NONE","body":"I've added wishlist item interface now, along with repository. Repository just implements crud operations same as wishlist repository. I'm going to figure out what other things should be exposed to service contracts.\r\n\r\nFor example: Sharing wishlist via email appears to be implemented directly in the Shared controller. Should this be extracted to service contract? "}}
{"actor":{"display_login":"Tickles-BV"}}