{"action":"created","comment":{"url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/comments/216257151","pull_request_review_id":153694326,"id":216257151,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjI1NzE1MQ==","diff_hunk":"@@ -0,0 +1,121 @@\n+require 'httparty'\n+\n+module Admitad\n+  class Client\n+    include HTTParty\n+    headers 'Content-Type' => 'application/x-www-form-urlencoded'\n+    debug_output $stdout\n+    base_uri Constants::BASE_URI\n+\n+    def initialize(access_token = nil)\n+      @client_id     = Admitad.configuration.client_id\n+      @client_secret = Admitad.configuration.client_secret\n+      @scope         = Admitad.configuration.scope || Constants::SCOPES.join(' ')\n+      @access_token  = access_token\n+    end\n+\n+    def coupons_categories(**params)\n+      path = '/coupons/categories/'\n+      path << \"#{params[:id]}/\"\n+      get(path, query: params.slice(*Constants::BASE_PARAMS))\n+    end\n+\n+    def coupons(**params)\n+      path = '/coupons/'\n+      path << \"#{params[:id]}/\" if params[:id]\n+      get(path, query: params.slice(*Constants::BASE_PARAMS))\n+    end\n+\n+    def coupons_website(**params)\n+      path = '/coupons/'\n+      path << \"#{params[:c_id]}/\" if params[:c_id]","path":"lib/admitad/client.rb","position":31,"original_position":31,"commit_id":"f5be39c0417cced3ee4a26294fcf2716e58ed4db","original_commit_id":"f5be39c0417cced3ee4a26294fcf2716e58ed4db","user":{"login":"alexandr-senyuk","id":28989361,"node_id":"MDQ6VXNlcjI4OTg5MzYx","avatar_url":"https://avatars3.githubusercontent.com/u/28989361?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandr-senyuk","html_url":"https://github.com/alexandr-senyuk","followers_url":"https://api.github.com/users/alexandr-senyuk/followers","following_url":"https://api.github.com/users/alexandr-senyuk/following{/other_user}","gists_url":"https://api.github.com/users/alexandr-senyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandr-senyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandr-senyuk/subscriptions","organizations_url":"https://api.github.com/users/alexandr-senyuk/orgs","repos_url":"https://api.github.com/users/alexandr-senyuk/repos","events_url":"https://api.github.com/users/alexandr-senyuk/events{/privacy}","received_events_url":"https://api.github.com/users/alexandr-senyuk/received_events","type":"User","site_admin":false},"body":"как в документации написал,  в любом случае надо к ней возвращаться","created_at":"2018-09-10T09:35:30Z","updated_at":"2018-09-10T09:35:30Z","html_url":"https://github.com/alexandr-senyuk/admitad-ruby-api/pull/7#discussion_r216257151","pull_request_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/comments/216257151"},"html":{"href":"https://github.com/alexandr-senyuk/admitad-ruby-api/pull/7#discussion_r216257151"},"pull_request":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7"}},"in_reply_to_id":216235436},"pull_request":{"url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7","id":214170541,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTcwNTQx","html_url":"https://github.com/alexandr-senyuk/admitad-ruby-api/pull/7","diff_url":"https://github.com/alexandr-senyuk/admitad-ruby-api/pull/7.diff","patch_url":"https://github.com/alexandr-senyuk/admitad-ruby-api/pull/7.patch","issue_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/7","number":7,"state":"open","locked":false,"title":"Code refactoring","user":{"login":"alexandr-senyuk","id":28989361,"node_id":"MDQ6VXNlcjI4OTg5MzYx","avatar_url":"https://avatars3.githubusercontent.com/u/28989361?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandr-senyuk","html_url":"https://github.com/alexandr-senyuk","followers_url":"https://api.github.com/users/alexandr-senyuk/followers","following_url":"https://api.github.com/users/alexandr-senyuk/following{/other_user}","gists_url":"https://api.github.com/users/alexandr-senyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandr-senyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandr-senyuk/subscriptions","organizations_url":"https://api.github.com/users/alexandr-senyuk/orgs","repos_url":"https://api.github.com/users/alexandr-senyuk/repos","events_url":"https://api.github.com/users/alexandr-senyuk/events{/privacy}","received_events_url":"https://api.github.com/users/alexandr-senyuk/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-09T23:14:38Z","updated_at":"2018-09-10T09:35:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3529079f57c175c044ef113b8b1e09e7a84aa18","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7/commits","review_comments_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7/comments","review_comment_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/7/comments","statuses_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/statuses/f5be39c0417cced3ee4a26294fcf2716e58ed4db","head":{"label":"alexandr-senyuk:development","ref":"development","sha":"f5be39c0417cced3ee4a26294fcf2716e58ed4db","user":{"login":"alexandr-senyuk","id":28989361,"node_id":"MDQ6VXNlcjI4OTg5MzYx","avatar_url":"https://avatars3.githubusercontent.com/u/28989361?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandr-senyuk","html_url":"https://github.com/alexandr-senyuk","followers_url":"https://api.github.com/users/alexandr-senyuk/followers","following_url":"https://api.github.com/users/alexandr-senyuk/following{/other_user}","gists_url":"https://api.github.com/users/alexandr-senyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandr-senyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandr-senyuk/subscriptions","organizations_url":"https://api.github.com/users/alexandr-senyuk/orgs","repos_url":"https://api.github.com/users/alexandr-senyuk/repos","events_url":"https://api.github.com/users/alexandr-senyuk/events{/privacy}","received_events_url":"https://api.github.com/users/alexandr-senyuk/received_events","type":"User","site_admin":false},"repo":{"id":142293991,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIyOTM5OTE=","name":"admitad-ruby-api","full_name":"alexandr-senyuk/admitad-ruby-api","owner":{"login":"alexandr-senyuk","id":28989361,"node_id":"MDQ6VXNlcjI4OTg5MzYx","avatar_url":"https://avatars3.githubusercontent.com/u/28989361?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandr-senyuk","html_url":"https://github.com/alexandr-senyuk","followers_url":"https://api.github.com/users/alexandr-senyuk/followers","following_url":"https://api.github.com/users/alexandr-senyuk/following{/other_user}","gists_url":"https://api.github.com/users/alexandr-senyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandr-senyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandr-senyuk/subscriptions","organizations_url":"https://api.github.com/users/alexandr-senyuk/orgs","repos_url":"https://api.github.com/users/alexandr-senyuk/repos","events_url":"https://api.github.com/users/alexandr-senyuk/events{/privacy}","received_events_url":"https://api.github.com/users/alexandr-senyuk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexandr-senyuk/admitad-ruby-api","description":null,"fork":false,"url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api","forks_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/forks","keys_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/teams","hooks_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/hooks","issue_events_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/events{/number}","events_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/events","assignees_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/assignees{/user}","branches_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/branches{/branch}","tags_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/tags","blobs_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/languages","stargazers_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/stargazers","contributors_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/contributors","subscribers_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/subscribers","subscription_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/subscription","commits_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/contents/{+path}","compare_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/merges","archive_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/downloads","issues_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues{/number}","pulls_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/labels{/name}","releases_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/releases{/id}","deployments_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/deployments","created_at":"2018-07-25T12:02:06Z","updated_at":"2018-08-27T13:26:55Z","pushed_at":"2018-09-10T01:51:13Z","git_url":"git://github.com/alexandr-senyuk/admitad-ruby-api.git","ssh_url":"git@github.com:alexandr-senyuk/admitad-ruby-api.git","clone_url":"https://github.com/alexandr-senyuk/admitad-ruby-api.git","svn_url":"https://github.com/alexandr-senyuk/admitad-ruby-api","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"alexandr-senyuk:master","ref":"master","sha":"29a905b2fc3e05d4b42c5d97547bf0c9897750e7","user":{"login":"alexandr-senyuk","id":28989361,"node_id":"MDQ6VXNlcjI4OTg5MzYx","avatar_url":"https://avatars3.githubusercontent.com/u/28989361?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandr-senyuk","html_url":"https://github.com/alexandr-senyuk","followers_url":"https://api.github.com/users/alexandr-senyuk/followers","following_url":"https://api.github.com/users/alexandr-senyuk/following{/other_user}","gists_url":"https://api.github.com/users/alexandr-senyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandr-senyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandr-senyuk/subscriptions","organizations_url":"https://api.github.com/users/alexandr-senyuk/orgs","repos_url":"https://api.github.com/users/alexandr-senyuk/repos","events_url":"https://api.github.com/users/alexandr-senyuk/events{/privacy}","received_events_url":"https://api.github.com/users/alexandr-senyuk/received_events","type":"User","site_admin":false},"repo":{"id":142293991,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIyOTM5OTE=","name":"admitad-ruby-api","full_name":"alexandr-senyuk/admitad-ruby-api","owner":{"login":"alexandr-senyuk","id":28989361,"node_id":"MDQ6VXNlcjI4OTg5MzYx","avatar_url":"https://avatars3.githubusercontent.com/u/28989361?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandr-senyuk","html_url":"https://github.com/alexandr-senyuk","followers_url":"https://api.github.com/users/alexandr-senyuk/followers","following_url":"https://api.github.com/users/alexandr-senyuk/following{/other_user}","gists_url":"https://api.github.com/users/alexandr-senyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandr-senyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandr-senyuk/subscriptions","organizations_url":"https://api.github.com/users/alexandr-senyuk/orgs","repos_url":"https://api.github.com/users/alexandr-senyuk/repos","events_url":"https://api.github.com/users/alexandr-senyuk/events{/privacy}","received_events_url":"https://api.github.com/users/alexandr-senyuk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexandr-senyuk/admitad-ruby-api","description":null,"fork":false,"url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api","forks_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/forks","keys_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/teams","hooks_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/hooks","issue_events_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/events{/number}","events_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/events","assignees_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/assignees{/user}","branches_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/branches{/branch}","tags_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/tags","blobs_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/languages","stargazers_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/stargazers","contributors_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/contributors","subscribers_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/subscribers","subscription_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/subscription","commits_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/contents/{+path}","compare_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/merges","archive_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/downloads","issues_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues{/number}","pulls_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/labels{/name}","releases_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/releases{/id}","deployments_url":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/deployments","created_at":"2018-07-25T12:02:06Z","updated_at":"2018-08-27T13:26:55Z","pushed_at":"2018-09-10T01:51:13Z","git_url":"git://github.com/alexandr-senyuk/admitad-ruby-api.git","ssh_url":"git@github.com:alexandr-senyuk/admitad-ruby-api.git","clone_url":"https://github.com/alexandr-senyuk/admitad-ruby-api.git","svn_url":"https://github.com/alexandr-senyuk/admitad-ruby-api","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7"},"html":{"href":"https://github.com/alexandr-senyuk/admitad-ruby-api/pull/7"},"issue":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/7"},"comments":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/alexandr-senyuk/admitad-ruby-api/statuses/f5be39c0417cced3ee4a26294fcf2716e58ed4db"}},"author_association":"OWNER"}}
{"actor":{"display_login":"alexandr-senyuk"}}