{"action":"created","comment":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/26896145","id":26896145,"diff_hunk":"@@ -207,6 +242,11 @@ public function access($op, DataInterpreterInterface $interpreter) {\n \n     // Perform field API access checks.\n     $property_wrapper = $this->propertyWrapper($interpreter);\n+    if ($this->isWrapperMethodOnEntity() && $this->getWrapperMethod() && $this->getProperty()) {\n+      // Sometimes we define fields as $wrapper->getIdentifier. We need to\n+      // resolve that to $wrapper->nid to call $wrapper->nid->info().\n+      $property_wrapper = $property_wrapper->{$this->getProperty()};","path":"src/Plugin/resource/Field/ResourceFieldEntity.php","position":129,"original_position":129,"commit_id":"bfb919eceb77d694348c70716b5fd897e40ff3b5","original_commit_id":"bfb919eceb77d694348c70716b5fd897e40ff3b5","user":{"login":"amitaibu","id":125707,"avatar_url":"https://avatars.githubusercontent.com/u/125707?v=3","gravatar_id":"","url":"https://api.github.com/users/amitaibu","html_url":"https://github.com/amitaibu","followers_url":"https://api.github.com/users/amitaibu/followers","following_url":"https://api.github.com/users/amitaibu/following{/other_user}","gists_url":"https://api.github.com/users/amitaibu/gists{/gist_id}","starred_url":"https://api.github.com/users/amitaibu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitaibu/subscriptions","organizations_url":"https://api.github.com/users/amitaibu/orgs","repos_url":"https://api.github.com/users/amitaibu/repos","events_url":"https://api.github.com/users/amitaibu/events{/privacy}","received_events_url":"https://api.github.com/users/amitaibu/received_events","type":"User","site_admin":false},"body":"this part isn't clear, can you give an example.","created_at":"2015-03-21T19:42:11Z","updated_at":"2015-03-21T19:42:11Z","html_url":"https://github.com/RESTful-Drupal/restful/pull/439#discussion_r26896145","pull_request_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439","_links":{"self":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/26896145"},"html":{"href":"https://github.com/RESTful-Drupal/restful/pull/439#discussion_r26896145"},"pull_request":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439"}}},"pull_request":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439","id":31422841,"html_url":"https://github.com/RESTful-Drupal/restful/pull/439","diff_url":"https://github.com/RESTful-Drupal/restful/pull/439.diff","patch_url":"https://github.com/RESTful-Drupal/restful/pull/439.patch","issue_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/439","number":439,"state":"open","locked":false,"title":"2.x writing entities","user":{"login":"mateu-aguilo-bosch","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/mateu-aguilo-bosch","html_url":"https://github.com/mateu-aguilo-bosch","followers_url":"https://api.github.com/users/mateu-aguilo-bosch/followers","following_url":"https://api.github.com/users/mateu-aguilo-bosch/following{/other_user}","gists_url":"https://api.github.com/users/mateu-aguilo-bosch/gists{/gist_id}","starred_url":"https://api.github.com/users/mateu-aguilo-bosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateu-aguilo-bosch/subscriptions","organizations_url":"https://api.github.com/users/mateu-aguilo-bosch/orgs","repos_url":"https://api.github.com/users/mateu-aguilo-bosch/repos","events_url":"https://api.github.com/users/mateu-aguilo-bosch/events{/privacy}","received_events_url":"https://api.github.com/users/mateu-aguilo-bosch/received_events","type":"User","site_admin":false},"body":"@amitaibu this PR depends on https://github.com/RESTful-Drupal/restful/pull/437.\r\n\r\nLike with the read, this only checks that POST can do basic posting. With this code you can do:\r\n\r\n```\r\ncurl -i -X POST \\\r\n   -H \"X-API-Version:1.0\" \\\r\n   -H \"Accept:application/json\" \\\r\n   -H \"Content-Type:application/json\" \\\r\n   -d \\\r\n'{\r\n  \"label\": \"POST title 2!\",\r\n  \"body\": \"POST body 2\"\r\n}' \\\r\n 'http://restful.local/api/articles'\r\n```\r\n\r\nAnd that will create an article with a title and a body.\r\n\r\nNext steps will be making sure embedded posting works, that we can upload files, … Basically making sure all the advanced functionalities are in place.","created_at":"2015-03-18T12:10:14Z","updated_at":"2015-03-21T19:42:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ace93f8cbadc1daee58257b2bf825075cefab81","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439/commits","review_comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439/comments","review_comment_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/439/comments","statuses_url":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/bfb919eceb77d694348c70716b5fd897e40ff3b5","head":{"label":"mateu-aguilo-bosch:2.x-writing-entities","ref":"2.x-writing-entities","sha":"bfb919eceb77d694348c70716b5fd897e40ff3b5","user":{"login":"mateu-aguilo-bosch","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/mateu-aguilo-bosch","html_url":"https://github.com/mateu-aguilo-bosch","followers_url":"https://api.github.com/users/mateu-aguilo-bosch/followers","following_url":"https://api.github.com/users/mateu-aguilo-bosch/following{/other_user}","gists_url":"https://api.github.com/users/mateu-aguilo-bosch/gists{/gist_id}","starred_url":"https://api.github.com/users/mateu-aguilo-bosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateu-aguilo-bosch/subscriptions","organizations_url":"https://api.github.com/users/mateu-aguilo-bosch/orgs","repos_url":"https://api.github.com/users/mateu-aguilo-bosch/repos","events_url":"https://api.github.com/users/mateu-aguilo-bosch/events{/privacy}","received_events_url":"https://api.github.com/users/mateu-aguilo-bosch/received_events","type":"User","site_admin":false},"repo":{"id":19935082,"name":"restful","full_name":"mateu-aguilo-bosch/restful","owner":{"login":"mateu-aguilo-bosch","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/mateu-aguilo-bosch","html_url":"https://github.com/mateu-aguilo-bosch","followers_url":"https://api.github.com/users/mateu-aguilo-bosch/followers","following_url":"https://api.github.com/users/mateu-aguilo-bosch/following{/other_user}","gists_url":"https://api.github.com/users/mateu-aguilo-bosch/gists{/gist_id}","starred_url":"https://api.github.com/users/mateu-aguilo-bosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateu-aguilo-bosch/subscriptions","organizations_url":"https://api.github.com/users/mateu-aguilo-bosch/orgs","repos_url":"https://api.github.com/users/mateu-aguilo-bosch/repos","events_url":"https://api.github.com/users/mateu-aguilo-bosch/events{/privacy}","received_events_url":"https://api.github.com/users/mateu-aguilo-bosch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mateu-aguilo-bosch/restful","description":"RESTful best practices for Drupal","fork":true,"url":"https://api.github.com/repos/mateu-aguilo-bosch/restful","forks_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/forks","keys_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/teams","hooks_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/hooks","issue_events_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/issues/events{/number}","events_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/events","assignees_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/assignees{/user}","branches_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/branches{/branch}","tags_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/tags","blobs_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/languages","stargazers_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/stargazers","contributors_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/contributors","subscribers_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/subscribers","subscription_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/subscription","commits_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/issues/comments{/number}","contents_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/contents/{+path}","compare_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/merges","archive_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/downloads","issues_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/issues{/number}","pulls_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/labels{/name}","releases_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/releases{/id}","created_at":"2014-05-19T08:55:09Z","updated_at":"2015-03-21T10:41:27Z","pushed_at":"2015-03-21T10:41:27Z","git_url":"git://github.com/mateu-aguilo-bosch/restful.git","ssh_url":"git@github.com:mateu-aguilo-bosch/restful.git","clone_url":"https://github.com/mateu-aguilo-bosch/restful.git","svn_url":"https://github.com/mateu-aguilo-bosch/restful","homepage":"","size":3275,"stargazers_count":1,"watchers_count":1,"language":"PHP","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":1,"default_branch":"7.x-1.x"}},"base":{"label":"RESTful-Drupal:7.x-2.x","ref":"7.x-2.x","sha":"83e4150000d6734fda5cfe66e9b688e79052d941","user":{"login":"RESTful-Drupal","id":10175793,"avatar_url":"https://avatars.githubusercontent.com/u/10175793?v=3","gravatar_id":"","url":"https://api.github.com/users/RESTful-Drupal","html_url":"https://github.com/RESTful-Drupal","followers_url":"https://api.github.com/users/RESTful-Drupal/followers","following_url":"https://api.github.com/users/RESTful-Drupal/following{/other_user}","gists_url":"https://api.github.com/users/RESTful-Drupal/gists{/gist_id}","starred_url":"https://api.github.com/users/RESTful-Drupal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RESTful-Drupal/subscriptions","organizations_url":"https://api.github.com/users/RESTful-Drupal/orgs","repos_url":"https://api.github.com/users/RESTful-Drupal/repos","events_url":"https://api.github.com/users/RESTful-Drupal/events{/privacy}","received_events_url":"https://api.github.com/users/RESTful-Drupal/received_events","type":"Organization","site_admin":false},"repo":{"id":17918315,"name":"restful","full_name":"RESTful-Drupal/restful","owner":{"login":"RESTful-Drupal","id":10175793,"avatar_url":"https://avatars.githubusercontent.com/u/10175793?v=3","gravatar_id":"","url":"https://api.github.com/users/RESTful-Drupal","html_url":"https://github.com/RESTful-Drupal","followers_url":"https://api.github.com/users/RESTful-Drupal/followers","following_url":"https://api.github.com/users/RESTful-Drupal/following{/other_user}","gists_url":"https://api.github.com/users/RESTful-Drupal/gists{/gist_id}","starred_url":"https://api.github.com/users/RESTful-Drupal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RESTful-Drupal/subscriptions","organizations_url":"https://api.github.com/users/RESTful-Drupal/orgs","repos_url":"https://api.github.com/users/RESTful-Drupal/repos","events_url":"https://api.github.com/users/RESTful-Drupal/events{/privacy}","received_events_url":"https://api.github.com/users/RESTful-Drupal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RESTful-Drupal/restful","description":"RESTful best practices for Drupal","fork":false,"url":"https://api.github.com/repos/RESTful-Drupal/restful","forks_url":"https://api.github.com/repos/RESTful-Drupal/restful/forks","keys_url":"https://api.github.com/repos/RESTful-Drupal/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RESTful-Drupal/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RESTful-Drupal/restful/teams","hooks_url":"https://api.github.com/repos/RESTful-Drupal/restful/hooks","issue_events_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/events{/number}","events_url":"https://api.github.com/repos/RESTful-Drupal/restful/events","assignees_url":"https://api.github.com/repos/RESTful-Drupal/restful/assignees{/user}","branches_url":"https://api.github.com/repos/RESTful-Drupal/restful/branches{/branch}","tags_url":"https://api.github.com/repos/RESTful-Drupal/restful/tags","blobs_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/RESTful-Drupal/restful/languages","stargazers_url":"https://api.github.com/repos/RESTful-Drupal/restful/stargazers","contributors_url":"https://api.github.com/repos/RESTful-Drupal/restful/contributors","subscribers_url":"https://api.github.com/repos/RESTful-Drupal/restful/subscribers","subscription_url":"https://api.github.com/repos/RESTful-Drupal/restful/subscription","commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/comments{/number}","contents_url":"https://api.github.com/repos/RESTful-Drupal/restful/contents/{+path}","compare_url":"https://api.github.com/repos/RESTful-Drupal/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RESTful-Drupal/restful/merges","archive_url":"https://api.github.com/repos/RESTful-Drupal/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RESTful-Drupal/restful/downloads","issues_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues{/number}","pulls_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/RESTful-Drupal/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/RESTful-Drupal/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RESTful-Drupal/restful/labels{/name}","releases_url":"https://api.github.com/repos/RESTful-Drupal/restful/releases{/id}","created_at":"2014-03-19T19:58:55Z","updated_at":"2015-03-21T10:41:30Z","pushed_at":"2015-03-21T10:41:30Z","git_url":"git://github.com/RESTful-Drupal/restful.git","ssh_url":"git@github.com:RESTful-Drupal/restful.git","clone_url":"https://github.com/RESTful-Drupal/restful.git","svn_url":"https://github.com/RESTful-Drupal/restful","homepage":"https://drupal.org/project/restful","size":7229,"stargazers_count":195,"watchers_count":195,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":54,"forks":47,"open_issues":54,"watchers":195,"default_branch":"7.x-1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439"},"html":{"href":"https://github.com/RESTful-Drupal/restful/pull/439"},"issue":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/issues/439"},"comments":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/issues/439/comments"},"review_comments":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439/comments"},"review_comment":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/439/commits"},"statuses":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/bfb919eceb77d694348c70716b5fd897e40ff3b5"}}}}