{"action":"created","issue":{"url":"https://api.github.com/repos/Garethp/php-ews/issues/64","repository_url":"https://api.github.com/repos/Garethp/php-ews","labels_url":"https://api.github.com/repos/Garethp/php-ews/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/Garethp/php-ews/issues/64/comments","events_url":"https://api.github.com/repos/Garethp/php-ews/issues/64/events","html_url":"https://github.com/Garethp/php-ews/issues/64","id":179232454,"number":64,"title":"reading calendar","user":{"login":"erickengelke","id":17241944,"avatar_url":"https://avatars.githubusercontent.com/u/17241944?v=3","gravatar_id":"","url":"https://api.github.com/users/erickengelke","html_url":"https://github.com/erickengelke","followers_url":"https://api.github.com/users/erickengelke/followers","following_url":"https://api.github.com/users/erickengelke/following{/other_user}","gists_url":"https://api.github.com/users/erickengelke/gists{/gist_id}","starred_url":"https://api.github.com/users/erickengelke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickengelke/subscriptions","organizations_url":"https://api.github.com/users/erickengelke/orgs","repos_url":"https://api.github.com/users/erickengelke/repos","events_url":"https://api.github.com/users/erickengelke/events{/privacy}","received_events_url":"https://api.github.com/users/erickengelke/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-26T13:44:43Z","updated_at":"2016-10-28T20:46:33Z","closed_at":"2016-10-12T11:27:34Z","body":"I have two issues:\r\n\r\nI need to read calendar items of other people, eg userid: joe.  They have granted me full access.  I'm stuck on how to do that with garethp.  I had it working with jamesiarmes, but am trying to move forward.\r\n\r\nAlso, all the examples return a structure filled with private data I'm not allowed to read.  How do I enumerate through the list of events, and extract the date/time/topic of meetings?\r\n\r\nSo I'm hopefully asking for a simple example.\r\n\r\nThanks\r\nErick\r\n"},"comment":{"url":"https://api.github.com/repos/Garethp/php-ews/issues/comments/257024114","html_url":"https://github.com/Garethp/php-ews/issues/64#issuecomment-257024114","issue_url":"https://api.github.com/repos/Garethp/php-ews/issues/64","id":257024114,"user":{"login":"beekerstudios","id":838145,"avatar_url":"https://avatars.githubusercontent.com/u/838145?v=3","gravatar_id":"","url":"https://api.github.com/users/beekerstudios","html_url":"https://github.com/beekerstudios","followers_url":"https://api.github.com/users/beekerstudios/followers","following_url":"https://api.github.com/users/beekerstudios/following{/other_user}","gists_url":"https://api.github.com/users/beekerstudios/gists{/gist_id}","starred_url":"https://api.github.com/users/beekerstudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beekerstudios/subscriptions","organizations_url":"https://api.github.com/users/beekerstudios/orgs","repos_url":"https://api.github.com/users/beekerstudios/repos","events_url":"https://api.github.com/users/beekerstudios/events{/privacy}","received_events_url":"https://api.github.com/users/beekerstudios/received_events","type":"User","site_admin":false},"created_at":"2016-10-28T20:46:33Z","updated_at":"2016-10-28T20:46:33Z","body":"Forgive me if this is hijacking this issue, but it's not clear how the example code given would result in retrieving a calendar for which the logged in user had delegate permissions to. I too was trying to repurpose some working JamesIArmes php-ews code/usage to no avail.\r\n\r\nWhich function do I call with this request?\r\n`$token = \"forcing token for testing\";\r\n\r\n$api = API::withCallbackToken('outlook.office365.com', $token);\r\n\r\n$calendar = $api->getCalendar();\r\n\r\n$items = $calendar->getCalendarItems(new DateTime('1:00 AM'), new DateTime('11:59 PM'), array (\r\n    'ParentFolderIds' => array (\r\n        'DistinguishedFolderId' => array (\r\n            'Id' => 'calendar',\r\n            'Mailbox' => array (\r\n                'EmailAddress' => 'otheruser@somecompany.com'\r\n            )\r\n        )\r\n    )\r\n));\r\n`\r\n\r\nThe below starts to fall apart when leveraging this code in this capacity but the simple item->getSubhect() call does work on the logged in users calendar, so it's not all wrong, just not for this particular use case\r\n\r\n`foreach ($items as $item) {\r\n    echo $item->getSubject(); // this returns an error: Uncaught exception 'Exception' with message 'Property Subject does not exist' in ../vendor/garethp/php-ews/src/API/MagicMethodsTrait.php:118\r\n    \r\n    print_r($item->getItems()->getCalendarItem()); //this returns the object\r\n\r\n    echo $item->getItems()->getCalendarItem()->getSubject(); //Returns: Call to a member function getSubject() on a non-object\r\n}`\r\n"}}
{"actor":{"display_login":"beekerstudios"}}