{"action":"created","issue":{"url":"https://api.github.com/repos/artsy/metaphysics/issues/388","repository_url":"https://api.github.com/repos/artsy/metaphysics","labels_url":"https://api.github.com/repos/artsy/metaphysics/issues/388/labels{/name}","comments_url":"https://api.github.com/repos/artsy/metaphysics/issues/388/comments","events_url":"https://api.github.com/repos/artsy/metaphysics/issues/388/events","html_url":"https://github.com/artsy/metaphysics/pull/388","id":172783964,"number":388,"title":"@craigspaeth - Fetch random related artist","user":{"login":"broskoski","id":821469,"avatar_url":"https://avatars.githubusercontent.com/u/821469?v=3","gravatar_id":"","url":"https://api.github.com/users/broskoski","html_url":"https://github.com/broskoski","followers_url":"https://api.github.com/users/broskoski/followers","following_url":"https://api.github.com/users/broskoski/following{/other_user}","gists_url":"https://api.github.com/users/broskoski/gists{/gist_id}","starred_url":"https://api.github.com/users/broskoski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broskoski/subscriptions","organizations_url":"https://api.github.com/users/broskoski/orgs","repos_url":"https://api.github.com/users/broskoski/repos","events_url":"https://api.github.com/users/broskoski/events{/privacy}","received_events_url":"https://api.github.com/users/broskoski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-23T19:21:21Z","updated_at":"2016-08-23T20:01:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/artsy/metaphysics/pulls/388","html_url":"https://github.com/artsy/metaphysics/pull/388","diff_url":"https://github.com/artsy/metaphysics/pull/388.diff","patch_url":"https://github.com/artsy/metaphysics/pull/388.patch"},"body":"Sorry for the sloppy history, picking up something I've been tinkering with for a while.\r\n\r\nRight now on the homepage, we fetch the last artist the user followed and get an related suggestion based on that. That works fine, but what would be better is if we fetched a different random artist / related pair every time. The tricky part here is that two requests have to match up:\r\n\r\n1. On page load we get a response of all the modules that _should_ be displayed. The client should be able to render parts of these modules initially as placeholders (like the title).\r\n2. Then on the client side we fetch each module again individually with all the results, depending on what keys and parameters are returned in the initial fetch. This means that the random artist / related pair needs to match up between the first fetch and the secondary fetch. So.....\r\n\r\nThe approach now is, if the `me/modules` returns for a user that we _should_ show a related artists rail (i.e. the user follows any artist), we hit the `user/${userID}/suggested/similar/artists`, get some results, pick out a random pair, and then drop it into the `params` object for the subsequent to use.\r\n\r\nWith me??????\r\n\r\ncc @mzikherman @alloy \r\n\r\np.s. Hi @alloy, I'm back again."},"comment":{"url":"https://api.github.com/repos/artsy/metaphysics/issues/comments/241858119","html_url":"https://github.com/artsy/metaphysics/pull/388#issuecomment-241858119","issue_url":"https://api.github.com/repos/artsy/metaphysics/issues/388","id":241858119,"user":{"login":"alloy","id":2320,"avatar_url":"https://avatars.githubusercontent.com/u/2320?v=3","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T20:01:53Z","updated_at":"2016-08-23T20:01:53Z","body":"I’m just spit-balling btw, don’t let this hold-up any progress you need to make right now."}}
{"actor":{"display_login":"alloy"}}