{"action":"opened","number":63,"pull_request":{"url":"https://api.github.com/repos/ckan/ckanapi/pulls/63","id":48145768,"html_url":"https://github.com/ckan/ckanapi/pull/63","diff_url":"https://github.com/ckan/ckanapi/pull/63.diff","patch_url":"https://github.com/ckan/ckanapi/pull/63.patch","issue_url":"https://api.github.com/repos/ckan/ckanapi/issues/63","number":63,"state":"open","locked":false,"title":"inline JSON action arguments","user":{"login":"wardi","id":153258,"avatar_url":"https://avatars.githubusercontent.com/u/153258?v=3","gravatar_id":"","url":"https://api.github.com/users/wardi","html_url":"https://github.com/wardi","followers_url":"https://api.github.com/users/wardi/followers","following_url":"https://api.github.com/users/wardi/following{/other_user}","gists_url":"https://api.github.com/users/wardi/gists{/gist_id}","starred_url":"https://api.github.com/users/wardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardi/subscriptions","organizations_url":"https://api.github.com/users/wardi/orgs","repos_url":"https://api.github.com/users/wardi/repos","events_url":"https://api.github.com/users/wardi/events{/privacy}","received_events_url":"https://api.github.com/users/wardi/received_events","type":"User","site_admin":false},"body":"Some action parameters can only be passed as JSON (like package_search facets and datastore_create parameters) and it can be a pain to use the -i option to pipe in a JSON object containing all parameters. This change lets us mix and match KEY=STRING and KEY:JSON parameters. KEY:JSON parameters parse the right side as JSON before passing to CKAN.\r\n\r\ne.g.\r\n\r\n```\r\necho '{\"facet.field\":[\"organization\"], \"rows\":0}' | ckanapi action package_search -i\r\n```\r\n\r\ncan now be written as\r\n\r\n```\r\nckanapi action package_search 'facet.field:[\"organization\"]' rows:0\r\n```\r\n","created_at":"2015-10-20T00:59:39Z","updated_at":"2015-10-20T00:59:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ckan/ckanapi/pulls/63/commits","review_comments_url":"https://api.github.com/repos/ckan/ckanapi/pulls/63/comments","review_comment_url":"https://api.github.com/repos/ckan/ckanapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ckan/ckanapi/issues/63/comments","statuses_url":"https://api.github.com/repos/ckan/ckanapi/statuses/e4f0a76ad011bf52666bf379f3b14a80d6f00a82","head":{"label":"wardi:json-cli-args","ref":"json-cli-args","sha":"e4f0a76ad011bf52666bf379f3b14a80d6f00a82","user":{"login":"wardi","id":153258,"avatar_url":"https://avatars.githubusercontent.com/u/153258?v=3","gravatar_id":"","url":"https://api.github.com/users/wardi","html_url":"https://github.com/wardi","followers_url":"https://api.github.com/users/wardi/followers","following_url":"https://api.github.com/users/wardi/following{/other_user}","gists_url":"https://api.github.com/users/wardi/gists{/gist_id}","starred_url":"https://api.github.com/users/wardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardi/subscriptions","organizations_url":"https://api.github.com/users/wardi/orgs","repos_url":"https://api.github.com/users/wardi/repos","events_url":"https://api.github.com/users/wardi/events{/privacy}","received_events_url":"https://api.github.com/users/wardi/received_events","type":"User","site_admin":false},"repo":{"id":10915014,"name":"ckanapi","full_name":"wardi/ckanapi","owner":{"login":"wardi","id":153258,"avatar_url":"https://avatars.githubusercontent.com/u/153258?v=3","gravatar_id":"","url":"https://api.github.com/users/wardi","html_url":"https://github.com/wardi","followers_url":"https://api.github.com/users/wardi/followers","following_url":"https://api.github.com/users/wardi/following{/other_user}","gists_url":"https://api.github.com/users/wardi/gists{/gist_id}","starred_url":"https://api.github.com/users/wardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardi/subscriptions","organizations_url":"https://api.github.com/users/wardi/orgs","repos_url":"https://api.github.com/users/wardi/repos","events_url":"https://api.github.com/users/wardi/events{/privacy}","received_events_url":"https://api.github.com/users/wardi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wardi/ckanapi","description":"A command line interface and Python module for accessing the CKAN Action API","fork":true,"url":"https://api.github.com/repos/wardi/ckanapi","forks_url":"https://api.github.com/repos/wardi/ckanapi/forks","keys_url":"https://api.github.com/repos/wardi/ckanapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wardi/ckanapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wardi/ckanapi/teams","hooks_url":"https://api.github.com/repos/wardi/ckanapi/hooks","issue_events_url":"https://api.github.com/repos/wardi/ckanapi/issues/events{/number}","events_url":"https://api.github.com/repos/wardi/ckanapi/events","assignees_url":"https://api.github.com/repos/wardi/ckanapi/assignees{/user}","branches_url":"https://api.github.com/repos/wardi/ckanapi/branches{/branch}","tags_url":"https://api.github.com/repos/wardi/ckanapi/tags","blobs_url":"https://api.github.com/repos/wardi/ckanapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wardi/ckanapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wardi/ckanapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/wardi/ckanapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wardi/ckanapi/statuses/{sha}","languages_url":"https://api.github.com/repos/wardi/ckanapi/languages","stargazers_url":"https://api.github.com/repos/wardi/ckanapi/stargazers","contributors_url":"https://api.github.com/repos/wardi/ckanapi/contributors","subscribers_url":"https://api.github.com/repos/wardi/ckanapi/subscribers","subscription_url":"https://api.github.com/repos/wardi/ckanapi/subscription","commits_url":"https://api.github.com/repos/wardi/ckanapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/wardi/ckanapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/wardi/ckanapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/wardi/ckanapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/wardi/ckanapi/contents/{+path}","compare_url":"https://api.github.com/repos/wardi/ckanapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wardi/ckanapi/merges","archive_url":"https://api.github.com/repos/wardi/ckanapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wardi/ckanapi/downloads","issues_url":"https://api.github.com/repos/wardi/ckanapi/issues{/number}","pulls_url":"https://api.github.com/repos/wardi/ckanapi/pulls{/number}","milestones_url":"https://api.github.com/repos/wardi/ckanapi/milestones{/number}","notifications_url":"https://api.github.com/repos/wardi/ckanapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wardi/ckanapi/labels{/name}","releases_url":"https://api.github.com/repos/wardi/ckanapi/releases{/id}","created_at":"2013-06-24T17:29:52Z","updated_at":"2015-09-24T23:03:36Z","pushed_at":"2015-10-20T00:54:41Z","git_url":"git://github.com/wardi/ckanapi.git","ssh_url":"git@github.com:wardi/ckanapi.git","clone_url":"https://github.com/wardi/ckanapi.git","svn_url":"https://github.com/wardi/ckanapi","homepage":"","size":636,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":4,"default_branch":"master"}},"base":{"label":"ckan:master","ref":"master","sha":"70e96bc9e6634b51cba07f99561f45a05055dcfa","user":{"login":"ckan","id":1630326,"avatar_url":"https://avatars.githubusercontent.com/u/1630326?v=3","gravatar_id":"","url":"https://api.github.com/users/ckan","html_url":"https://github.com/ckan","followers_url":"https://api.github.com/users/ckan/followers","following_url":"https://api.github.com/users/ckan/following{/other_user}","gists_url":"https://api.github.com/users/ckan/gists{/gist_id}","starred_url":"https://api.github.com/users/ckan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckan/subscriptions","organizations_url":"https://api.github.com/users/ckan/orgs","repos_url":"https://api.github.com/users/ckan/repos","events_url":"https://api.github.com/users/ckan/events{/privacy}","received_events_url":"https://api.github.com/users/ckan/received_events","type":"Organization","site_admin":false},"repo":{"id":9396011,"name":"ckanapi","full_name":"ckan/ckanapi","owner":{"login":"ckan","id":1630326,"avatar_url":"https://avatars.githubusercontent.com/u/1630326?v=3","gravatar_id":"","url":"https://api.github.com/users/ckan","html_url":"https://github.com/ckan","followers_url":"https://api.github.com/users/ckan/followers","following_url":"https://api.github.com/users/ckan/following{/other_user}","gists_url":"https://api.github.com/users/ckan/gists{/gist_id}","starred_url":"https://api.github.com/users/ckan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckan/subscriptions","organizations_url":"https://api.github.com/users/ckan/orgs","repos_url":"https://api.github.com/users/ckan/repos","events_url":"https://api.github.com/users/ckan/events{/privacy}","received_events_url":"https://api.github.com/users/ckan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ckan/ckanapi","description":"A command line interface and Python module for accessing the CKAN Action API","fork":false,"url":"https://api.github.com/repos/ckan/ckanapi","forks_url":"https://api.github.com/repos/ckan/ckanapi/forks","keys_url":"https://api.github.com/repos/ckan/ckanapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ckan/ckanapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ckan/ckanapi/teams","hooks_url":"https://api.github.com/repos/ckan/ckanapi/hooks","issue_events_url":"https://api.github.com/repos/ckan/ckanapi/issues/events{/number}","events_url":"https://api.github.com/repos/ckan/ckanapi/events","assignees_url":"https://api.github.com/repos/ckan/ckanapi/assignees{/user}","branches_url":"https://api.github.com/repos/ckan/ckanapi/branches{/branch}","tags_url":"https://api.github.com/repos/ckan/ckanapi/tags","blobs_url":"https://api.github.com/repos/ckan/ckanapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ckan/ckanapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ckan/ckanapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ckan/ckanapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ckan/ckanapi/statuses/{sha}","languages_url":"https://api.github.com/repos/ckan/ckanapi/languages","stargazers_url":"https://api.github.com/repos/ckan/ckanapi/stargazers","contributors_url":"https://api.github.com/repos/ckan/ckanapi/contributors","subscribers_url":"https://api.github.com/repos/ckan/ckanapi/subscribers","subscription_url":"https://api.github.com/repos/ckan/ckanapi/subscription","commits_url":"https://api.github.com/repos/ckan/ckanapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ckan/ckanapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ckan/ckanapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ckan/ckanapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ckan/ckanapi/contents/{+path}","compare_url":"https://api.github.com/repos/ckan/ckanapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ckan/ckanapi/merges","archive_url":"https://api.github.com/repos/ckan/ckanapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ckan/ckanapi/downloads","issues_url":"https://api.github.com/repos/ckan/ckanapi/issues{/number}","pulls_url":"https://api.github.com/repos/ckan/ckanapi/pulls{/number}","milestones_url":"https://api.github.com/repos/ckan/ckanapi/milestones{/number}","notifications_url":"https://api.github.com/repos/ckan/ckanapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ckan/ckanapi/labels{/name}","releases_url":"https://api.github.com/repos/ckan/ckanapi/releases{/id}","created_at":"2013-04-12T14:24:57Z","updated_at":"2015-10-01T00:42:09Z","pushed_at":"2015-10-15T17:48:14Z","git_url":"git://github.com/ckan/ckanapi.git","ssh_url":"git@github.com:ckan/ckanapi.git","clone_url":"https://github.com/ckan/ckanapi.git","svn_url":"https://github.com/ckan/ckanapi","homepage":"","size":735,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":11,"forks":17,"open_issues":11,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ckan/ckanapi/pulls/63"},"html":{"href":"https://github.com/ckan/ckanapi/pull/63"},"issue":{"href":"https://api.github.com/repos/ckan/ckanapi/issues/63"},"comments":{"href":"https://api.github.com/repos/ckan/ckanapi/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/ckan/ckanapi/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/ckan/ckanapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ckan/ckanapi/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/ckan/ckanapi/statuses/e4f0a76ad011bf52666bf379f3b14a80d6f00a82"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":18,"deletions":11,"changed_files":3}}