{"action":"created","comment":{"url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/comments/83057204","pull_request_review_id":3922788,"id":83057204,"diff_hunk":"@@ -140,6 +140,24 @@ def __init__(\n                                  version=self.sf_version))\n         self.apex_url = ('https://{instance}/services/apexrest/'\n                          .format(instance=self.sf_instance))\n+        self.tooling_url = ('{base}tooling/').format(base=self.base_url)\n+\n+    def execanon(self, apex_string):\n+        \"\"\"Executes a string of Apex code.\n+        \"\"\"\n+        url = self.tooling_url + \"executeAnonymous/\"\n+        params = {'anonymousBody': apex_string}\n+        result = self.request.get(url, headers=self.headers, params=params)","path":"simple_salesforce/api.py","position":11,"original_position":11,"commit_id":"a7b97a1fa2b9550ecd65619c288a7aa019ff9746","original_commit_id":"a7b97a1fa2b9550ecd65619c288a7aa019ff9746","user":{"login":"Daenyth","id":14644,"avatar_url":"https://avatars.githubusercontent.com/u/14644?v=3","gravatar_id":"","url":"https://api.github.com/users/Daenyth","html_url":"https://github.com/Daenyth","followers_url":"https://api.github.com/users/Daenyth/followers","following_url":"https://api.github.com/users/Daenyth/following{/other_user}","gists_url":"https://api.github.com/users/Daenyth/gists{/gist_id}","starred_url":"https://api.github.com/users/Daenyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daenyth/subscriptions","organizations_url":"https://api.github.com/users/Daenyth/orgs","repos_url":"https://api.github.com/users/Daenyth/repos","events_url":"https://api.github.com/users/Daenyth/events{/privacy}","received_events_url":"https://api.github.com/users/Daenyth/received_events","type":"User","site_admin":false},"body":"👍  to that; I have to override `_call_salesforce` in my codebase so that I can hook into some request-tracking code in my codebase. The consistency made it really easy","created_at":"2016-10-12T17:32:07Z","updated_at":"2016-10-12T17:32:07Z","html_url":"https://github.com/simple-salesforce/simple-salesforce/pull/106#discussion_r83057204","pull_request_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106","_links":{"self":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/comments/83057204"},"html":{"href":"https://github.com/simple-salesforce/simple-salesforce/pull/106#discussion_r83057204"},"pull_request":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106"}}},"pull_request":{"url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106","id":64269411,"html_url":"https://github.com/simple-salesforce/simple-salesforce/pull/106","diff_url":"https://github.com/simple-salesforce/simple-salesforce/pull/106.diff","patch_url":"https://github.com/simple-salesforce/simple-salesforce/pull/106.patch","issue_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/issues/106","number":106,"state":"open","locked":false,"title":"add support for execute anonymous via tooling api","user":{"login":"realdoug","id":2383488,"avatar_url":"https://avatars.githubusercontent.com/u/2383488?v=3","gravatar_id":"","url":"https://api.github.com/users/realdoug","html_url":"https://github.com/realdoug","followers_url":"https://api.github.com/users/realdoug/followers","following_url":"https://api.github.com/users/realdoug/following{/other_user}","gists_url":"https://api.github.com/users/realdoug/gists{/gist_id}","starred_url":"https://api.github.com/users/realdoug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realdoug/subscriptions","organizations_url":"https://api.github.com/users/realdoug/orgs","repos_url":"https://api.github.com/users/realdoug/repos","events_url":"https://api.github.com/users/realdoug/events{/privacy}","received_events_url":"https://api.github.com/users/realdoug/received_events","type":"User","site_admin":false},"body":"I had a need to execute anonymous apex, so I added support for the tooling endpoint and the executeAnonymous resource.  Thanks!","created_at":"2016-03-27T16:31:10Z","updated_at":"2016-10-12T17:32:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04b4aaabf94f96893a63cd3459155e18ce336052","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106/commits","review_comments_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106/comments","review_comment_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/issues/106/comments","statuses_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/statuses/a7b97a1fa2b9550ecd65619c288a7aa019ff9746","head":{"label":"realdoug:master","ref":"master","sha":"a7b97a1fa2b9550ecd65619c288a7aa019ff9746","user":{"login":"realdoug","id":2383488,"avatar_url":"https://avatars.githubusercontent.com/u/2383488?v=3","gravatar_id":"","url":"https://api.github.com/users/realdoug","html_url":"https://github.com/realdoug","followers_url":"https://api.github.com/users/realdoug/followers","following_url":"https://api.github.com/users/realdoug/following{/other_user}","gists_url":"https://api.github.com/users/realdoug/gists{/gist_id}","starred_url":"https://api.github.com/users/realdoug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realdoug/subscriptions","organizations_url":"https://api.github.com/users/realdoug/orgs","repos_url":"https://api.github.com/users/realdoug/repos","events_url":"https://api.github.com/users/realdoug/events{/privacy}","received_events_url":"https://api.github.com/users/realdoug/received_events","type":"User","site_admin":false},"repo":{"id":54837439,"name":"simple-salesforce","full_name":"realdoug/simple-salesforce","owner":{"login":"realdoug","id":2383488,"avatar_url":"https://avatars.githubusercontent.com/u/2383488?v=3","gravatar_id":"","url":"https://api.github.com/users/realdoug","html_url":"https://github.com/realdoug","followers_url":"https://api.github.com/users/realdoug/followers","following_url":"https://api.github.com/users/realdoug/following{/other_user}","gists_url":"https://api.github.com/users/realdoug/gists{/gist_id}","starred_url":"https://api.github.com/users/realdoug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realdoug/subscriptions","organizations_url":"https://api.github.com/users/realdoug/orgs","repos_url":"https://api.github.com/users/realdoug/repos","events_url":"https://api.github.com/users/realdoug/events{/privacy}","received_events_url":"https://api.github.com/users/realdoug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/realdoug/simple-salesforce","description":"A very simple Salesforce.com REST API client for Python","fork":true,"url":"https://api.github.com/repos/realdoug/simple-salesforce","forks_url":"https://api.github.com/repos/realdoug/simple-salesforce/forks","keys_url":"https://api.github.com/repos/realdoug/simple-salesforce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realdoug/simple-salesforce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realdoug/simple-salesforce/teams","hooks_url":"https://api.github.com/repos/realdoug/simple-salesforce/hooks","issue_events_url":"https://api.github.com/repos/realdoug/simple-salesforce/issues/events{/number}","events_url":"https://api.github.com/repos/realdoug/simple-salesforce/events","assignees_url":"https://api.github.com/repos/realdoug/simple-salesforce/assignees{/user}","branches_url":"https://api.github.com/repos/realdoug/simple-salesforce/branches{/branch}","tags_url":"https://api.github.com/repos/realdoug/simple-salesforce/tags","blobs_url":"https://api.github.com/repos/realdoug/simple-salesforce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realdoug/simple-salesforce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realdoug/simple-salesforce/git/refs{/sha}","trees_url":"https://api.github.com/repos/realdoug/simple-salesforce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realdoug/simple-salesforce/statuses/{sha}","languages_url":"https://api.github.com/repos/realdoug/simple-salesforce/languages","stargazers_url":"https://api.github.com/repos/realdoug/simple-salesforce/stargazers","contributors_url":"https://api.github.com/repos/realdoug/simple-salesforce/contributors","subscribers_url":"https://api.github.com/repos/realdoug/simple-salesforce/subscribers","subscription_url":"https://api.github.com/repos/realdoug/simple-salesforce/subscription","commits_url":"https://api.github.com/repos/realdoug/simple-salesforce/commits{/sha}","git_commits_url":"https://api.github.com/repos/realdoug/simple-salesforce/git/commits{/sha}","comments_url":"https://api.github.com/repos/realdoug/simple-salesforce/comments{/number}","issue_comment_url":"https://api.github.com/repos/realdoug/simple-salesforce/issues/comments{/number}","contents_url":"https://api.github.com/repos/realdoug/simple-salesforce/contents/{+path}","compare_url":"https://api.github.com/repos/realdoug/simple-salesforce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realdoug/simple-salesforce/merges","archive_url":"https://api.github.com/repos/realdoug/simple-salesforce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realdoug/simple-salesforce/downloads","issues_url":"https://api.github.com/repos/realdoug/simple-salesforce/issues{/number}","pulls_url":"https://api.github.com/repos/realdoug/simple-salesforce/pulls{/number}","milestones_url":"https://api.github.com/repos/realdoug/simple-salesforce/milestones{/number}","notifications_url":"https://api.github.com/repos/realdoug/simple-salesforce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realdoug/simple-salesforce/labels{/name}","releases_url":"https://api.github.com/repos/realdoug/simple-salesforce/releases{/id}","deployments_url":"https://api.github.com/repos/realdoug/simple-salesforce/deployments","created_at":"2016-03-27T16:27:05Z","updated_at":"2016-03-27T16:27:06Z","pushed_at":"2016-03-27T16:50:18Z","git_url":"git://github.com/realdoug/simple-salesforce.git","ssh_url":"git@github.com:realdoug/simple-salesforce.git","clone_url":"https://github.com/realdoug/simple-salesforce.git","svn_url":"https://github.com/realdoug/simple-salesforce","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"simple-salesforce:master","ref":"master","sha":"6c9302d4f46850b5cf7f3d8891ccfd6ac35750c9","user":{"login":"simple-salesforce","id":19581234,"avatar_url":"https://avatars.githubusercontent.com/u/19581234?v=3","gravatar_id":"","url":"https://api.github.com/users/simple-salesforce","html_url":"https://github.com/simple-salesforce","followers_url":"https://api.github.com/users/simple-salesforce/followers","following_url":"https://api.github.com/users/simple-salesforce/following{/other_user}","gists_url":"https://api.github.com/users/simple-salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/simple-salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simple-salesforce/subscriptions","organizations_url":"https://api.github.com/users/simple-salesforce/orgs","repos_url":"https://api.github.com/users/simple-salesforce/repos","events_url":"https://api.github.com/users/simple-salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/simple-salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":7673329,"name":"simple-salesforce","full_name":"simple-salesforce/simple-salesforce","owner":{"login":"simple-salesforce","id":19581234,"avatar_url":"https://avatars.githubusercontent.com/u/19581234?v=3","gravatar_id":"","url":"https://api.github.com/users/simple-salesforce","html_url":"https://github.com/simple-salesforce","followers_url":"https://api.github.com/users/simple-salesforce/followers","following_url":"https://api.github.com/users/simple-salesforce/following{/other_user}","gists_url":"https://api.github.com/users/simple-salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/simple-salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simple-salesforce/subscriptions","organizations_url":"https://api.github.com/users/simple-salesforce/orgs","repos_url":"https://api.github.com/users/simple-salesforce/repos","events_url":"https://api.github.com/users/simple-salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/simple-salesforce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simple-salesforce/simple-salesforce","description":"A very simple Salesforce.com REST API client for Python","fork":false,"url":"https://api.github.com/repos/simple-salesforce/simple-salesforce","forks_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/forks","keys_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/teams","hooks_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/hooks","issue_events_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/issues/events{/number}","events_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/events","assignees_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/assignees{/user}","branches_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/branches{/branch}","tags_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/tags","blobs_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/git/refs{/sha}","trees_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/statuses/{sha}","languages_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/languages","stargazers_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/stargazers","contributors_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/contributors","subscribers_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/subscribers","subscription_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/subscription","commits_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/commits{/sha}","git_commits_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/git/commits{/sha}","comments_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/comments{/number}","issue_comment_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/issues/comments{/number}","contents_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/contents/{+path}","compare_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/merges","archive_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/downloads","issues_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/issues{/number}","pulls_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls{/number}","milestones_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/milestones{/number}","notifications_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/labels{/name}","releases_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/releases{/id}","deployments_url":"https://api.github.com/repos/simple-salesforce/simple-salesforce/deployments","created_at":"2013-01-17T20:08:57Z","updated_at":"2016-10-12T11:48:38Z","pushed_at":"2016-10-07T02:22:26Z","git_url":"git://github.com/simple-salesforce/simple-salesforce.git","ssh_url":"git@github.com:simple-salesforce/simple-salesforce.git","clone_url":"https://github.com/simple-salesforce/simple-salesforce.git","svn_url":"https://github.com/simple-salesforce/simple-salesforce","homepage":null,"size":414,"stargazers_count":261,"watchers_count":261,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":154,"mirror_url":null,"open_issues_count":40,"forks":154,"open_issues":40,"watchers":261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106"},"html":{"href":"https://github.com/simple-salesforce/simple-salesforce/pull/106"},"issue":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/issues/106"},"comments":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/simple-salesforce/simple-salesforce/statuses/a7b97a1fa2b9550ecd65619c288a7aa019ff9746"}}}}
{"actor":{"display_login":"Daenyth"}}