當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Service_Delicious::getUserPosts方法代碼示例

本文整理匯總了PHP中Zend_Service_Delicious::getUserPosts方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Service_Delicious::getUserPosts方法的具體用法?PHP Zend_Service_Delicious::getUserPosts怎麽用?PHP Zend_Service_Delicious::getUserPosts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Service_Delicious的用法示例。


在下文中一共展示了Zend_Service_Delicious::getUserPosts方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testGetUserPosts

 /**
  * @return void
  */
 public function testGetUserPosts()
 {
     $posts = $this->_delicious->getUserPosts(self::TEST_UNAME, 10);
     $this->assertType('Zend_Service_Delicious_PostList', $posts);
     // check if all objects in returned Zend_Service_Delicious_PostList
     // are instances of Zend_Service_Delicious_SimplePost
     foreach ($posts as $post) {
         $this->assertType('Zend_Service_Delicious_SimplePost', $post);
     }
     // test filtering of Zend_Service_Delicious_PostList by tag name
     $filterPostList = $posts->withTag('zfSite');
     foreach ($filterPostList as $post) {
         $this->assertType('array', $post->getTags());
         $this->assertContains('zfSite', $post->getTags());
     }
 }
開發者ID:travisj,項目名稱:zf,代碼行數:19,代碼來源:PublicDataTest.php

示例2: get_user_posts_by_tag

 /**
  * For an individual tag
  *
  * @param string $user 
  * @param string $count 
  * @param string $tag 
  * @return void
  * @author Dan Chadwick
  */
 private function get_user_posts_by_tag($user, $count, $tag)
 {
     $links = array();
     $delicious = new Zend_Service_Delicious();
     try {
         $posts = $delicious->getUserPosts($user, $count, $tag);
         foreach ($posts as $post) {
             $links[] = array('title' => $post->getTitle(), 'url' => $post->getUrl());
         }
         return $links;
     } catch (Exception $e) {
         Kohana::log('debug', 'Delicious err.' . $e->getMessage());
     }
 }
開發者ID:AsteriaGamer,項目名稱:steamdriven-kohana,代碼行數:23,代碼來源:delicious.php


注:本文中的Zend_Service_Delicious::getUserPosts方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。