{"action":"created","comment":{"url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments/35481475","id":35481475,"diff_hunk":"@@ -0,0 +1,75 @@\n+require 'rest-client'\n+require 'addressable/uri'\n+\n+module TrelloApi\n+\n+  class Board\n+\n+    def self.data_by_id(id)\n+      uri = Addressable::URI.parse \"https://api.trello.com/1/boards/#{id}\"\n+\n+      uri.query_values = {\n+        actions:       :all,\n+        actions_limit: 1000,\n+        cards:         :all,\n+        lists:         :all,\n+        members:       :all,\n+        member_fields: :all,\n+        checklists:    :all,\n+        fields:        :all,\n+        card_attachments: true,\n+        key:   TRELLO_APP_KEY,\n+        token: TRELLO_APP_TOKEN\n+      }\n+\n+      response = RestClient.get uri.to_s\n+\n+      json = JSON.parse response.body\n+    end\n+\n+    def self.all\n+      uri = Addressable::URI.parse \"https://api.trello.com/1/members/#{TRELLO_USER_NAME}/boards\"\n+\n+      uri.query_values = {\n+        fields: 'name',\n+        key:   TRELLO_APP_KEY,\n+        token: TRELLO_APP_TOKEN\n+      }\n+\n+      response = RestClient.get uri.to_s\n+\n+      json = JSON.parse(response.body, symbolize_names: true)\n+\n+      # {:name=>\"KNOWLEDGE\", :id=>\"5535f4953c9df00305ec756a\"}\n+      boards_ids = json.collect { |board| { name: board[:name], id: board[:id] } }\n+    end\n+\n+    def self.board_id_by_name(board_name)\n+      all.each do |board|\n+      \treturn board[:id] if board[:name] == board_name\n+      end\n+    end\n+\n+    def self.lists(board_name)","path":"lib/service/TrelloApi/Board.rb","position":53,"original_position":53,"commit_id":"3ce1dcc192dabd53ba88ba7a8ac030c1c29d0357","original_commit_id":"3ce1dcc192dabd53ba88ba7a8ac030c1c29d0357","user":{"login":"beornborn","id":1485786,"avatar_url":"https://avatars.githubusercontent.com/u/1485786?v=3","gravatar_id":"","url":"https://api.github.com/users/beornborn","html_url":"https://github.com/beornborn","followers_url":"https://api.github.com/users/beornborn/followers","following_url":"https://api.github.com/users/beornborn/following{/other_user}","gists_url":"https://api.github.com/users/beornborn/gists{/gist_id}","starred_url":"https://api.github.com/users/beornborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beornborn/subscriptions","organizations_url":"https://api.github.com/users/beornborn/orgs","repos_url":"https://api.github.com/users/beornborn/repos","events_url":"https://api.github.com/users/beornborn/events{/privacy}","received_events_url":"https://api.github.com/users/beornborn/received_events","type":"User","site_admin":false},"body":"здесь входным параметром должен быть board_id","created_at":"2015-07-25T09:28:09Z","updated_at":"2015-07-25T09:28:09Z","html_url":"https://github.com/kiev-ruby/redwings/pull/57#discussion_r35481475","pull_request_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments/35481475"},"html":{"href":"https://github.com/kiev-ruby/redwings/pull/57#discussion_r35481475"},"pull_request":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57","id":40485507,"html_url":"https://github.com/kiev-ruby/redwings/pull/57","diff_url":"https://github.com/kiev-ruby/redwings/pull/57.diff","patch_url":"https://github.com/kiev-ruby/redwings/pull/57.patch","issue_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/57","number":57,"state":"open","locked":false,"title":"trying to do something","user":{"login":"95kach","id":10588116,"avatar_url":"https://avatars.githubusercontent.com/u/10588116?v=3","gravatar_id":"","url":"https://api.github.com/users/95kach","html_url":"https://github.com/95kach","followers_url":"https://api.github.com/users/95kach/followers","following_url":"https://api.github.com/users/95kach/following{/other_user}","gists_url":"https://api.github.com/users/95kach/gists{/gist_id}","starred_url":"https://api.github.com/users/95kach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/95kach/subscriptions","organizations_url":"https://api.github.com/users/95kach/orgs","repos_url":"https://api.github.com/users/95kach/repos","events_url":"https://api.github.com/users/95kach/events{/privacy}","received_events_url":"https://api.github.com/users/95kach/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-21T17:55:05Z","updated_at":"2015-07-25T09:28:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d26203d22baae169949d31824935972aa85992ae","assignee":{"login":"beornborn","id":1485786,"avatar_url":"https://avatars.githubusercontent.com/u/1485786?v=3","gravatar_id":"","url":"https://api.github.com/users/beornborn","html_url":"https://github.com/beornborn","followers_url":"https://api.github.com/users/beornborn/followers","following_url":"https://api.github.com/users/beornborn/following{/other_user}","gists_url":"https://api.github.com/users/beornborn/gists{/gist_id}","starred_url":"https://api.github.com/users/beornborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beornborn/subscriptions","organizations_url":"https://api.github.com/users/beornborn/orgs","repos_url":"https://api.github.com/users/beornborn/repos","events_url":"https://api.github.com/users/beornborn/events{/privacy}","received_events_url":"https://api.github.com/users/beornborn/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57/commits","review_comments_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57/comments","review_comment_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/57/comments","statuses_url":"https://api.github.com/repos/kiev-ruby/redwings/statuses/3ce1dcc192dabd53ba88ba7a8ac030c1c29d0357","head":{"label":"kiev-ruby:feature/trello_setup_users","ref":"feature/trello_setup_users","sha":"3ce1dcc192dabd53ba88ba7a8ac030c1c29d0357","user":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"repo":{"id":36972191,"name":"redwings","full_name":"kiev-ruby/redwings","owner":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiev-ruby/redwings","description":"team management service","fork":false,"url":"https://api.github.com/repos/kiev-ruby/redwings","forks_url":"https://api.github.com/repos/kiev-ruby/redwings/forks","keys_url":"https://api.github.com/repos/kiev-ruby/redwings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiev-ruby/redwings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiev-ruby/redwings/teams","hooks_url":"https://api.github.com/repos/kiev-ruby/redwings/hooks","issue_events_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/events{/number}","events_url":"https://api.github.com/repos/kiev-ruby/redwings/events","assignees_url":"https://api.github.com/repos/kiev-ruby/redwings/assignees{/user}","branches_url":"https://api.github.com/repos/kiev-ruby/redwings/branches{/branch}","tags_url":"https://api.github.com/repos/kiev-ruby/redwings/tags","blobs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiev-ruby/redwings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiev-ruby/redwings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiev-ruby/redwings/statuses/{sha}","languages_url":"https://api.github.com/repos/kiev-ruby/redwings/languages","stargazers_url":"https://api.github.com/repos/kiev-ruby/redwings/stargazers","contributors_url":"https://api.github.com/repos/kiev-ruby/redwings/contributors","subscribers_url":"https://api.github.com/repos/kiev-ruby/redwings/subscribers","subscription_url":"https://api.github.com/repos/kiev-ruby/redwings/subscription","commits_url":"https://api.github.com/repos/kiev-ruby/redwings/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiev-ruby/redwings/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiev-ruby/redwings/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiev-ruby/redwings/contents/{+path}","compare_url":"https://api.github.com/repos/kiev-ruby/redwings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiev-ruby/redwings/merges","archive_url":"https://api.github.com/repos/kiev-ruby/redwings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiev-ruby/redwings/downloads","issues_url":"https://api.github.com/repos/kiev-ruby/redwings/issues{/number}","pulls_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls{/number}","milestones_url":"https://api.github.com/repos/kiev-ruby/redwings/milestones{/number}","notifications_url":"https://api.github.com/repos/kiev-ruby/redwings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiev-ruby/redwings/labels{/name}","releases_url":"https://api.github.com/repos/kiev-ruby/redwings/releases{/id}","created_at":"2015-06-06T07:53:33Z","updated_at":"2015-07-02T20:32:50Z","pushed_at":"2015-07-24T14:19:47Z","git_url":"git://github.com/kiev-ruby/redwings.git","ssh_url":"git@github.com:kiev-ruby/redwings.git","clone_url":"https://github.com/kiev-ruby/redwings.git","svn_url":"https://github.com/kiev-ruby/redwings","homepage":"https://redwings.herokuapp.com/","size":22648,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"kiev-ruby:develop","ref":"develop","sha":"a9977dbe6a4329e0b1cf6e819bcea0284da1b61e","user":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"repo":{"id":36972191,"name":"redwings","full_name":"kiev-ruby/redwings","owner":{"login":"kiev-ruby","id":11543510,"avatar_url":"https://avatars.githubusercontent.com/u/11543510?v=3","gravatar_id":"","url":"https://api.github.com/users/kiev-ruby","html_url":"https://github.com/kiev-ruby","followers_url":"https://api.github.com/users/kiev-ruby/followers","following_url":"https://api.github.com/users/kiev-ruby/following{/other_user}","gists_url":"https://api.github.com/users/kiev-ruby/gists{/gist_id}","starred_url":"https://api.github.com/users/kiev-ruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiev-ruby/subscriptions","organizations_url":"https://api.github.com/users/kiev-ruby/orgs","repos_url":"https://api.github.com/users/kiev-ruby/repos","events_url":"https://api.github.com/users/kiev-ruby/events{/privacy}","received_events_url":"https://api.github.com/users/kiev-ruby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiev-ruby/redwings","description":"team management service","fork":false,"url":"https://api.github.com/repos/kiev-ruby/redwings","forks_url":"https://api.github.com/repos/kiev-ruby/redwings/forks","keys_url":"https://api.github.com/repos/kiev-ruby/redwings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiev-ruby/redwings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiev-ruby/redwings/teams","hooks_url":"https://api.github.com/repos/kiev-ruby/redwings/hooks","issue_events_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/events{/number}","events_url":"https://api.github.com/repos/kiev-ruby/redwings/events","assignees_url":"https://api.github.com/repos/kiev-ruby/redwings/assignees{/user}","branches_url":"https://api.github.com/repos/kiev-ruby/redwings/branches{/branch}","tags_url":"https://api.github.com/repos/kiev-ruby/redwings/tags","blobs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiev-ruby/redwings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiev-ruby/redwings/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiev-ruby/redwings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiev-ruby/redwings/statuses/{sha}","languages_url":"https://api.github.com/repos/kiev-ruby/redwings/languages","stargazers_url":"https://api.github.com/repos/kiev-ruby/redwings/stargazers","contributors_url":"https://api.github.com/repos/kiev-ruby/redwings/contributors","subscribers_url":"https://api.github.com/repos/kiev-ruby/redwings/subscribers","subscription_url":"https://api.github.com/repos/kiev-ruby/redwings/subscription","commits_url":"https://api.github.com/repos/kiev-ruby/redwings/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiev-ruby/redwings/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiev-ruby/redwings/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiev-ruby/redwings/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiev-ruby/redwings/contents/{+path}","compare_url":"https://api.github.com/repos/kiev-ruby/redwings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiev-ruby/redwings/merges","archive_url":"https://api.github.com/repos/kiev-ruby/redwings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiev-ruby/redwings/downloads","issues_url":"https://api.github.com/repos/kiev-ruby/redwings/issues{/number}","pulls_url":"https://api.github.com/repos/kiev-ruby/redwings/pulls{/number}","milestones_url":"https://api.github.com/repos/kiev-ruby/redwings/milestones{/number}","notifications_url":"https://api.github.com/repos/kiev-ruby/redwings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiev-ruby/redwings/labels{/name}","releases_url":"https://api.github.com/repos/kiev-ruby/redwings/releases{/id}","created_at":"2015-06-06T07:53:33Z","updated_at":"2015-07-02T20:32:50Z","pushed_at":"2015-07-24T14:19:47Z","git_url":"git://github.com/kiev-ruby/redwings.git","ssh_url":"git@github.com:kiev-ruby/redwings.git","clone_url":"https://github.com/kiev-ruby/redwings.git","svn_url":"https://github.com/kiev-ruby/redwings","homepage":"https://redwings.herokuapp.com/","size":22648,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57"},"html":{"href":"https://github.com/kiev-ruby/redwings/pull/57"},"issue":{"href":"https://api.github.com/repos/kiev-ruby/redwings/issues/57"},"comments":{"href":"https://api.github.com/repos/kiev-ruby/redwings/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kiev-ruby/redwings/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/kiev-ruby/redwings/statuses/3ce1dcc192dabd53ba88ba7a8ac030c1c29d0357"}}}}