/** * @test */ public function shouldCreateValidQuery() { $query = new ChangesQuery(); $now = new \DateTime(); $tomorrow = new \DateTime('tomorrow'); $query->from($now)->to($tomorrow)->page(1); $this->assertEquals($now->format('Y-m-d'), $query->get('start_date')); $this->assertEquals($tomorrow->format('Y-m-d'), $query->get('end_date')); $this->assertEquals(1, $query->get('page')); }
/** * Get a list of people ids that have been edited. * * By default we show the last 24 hours and only 100 items per page. * The maximum number of days that can be returned in a single request is 14. * * You can then use the person changes API to get the actual data that has been changed. * Please note that the change log system to support this was changed on October 5, 2012 * and will only show people that have been edited since. * * @param ChangesQuery $query * @param array $headers * @return People */ public function getPeopleChanges(ChangesQuery $query, array $headers = array()) { $data = $this->getApi()->getPersonChanges($query->toArray(), $headers); return $this->getFactory()->createResultCollection($data); }