Exemplo n.º 1
0
 /**
  * _getFeeds Get unread google reader items
  *
  * @return void
  */
 private function _getFeeds()
 {
     $googleReader = new GoogleReaderAPI(Yii::app()->params['credentials']['googleReader']['username'], Yii::app()->params['credentials']['googleReader']['password']);
     //get first 10 unread items from google reader
     $unreadItems = $googleReader->get_unread(10);
     //CVarDumper::dump($unreadItems, 10, true);die;
     return $unreadItems->items;
 }
Exemplo n.º 2
0
 public function run($id)
 {
     $googleReader = new GoogleReaderAPI(Yii::app()->params['credentials']['googleReader']['username'], Yii::app()->params['credentials']['googleReader']['password']);
     $googleReader->set_state($id, 'read');
     echo json_encode(array('status' => 200));
 }
Exemplo n.º 3
0
 public function actionDebug()
 {
     $googleReader = new GoogleReaderAPI(Yii::app()->params['credentials']['googleReader']['username'], Yii::app()->params['credentials']['googleReader']['password']);
     $unreadItems = $googleReader->get_unread(10);
     CVarDumper::dump($unreadItems, 10, true);
 }