{"action":"created","comment":{"url":"https://api.github.com/repos/librariesio/conda-api/pulls/comments/325303285","pull_request_review_id":289436632,"id":325303285,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyNTMwMzI4NQ==","diff_hunk":"@@ -13,20 +15,23 @@ class CondaAPI < Sinatra::Base\n     Conda.instance.package_names.to_json\n   end\n \n-  get \"/packages/:name\" do\n-    content_type :json\n-    package_version(\"pkgs/main\", params[:name])\n-  end\n-\n-  get \"/packages/:channel/:name\" do\n-    channel = CGI.unescape(CGI.unescape(params[:channel]))  # %252F -> %2F -> /\n+  get \"/package\" do\n     content_type :json\n-    package_version(channel, params[:name])\n+    if request.query_string.empty?\n+      {\"error\" => \"Please provide at least a package name ?name= parameter\"}.to_json\n+    else\n+      package_version(request.query_string)","path":"app.rb","position":26,"original_position":26,"commit_id":"4036c5bed5dd4da01e564afaf289f1936a8ce01e","original_commit_id":"4036c5bed5dd4da01e564afaf289f1936a8ce01e","user":{"login":"mikeyoung85","id":1675420,"node_id":"MDQ6VXNlcjE2NzU0MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1675420?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeyoung85","html_url":"https://github.com/mikeyoung85","followers_url":"https://api.github.com/users/mikeyoung85/followers","following_url":"https://api.github.com/users/mikeyoung85/following{/other_user}","gists_url":"https://api.github.com/users/mikeyoung85/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeyoung85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeyoung85/subscriptions","organizations_url":"https://api.github.com/users/mikeyoung85/orgs","repos_url":"https://api.github.com/users/mikeyoung85/repos","events_url":"https://api.github.com/users/mikeyoung85/events{/privacy}","received_events_url":"https://api.github.com/users/mikeyoung85/received_events","type":"User","site_admin":false},"body":"I would keep the `package_version` method the same and pass the params into it.","created_at":"2019-09-17T17:50:22Z","updated_at":"2019-09-17T17:53:38Z","html_url":"https://github.com/librariesio/conda-api/pull/6#discussion_r325303285","pull_request_url":"https://api.github.com/repos/librariesio/conda-api/pulls/6","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/librariesio/conda-api/pulls/comments/325303285"},"html":{"href":"https://github.com/librariesio/conda-api/pull/6#discussion_r325303285"},"pull_request":{"href":"https://api.github.com/repos/librariesio/conda-api/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/librariesio/conda-api/pulls/6","id":318408674,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE4NDA4Njc0","html_url":"https://github.com/librariesio/conda-api/pull/6","diff_url":"https://github.com/librariesio/conda-api/pull/6.diff","patch_url":"https://github.com/librariesio/conda-api/pull/6.patch","issue_url":"https://api.github.com/repos/librariesio/conda-api/issues/6","number":6,"state":"open","locked":false,"title":"Change url scheme to query parameters","user":{"login":"tyrelsouza","id":923113,"node_id":"MDQ6VXNlcjkyMzExMw==","avatar_url":"https://avatars1.githubusercontent.com/u/923113?v=4","gravatar_id":"","url":"https://api.github.com/users/tyrelsouza","html_url":"https://github.com/tyrelsouza","followers_url":"https://api.github.com/users/tyrelsouza/followers","following_url":"https://api.github.com/users/tyrelsouza/following{/other_user}","gists_url":"https://api.github.com/users/tyrelsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/tyrelsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyrelsouza/subscriptions","organizations_url":"https://api.github.com/users/tyrelsouza/orgs","repos_url":"https://api.github.com/users/tyrelsouza/repos","events_url":"https://api.github.com/users/tyrelsouza/events{/privacy}","received_events_url":"https://api.github.com/users/tyrelsouza/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-09-17T15:51:59Z","updated_at":"2019-09-17T17:53:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16c0cd8ffaef7752d9c2453f744adcfa46faf55a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"havocp","id":218689,"node_id":"MDQ6VXNlcjIxODY4OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/218689?v=4","gravatar_id":"","url":"https://api.github.com/users/havocp","html_url":"https://github.com/havocp","followers_url":"https://api.github.com/users/havocp/followers","following_url":"https://api.github.com/users/havocp/following{/other_user}","gists_url":"https://api.github.com/users/havocp/gists{/gist_id}","starred_url":"https://api.github.com/users/havocp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havocp/subscriptions","organizations_url":"https://api.github.com/users/havocp/orgs","repos_url":"https://api.github.com/users/havocp/repos","events_url":"https://api.github.com/users/havocp/events{/privacy}","received_events_url":"https://api.github.com/users/havocp/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/librariesio/conda-api/pulls/6/commits","review_comments_url":"https://api.github.com/repos/librariesio/conda-api/pulls/6/comments","review_comment_url":"https://api.github.com/repos/librariesio/conda-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/librariesio/conda-api/issues/6/comments","statuses_url":"https://api.github.com/repos/librariesio/conda-api/statuses/4036c5bed5dd4da01e564afaf289f1936a8ce01e","head":{"label":"librariesio:query-parameters","ref":"query-parameters","sha":"4036c5bed5dd4da01e564afaf289f1936a8ce01e","user":{"login":"librariesio","id":11243589,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjQzNTg5","avatar_url":"https://avatars2.githubusercontent.com/u/11243589?v=4","gravatar_id":"","url":"https://api.github.com/users/librariesio","html_url":"https://github.com/librariesio","followers_url":"https://api.github.com/users/librariesio/followers","following_url":"https://api.github.com/users/librariesio/following{/other_user}","gists_url":"https://api.github.com/users/librariesio/gists{/gist_id}","starred_url":"https://api.github.com/users/librariesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librariesio/subscriptions","organizations_url":"https://api.github.com/users/librariesio/orgs","repos_url":"https://api.github.com/users/librariesio/repos","events_url":"https://api.github.com/users/librariesio/events{/privacy}","received_events_url":"https://api.github.com/users/librariesio/received_events","type":"Organization","site_admin":false},"repo":{"id":206142310,"node_id":"MDEwOlJlcG9zaXRvcnkyMDYxNDIzMTA=","name":"conda-api","full_name":"librariesio/conda-api","private":false,"owner":{"login":"librariesio","id":11243589,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjQzNTg5","avatar_url":"https://avatars2.githubusercontent.com/u/11243589?v=4","gravatar_id":"","url":"https://api.github.com/users/librariesio","html_url":"https://github.com/librariesio","followers_url":"https://api.github.com/users/librariesio/followers","following_url":"https://api.github.com/users/librariesio/following{/other_user}","gists_url":"https://api.github.com/users/librariesio/gists{/gist_id}","starred_url":"https://api.github.com/users/librariesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librariesio/subscriptions","organizations_url":"https://api.github.com/users/librariesio/orgs","repos_url":"https://api.github.com/users/librariesio/repos","events_url":"https://api.github.com/users/librariesio/events{/privacy}","received_events_url":"https://api.github.com/users/librariesio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/librariesio/conda-api","description":null,"fork":false,"url":"https://api.github.com/repos/librariesio/conda-api","forks_url":"https://api.github.com/repos/librariesio/conda-api/forks","keys_url":"https://api.github.com/repos/librariesio/conda-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/librariesio/conda-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/librariesio/conda-api/teams","hooks_url":"https://api.github.com/repos/librariesio/conda-api/hooks","issue_events_url":"https://api.github.com/repos/librariesio/conda-api/issues/events{/number}","events_url":"https://api.github.com/repos/librariesio/conda-api/events","assignees_url":"https://api.github.com/repos/librariesio/conda-api/assignees{/user}","branches_url":"https://api.github.com/repos/librariesio/conda-api/branches{/branch}","tags_url":"https://api.github.com/repos/librariesio/conda-api/tags","blobs_url":"https://api.github.com/repos/librariesio/conda-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/librariesio/conda-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/librariesio/conda-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/librariesio/conda-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/librariesio/conda-api/statuses/{sha}","languages_url":"https://api.github.com/repos/librariesio/conda-api/languages","stargazers_url":"https://api.github.com/repos/librariesio/conda-api/stargazers","contributors_url":"https://api.github.com/repos/librariesio/conda-api/contributors","subscribers_url":"https://api.github.com/repos/librariesio/conda-api/subscribers","subscription_url":"https://api.github.com/repos/librariesio/conda-api/subscription","commits_url":"https://api.github.com/repos/librariesio/conda-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/librariesio/conda-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/librariesio/conda-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/librariesio/conda-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/librariesio/conda-api/contents/{+path}","compare_url":"https://api.github.com/repos/librariesio/conda-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/librariesio/conda-api/merges","archive_url":"https://api.github.com/repos/librariesio/conda-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/librariesio/conda-api/downloads","issues_url":"https://api.github.com/repos/librariesio/conda-api/issues{/number}","pulls_url":"https://api.github.com/repos/librariesio/conda-api/pulls{/number}","milestones_url":"https://api.github.com/repos/librariesio/conda-api/milestones{/number}","notifications_url":"https://api.github.com/repos/librariesio/conda-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/librariesio/conda-api/labels{/name}","releases_url":"https://api.github.com/repos/librariesio/conda-api/releases{/id}","deployments_url":"https://api.github.com/repos/librariesio/conda-api/deployments","created_at":"2019-09-03T18:10:47Z","updated_at":"2019-09-16T20:27:51Z","pushed_at":"2019-09-17T17:18:00Z","git_url":"git://github.com/librariesio/conda-api.git","ssh_url":"git@github.com:librariesio/conda-api.git","clone_url":"https://github.com/librariesio/conda-api.git","svn_url":"https://github.com/librariesio/conda-api","homepage":null,"size":61,"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,"disabled":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":"librariesio:master","ref":"master","sha":"e262e08d48cd0f740e99cf9fccb7685c2cfe01b7","user":{"login":"librariesio","id":11243589,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjQzNTg5","avatar_url":"https://avatars2.githubusercontent.com/u/11243589?v=4","gravatar_id":"","url":"https://api.github.com/users/librariesio","html_url":"https://github.com/librariesio","followers_url":"https://api.github.com/users/librariesio/followers","following_url":"https://api.github.com/users/librariesio/following{/other_user}","gists_url":"https://api.github.com/users/librariesio/gists{/gist_id}","starred_url":"https://api.github.com/users/librariesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librariesio/subscriptions","organizations_url":"https://api.github.com/users/librariesio/orgs","repos_url":"https://api.github.com/users/librariesio/repos","events_url":"https://api.github.com/users/librariesio/events{/privacy}","received_events_url":"https://api.github.com/users/librariesio/received_events","type":"Organization","site_admin":false},"repo":{"id":206142310,"node_id":"MDEwOlJlcG9zaXRvcnkyMDYxNDIzMTA=","name":"conda-api","full_name":"librariesio/conda-api","private":false,"owner":{"login":"librariesio","id":11243589,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjQzNTg5","avatar_url":"https://avatars2.githubusercontent.com/u/11243589?v=4","gravatar_id":"","url":"https://api.github.com/users/librariesio","html_url":"https://github.com/librariesio","followers_url":"https://api.github.com/users/librariesio/followers","following_url":"https://api.github.com/users/librariesio/following{/other_user}","gists_url":"https://api.github.com/users/librariesio/gists{/gist_id}","starred_url":"https://api.github.com/users/librariesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librariesio/subscriptions","organizations_url":"https://api.github.com/users/librariesio/orgs","repos_url":"https://api.github.com/users/librariesio/repos","events_url":"https://api.github.com/users/librariesio/events{/privacy}","received_events_url":"https://api.github.com/users/librariesio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/librariesio/conda-api","description":null,"fork":false,"url":"https://api.github.com/repos/librariesio/conda-api","forks_url":"https://api.github.com/repos/librariesio/conda-api/forks","keys_url":"https://api.github.com/repos/librariesio/conda-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/librariesio/conda-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/librariesio/conda-api/teams","hooks_url":"https://api.github.com/repos/librariesio/conda-api/hooks","issue_events_url":"https://api.github.com/repos/librariesio/conda-api/issues/events{/number}","events_url":"https://api.github.com/repos/librariesio/conda-api/events","assignees_url":"https://api.github.com/repos/librariesio/conda-api/assignees{/user}","branches_url":"https://api.github.com/repos/librariesio/conda-api/branches{/branch}","tags_url":"https://api.github.com/repos/librariesio/conda-api/tags","blobs_url":"https://api.github.com/repos/librariesio/conda-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/librariesio/conda-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/librariesio/conda-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/librariesio/conda-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/librariesio/conda-api/statuses/{sha}","languages_url":"https://api.github.com/repos/librariesio/conda-api/languages","stargazers_url":"https://api.github.com/repos/librariesio/conda-api/stargazers","contributors_url":"https://api.github.com/repos/librariesio/conda-api/contributors","subscribers_url":"https://api.github.com/repos/librariesio/conda-api/subscribers","subscription_url":"https://api.github.com/repos/librariesio/conda-api/subscription","commits_url":"https://api.github.com/repos/librariesio/conda-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/librariesio/conda-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/librariesio/conda-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/librariesio/conda-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/librariesio/conda-api/contents/{+path}","compare_url":"https://api.github.com/repos/librariesio/conda-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/librariesio/conda-api/merges","archive_url":"https://api.github.com/repos/librariesio/conda-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/librariesio/conda-api/downloads","issues_url":"https://api.github.com/repos/librariesio/conda-api/issues{/number}","pulls_url":"https://api.github.com/repos/librariesio/conda-api/pulls{/number}","milestones_url":"https://api.github.com/repos/librariesio/conda-api/milestones{/number}","notifications_url":"https://api.github.com/repos/librariesio/conda-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/librariesio/conda-api/labels{/name}","releases_url":"https://api.github.com/repos/librariesio/conda-api/releases{/id}","deployments_url":"https://api.github.com/repos/librariesio/conda-api/deployments","created_at":"2019-09-03T18:10:47Z","updated_at":"2019-09-16T20:27:51Z","pushed_at":"2019-09-17T17:18:00Z","git_url":"git://github.com/librariesio/conda-api.git","ssh_url":"git@github.com:librariesio/conda-api.git","clone_url":"https://github.com/librariesio/conda-api.git","svn_url":"https://github.com/librariesio/conda-api","homepage":null,"size":61,"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,"disabled":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/librariesio/conda-api/pulls/6"},"html":{"href":"https://github.com/librariesio/conda-api/pull/6"},"issue":{"href":"https://api.github.com/repos/librariesio/conda-api/issues/6"},"comments":{"href":"https://api.github.com/repos/librariesio/conda-api/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/librariesio/conda-api/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/librariesio/conda-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/librariesio/conda-api/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/librariesio/conda-api/statuses/4036c5bed5dd4da01e564afaf289f1936a8ce01e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mikeyoung85"}}