{"action":"created","issue":{"url":"https://api.github.com/repos/dblock/slack-market/issues/27","repository_url":"https://api.github.com/repos/dblock/slack-market","labels_url":"https://api.github.com/repos/dblock/slack-market/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/dblock/slack-market/issues/27/comments","events_url":"https://api.github.com/repos/dblock/slack-market/issues/27/events","html_url":"https://github.com/dblock/slack-market/pull/27","id":163072857,"number":27,"title":"Feature: #1 Other types of graphs ","user":{"login":"ddruker","id":12059877,"avatar_url":"https://avatars.githubusercontent.com/u/12059877?v=3","gravatar_id":"","url":"https://api.github.com/users/ddruker","html_url":"https://github.com/ddruker","followers_url":"https://api.github.com/users/ddruker/followers","following_url":"https://api.github.com/users/ddruker/following{/other_user}","gists_url":"https://api.github.com/users/ddruker/gists{/gist_id}","starred_url":"https://api.github.com/users/ddruker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddruker/subscriptions","organizations_url":"https://api.github.com/users/ddruker/orgs","repos_url":"https://api.github.com/users/ddruker/repos","events_url":"https://api.github.com/users/ddruker/events{/privacy}","received_events_url":"https://api.github.com/users/ddruker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-06-30T03:19:54Z","updated_at":"2016-07-02T21:48:29Z","closed_at":"2016-07-02T15:47:42Z","pull_request":{"url":"https://api.github.com/repos/dblock/slack-market/pulls/27","html_url":"https://github.com/dblock/slack-market/pull/27","diff_url":"https://github.com/dblock/slack-market/pull/27.diff","patch_url":"https://github.com/dblock/slack-market/pull/27.patch"},"body":"Hey @dblock , \r\n\r\nTo add enhanced graphs in a slack message interactive buttons needed to be included in the market model.  Slack's formatting for interactive buttons can be found [here](https://api.slack.com/docs/message-buttons).  \r\n\r\n<img width=\"477\" alt=\"interactive_graph_with_buttons\" src=\"https://cloud.githubusercontent.com/assets/12059877/16475798/7a5071bc-3e4f-11e6-8f02-5f134589e46a.png\">\r\n\r\nClicking on each button will render the appropriate chart for that stock.  If charts are set to off, then no chart or buttons will be rendered.    \r\n\r\nSlack handles a button click in a message by making a POST request to a publicly accessible endpoint, which I created in __slack_endpoint.rb__.  \r\n\r\nThe following configurations are necessary for this work:\r\n- You must specify a Request URL in [Interactive Messages](https://api.slack.com/apps/A1L9HL3GR/interactive-messages)\r\n- That URL must point directly to your deployed Heroku URL with the correct endpoint, which has been configured as  ```/api/graph```.  For example my URL for testing purposes was the following\r\nhttps://sleepy-eyrie-81347.herokuapp.com/api/graph\r\n-  If you haven't already, you must include a new environment variable called ```SLACK_VERIFICATION_TOKEN``` and set it equal to the verification token found in the [App Credentials](https://api.slack.com/apps/A1L9HL3GR/oauth).  This token is being used to verify that the message is coming directly from a Slack channel and its usage is highly suggested by Slack for security purposes.\r\n\r\nAlso please note the changes to both __quote_spec.rb__ and __documentation_spec.rb__.  All tests should complete without errors.   \r\n\r\nPlease let me know if you run into any issues.  This was fun!  \r\n\r\nThanks,\r\n\r\nDavid\r\n"},"comment":{"url":"https://api.github.com/repos/dblock/slack-market/issues/comments/230123584","html_url":"https://github.com/dblock/slack-market/pull/27#issuecomment-230123584","issue_url":"https://api.github.com/repos/dblock/slack-market/issues/27","id":230123584,"user":{"login":"dblock","id":542335,"avatar_url":"https://avatars.githubusercontent.com/u/542335?v=3","gravatar_id":"","url":"https://api.github.com/users/dblock","html_url":"https://github.com/dblock","followers_url":"https://api.github.com/users/dblock/followers","following_url":"https://api.github.com/users/dblock/following{/other_user}","gists_url":"https://api.github.com/users/dblock/gists{/gist_id}","starred_url":"https://api.github.com/users/dblock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblock/subscriptions","organizations_url":"https://api.github.com/users/dblock/orgs","repos_url":"https://api.github.com/users/dblock/repos","events_url":"https://api.github.com/users/dblock/events{/privacy}","received_events_url":"https://api.github.com/users/dblock/received_events","type":"User","site_admin":false},"created_at":"2016-07-02T21:48:29Z","updated_at":"2016-07-02T21:48:29Z","body":"Having configured this on market.playplay.io I see your point about the graph endpoint - slack only supports a single action URL. Probably `/slack/action` or maybe just your original `slack` suggestion was indeed better. \r\n\r\nFeel free to PR an update, otherwise I'll get to it at some point. "}}
{"actor":{"display_login":"dblock"}}