| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <sect1 id="zend.service.technorati">
- <title>Zend_Service_Technorati</title>
- <sect2 id="zend.service.technorati.introduction">
- <title>Introduction</title>
- <para>
- <classname>Zend_Service_Technorati</classname> provides an easy, intuitive and
- object-oriented interface for using the Technorati <acronym>API</acronym>. It provides
- access to all available <ulink url="http://technorati.com/developers/api/">Technorati
- <acronym>API</acronym> queries</ulink> and returns the original <acronym>XML</acronym>
- response as a friendly <acronym>PHP</acronym> object.
- </para>
- <para>
- <ulink url="http://technorati.com/">Technorati</ulink> is one of the most popular blog
- search engines. The <acronym>API</acronym> interface enables developers to retrieve
- information about a specific blog, search blogs matching a single tag or phrase and get
- information about a specific author (blogger). For a full list of available queries
- please see the <ulink url="http://technorati.com/developers/api/">Technorati
- <acronym>API</acronym> documentation</ulink> or the <link
- linkend="zend.service.technorati.queries">Available Technorati queries</link>
- section of this document.
- </para>
- </sect2>
- <sect2 id="zend.service.technorati.getting-started">
- <title>Getting Started</title>
- <para>
- Technorati requires a valid <acronym>API</acronym> key for usage. To get your own
- <acronym>API</acronym> Key you first need to <ulink
- url="http://technorati.com/signup/">create a new Technorati account</ulink>, then
- visit the <ulink url="http://technorati.com/developers/apikey.html">API Key
- section</ulink>.
- </para>
- <note>
- <title>API Key limits</title>
- <para>
- You can make up to 500 Technorati <acronym>API</acronym> calls per day, at no
- charge. Other usage limitations may apply, depending on the current Technorati
- <acronym>API</acronym> license.
- </para>
- </note>
- <para>
- Once you have a valid <acronym>API</acronym> key, you're ready to start using
- <classname>Zend_Service_Technorati</classname>.
- </para>
- </sect2>
- <sect2 id="zend.service.technorati.making-first-query">
- <title>Making Your First Query</title>
- <para>
- In order to run a query, first you need a <classname>Zend_Service_Technorati</classname>
- instance with a valid <acronym>API</acronym> key. Then choose one of the available query
- methods, and call it providing required arguments.
- </para>
- <example id="zend.service.technorati.making-first-query.example-1">
- <title>Sending your first query</title>
- <programlisting language="php"><![CDATA[
- // create a new Zend_Service_Technorati
- // with a valid API_KEY
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- // search Technorati for PHP keyword
- $resultSet = $technorati->search('PHP');
- ]]></programlisting>
- </example>
- <para>
- Each query method accepts an array of optional parameters that can be used to refine
- your query.
- </para>
- <example id="zend.service.technorati.making-first-query.example-2">
- <title>Refining your query</title>
- <programlisting language="php"><![CDATA[
- // create a new Zend_Service_Technorati
- // with a valid API_KEY
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- // filter your query including only results
- // with some authority (Results from blogs with a handful of links)
- $options = array('authority' => 'a4');
- // search Technorati for PHP keyword
- $resultSet = $technorati->search('PHP', $options);
- ]]></programlisting>
- </example>
- <para>
- A <classname>Zend_Service_Technorati</classname> instance is not a single-use object.
- That is, you don't need to create a new instance for each query call; simply use your
- current <classname>Zend_Service_Technorati</classname> object as long as you need it.
- </para>
- <example id="zend.service.technorati.making-first-query.example-3">
- <title>Sending multiple queries with the same Zend_Service_Technorati instance</title>
- <programlisting language="php"><![CDATA[
- // create a new Zend_Service_Technorati
- // with a valid API_KEY
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- // search Technorati for PHP keyword
- $search = $technorati->search('PHP');
- // get top tags indexed by Technorati
- $topTags = $technorati->topTags();
- ]]></programlisting>
- </example>
- </sect2>
- <sect2 id="zend.service.technorati.consuming-results">
- <title>Consuming Results</title>
- <para>
- You can get one of two types of result object in response to a query.
- </para>
- <para>
- The first group is represented by
- <classname>Zend_Service_Technorati_*ResultSet</classname> objects. A result set object
- is basically a collection of result objects. It extends the basic
- <classname>Zend_Service_Technorati_ResultSet</classname> class and implements the
- <code>SeekableIterator</code> <acronym>PHP</acronym> interface. The best way to consume
- a result set object is to loop over it with the <acronym>PHP</acronym>
- <code>foreach</code> statement.
- </para>
- <example id="zend.service.technorati.consuming-results.example-1">
- <title>Consuming a result set object</title>
- <programlisting language="php"><![CDATA[
- // create a new Zend_Service_Technorati
- // with a valid API_KEY
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- // search Technorati for PHP keyword
- // $resultSet is an instance of Zend_Service_Technorati_SearchResultSet
- $resultSet = $technorati->search('PHP');
- // loop over all result objects
- foreach ($resultSet as $result) {
- // $result is an instance of Zend_Service_Technorati_SearchResult
- }
- ]]></programlisting>
- </example>
- <para>
- Because <classname>Zend_Service_Technorati_ResultSet</classname> implements the
- <code>SeekableIterator</code> interface, you can seek a specific result object using its
- position in the result collection.
- </para>
- <example id="zend.service.technorati.consuming-results.example-2">
- <title>Seeking a specific result set object</title>
- <programlisting language="php"><![CDATA[
- // create a new Zend_Service_Technorati
- // with a valid API_KEY
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- // search Technorati for PHP keyword
- // $resultSet is an instance of Zend_Service_Technorati_SearchResultSet
- $resultSet = $technorati->search('PHP');
- // $result is an instance of Zend_Service_Technorati_SearchResult
- $resultSet->seek(1);
- $result = $resultSet->current();
- ]]></programlisting>
- </example>
- <note>
- <para>
- <code>SeekableIterator</code> works as an array and counts positions starting from
- index 0. Fetching position number 1 means getting the second result in the
- collection.
- </para>
- </note>
- <para>
- The second group is represented by special standalone result objects.
- <classname>Zend_Service_Technorati_GetInfoResult</classname>,
- <classname>Zend_Service_Technorati_BlogInfoResult</classname> and
- <classname>Zend_Service_Technorati_KeyInfoResult</classname> act as wrappers for
- additional objects, such as <classname>Zend_Service_Technorati_Author</classname> and
- <classname>Zend_Service_Technorati_Weblog</classname>.
- </para>
- <example id="zend.service.technorati.consuming-results.example-3">
- <title>Consuming a standalone result object</title>
- <programlisting language="php"><![CDATA[
- // create a new Zend_Service_Technorati
- // with a valid API_KEY
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- // get info about weppos author
- $result = $technorati->getInfo('weppos');
- $author = $result->getAuthor();
- echo '<h2>Blogs authored by ' . $author->getFirstName() . " " .
- $author->getLastName() . '</h2>';
- echo '<ol>';
- foreach ($result->getWeblogs() as $weblog) {
- echo '<li>' . $weblog->getName() . '</li>';
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- <para>
- Please read the <link linkend="zend.service.technorati.classes">Zend_Service_Technorati
- Classes</link> section for further details about response classes.
- </para>
- </sect2>
- <sect2 id="zend.service.technorati.handling-errors">
- <title>Handling Errors</title>
- <para>
- Each <classname>Zend_Service_Technorati</classname> query method throws a
- <classname>Zend_Service_Technorati_Exception</classname> exception on failure with a
- meaningful error message.
- </para>
- <para>
- There are several reasons that may cause a
- <classname>Zend_Service_Technorati</classname> query to fail.
- <classname>Zend_Service_Technorati</classname> validates all parameters for any query
- request. If a parameter is invalid or it contains an invalid value, a new
- <classname>Zend_Service_Technorati_Exception</classname> exception is thrown.
- Additionally, the Technorati <acronym>API</acronym> interface could be temporally
- unavailable, or it could return a response that is not well formed.
- </para>
- <para>
- You should always wrap a Technorati query with a <code>try</code>...<code>catch</code>
- block.
- </para>
- <example id="zend.service.technorati.handling-errors.example-1">
- <title>Handling a Query Exception</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- try {
- $resultSet = $technorati->search('PHP');
- } catch(Zend_Service_Technorati_Exception $e) {
- echo "An error occurred: " $e->getMessage();
- }
- ]]></programlisting>
- </example>
- </sect2>
- <sect2 id="zend.service.technorati.checking-api-daily-usage">
- <title>Checking Your API Key Daily Usage</title>
- <para>
- From time to time you probably will want to check your <acronym>API</acronym> key daily
- usage. By default Technorati limits your <acronym>API</acronym> usage to 500 calls per
- day, and an exception is returned by <classname>Zend_Service_Technorati</classname> if
- you try to use it beyond this limit. You can get information about your
- <acronym>API</acronym> key usage using the
- <methodname>Zend_Service_Technorati::keyInfo()</methodname> method.
- </para>
- <para>
- <methodname>Zend_Service_Technorati::keyInfo()</methodname> returns a
- <classname>Zend_Service_Technorati_KeyInfoResult</classname> object. For full details
- please see the <ulink url="http://framework.zend.com/apidoc/core/">API reference
- guide</ulink>.
- </para>
- <example id="zend.service.technorati.checking-api-daily-usage.example-1">
- <title>Getting API key daily usage information</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $key = $technorati->keyInfo();
- echo "API Key: " . $key->getApiKey() . "<br />";
- echo "Daily Usage: " . $key->getApiQueries() . "/" .
- $key->getMaxQueries() . "<br />";
- ]]></programlisting>
- </example>
- </sect2>
- <sect2 id="zend.service.technorati.queries">
- <title>Available Technorati Queries</title>
- <para>
- <classname>Zend_Service_Technorati</classname> provides support for the following queries:
- <itemizedlist>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.queries.cosmos"><code>Cosmos</code></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.queries.search"><code>Search</code></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="zend.service.technorati.queries.tag"><code>Tag</code></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.queries.dailycounts"><code>DailyCounts</code></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.queries.toptags"><code>TopTags</code></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.queries.bloginfo"><code>BlogInfo</code></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.queries.blogposttags"><code>BlogPostTags</code></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.queries.getinfo"><code>GetInfo</code></link>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <sect3 id="zend.service.technorati.queries.cosmos">
- <title>Technorati Cosmos</title>
- <para>
- <ulink url="http://technorati.com/developers/api/cosmos.html">Cosmos</ulink> query
- lets you see what blogs are linking to a given <acronym>URL</acronym>. It returns a
- <link
- linkend="zend.service.technorati.classes.cosmosresultset"><classname>Zend_Service_Technorati_CosmosResultSet</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::cosmos()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.cosmos.example-1">
- <title>Cosmos Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $resultSet = $technorati->cosmos('http://devzone.zend.com/');
- echo "<p>Reading " . $resultSet->totalResults() .
- " of " . $resultSet->totalResultsAvailable() .
- " available results</p>";
- echo "<ol>";
- foreach ($resultSet as $result) {
- echo "<li>" . $result->getWeblog()->getName() . "</li>";
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.search">
- <title>Technorati Search</title>
- <para>
- The <ulink url="http://technorati.com/developers/api/search.html">Search</ulink>
- query lets you see what blogs contain a given search string. It returns a <link
- linkend="zend.service.technorati.classes.searchresultset"><classname>Zend_Service_Technorati_SearchResultSet</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::search()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.search.example-1">
- <title>Search Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $resultSet = $technorati->search('zend framework');
- echo "<p>Reading " . $resultSet->totalResults() .
- " of " . $resultSet->totalResultsAvailable() .
- " available results</p>";
- echo "<ol>";
- foreach ($resultSet as $result) {
- echo "<li>" . $result->getWeblog()->getName() . "</li>";
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.tag">
- <title>Technorati Tag</title>
- <para>
- The <ulink url="http://technorati.com/developers/api/tag.html">Tag</ulink> query
- lets you see what posts are associated with a given tag. It returns a <link
- linkend="zend.service.technorati.classes.tagresultset"><classname>Zend_Service_Technorati_TagResultSet</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::tag()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.tag.example-1">
- <title>Tag Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $resultSet = $technorati->tag('php');
- echo "<p>Reading " . $resultSet->totalResults() .
- " of " . $resultSet->totalResultsAvailable() .
- " available results</p>";
- echo "<ol>";
- foreach ($resultSet as $result) {
- echo "<li>" . $result->getWeblog()->getName() . "</li>";
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.dailycounts">
- <title>Technorati DailyCounts</title>
- <para>
- The <ulink
- url="http://technorati.com/developers/api/dailycounts.html">DailyCounts</ulink>
- query provides daily counts of posts containing the queried keyword. It returns a
- <link
- linkend="zend.service.technorati.classes.dailycountsresultset"><classname>Zend_Service_Technorati_DailyCountsResultSet</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::dailyCounts()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.dailycounts.example-1">
- <title>DailyCounts Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $resultSet = $technorati->dailyCounts('php');
- foreach ($resultSet as $result) {
- echo "<li>" . $result->getDate() .
- "(" . $result->getCount() . ")</li>";
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.toptags">
- <title>Technorati TopTags</title>
- <para>
- The <ulink url="http://technorati.com/developers/api/toptags.html">TopTags</ulink>
- query provides information on top tags indexed by Technorati. It returns a <link
- linkend="zend.service.technorati.classes.tagsresultset"><classname>Zend_Service_Technorati_TagsResultSet</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::topTags()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.toptags.example-1">
- <title>TopTags Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $resultSet = $technorati->topTags();
- echo "<p>Reading " . $resultSet->totalResults() .
- " of " . $resultSet->totalResultsAvailable() .
- " available results</p>";
- echo "<ol>";
- foreach ($resultSet as $result) {
- echo "<li>" . $result->getTag() . "</li>";
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.bloginfo">
- <title>Technorati BlogInfo</title>
- <para>
- The <ulink url="http://technorati.com/developers/api/bloginfo.html">BlogInfo</ulink>
- query provides information on what blog, if any, is associated with a given
- <acronym>URL</acronym>. It returns a <link
- linkend="zend.service.technorati.classes.bloginforesult"><classname>Zend_Service_Technorati_BlogInfoResult</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::blogInfo()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.bloginfo.example-1">
- <title>BlogInfo Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $result = $technorati->blogInfo('http://devzone.zend.com/');
- echo '<h2><a href="' . (string) $result->getWeblog()->getUrl() . '">' .
- $result->getWeblog()->getName() . '</a></h2>';
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.blogposttags">
- <title>Technorati BlogPostTags</title>
- <para>
- The <ulink
- url="http://technorati.com/developers/api/blogposttags.html">BlogPostTags</ulink>
- query provides information on the top tags used by a specific blog. It returns a
- <link
- linkend="zend.service.technorati.classes.tagsresultset"><classname>Zend_Service_Technorati_TagsResultSet</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::blogPostTags()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.blogposttags.example-1">
- <title>BlogPostTags Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $resultSet = $technorati->blogPostTags('http://devzone.zend.com/');
- echo "<p>Reading " . $resultSet->totalResults() .
- " of " . $resultSet->totalResultsAvailable() .
- " available results</p>";
- echo "<ol>";
- foreach ($resultSet as $result) {
- echo "<li>" . $result->getTag() . "</li>";
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.getinfo">
- <title>Technorati GetInfo</title>
- <para>
- The <ulink url="http://technorati.com/developers/api/getinfo.html">GetInfo</ulink>
- query tells you things that Technorati knows about a member. It returns a <link
- linkend="zend.service.technorati.classes.getinforesult"><classname>Zend_Service_Technorati_GetInfoResult</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::getInfo()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <example id="zend.service.technorati.queries.getinfo.example-1">
- <title>GetInfo Query</title>
- <programlisting language="php"><![CDATA[
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $result = $technorati->getInfo('weppos');
- $author = $result->getAuthor();
- echo "<h2>Blogs authored by " . $author->getFirstName() . " " .
- $author->getLastName() . "</h2>";
- echo "<ol>";
- foreach ($result->getWeblogs() as $weblog) {
- echo "<li>" . $weblog->getName() . "</li>";
- }
- echo "</ol>";
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.queries.keyinfo">
- <title>Technorati KeyInfo</title>
- <para>
- The KeyInfo query provides information on daily usage of an <acronym>API</acronym>
- key. It returns a <link
- linkend="zend.service.technorati.classes.keyinforesult"><classname>Zend_Service_Technorati_KeyInfoResult</classname></link>
- object. For full details please see
- <methodname>Zend_Service_Technorati::keyInfo()</methodname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- </sect3>
- </sect2>
- <sect2 id="zend.service.technorati.classes">
- <title>Zend_Service_Technorati Classes</title>
- <para>
- The following classes are returned by the various Technorati queries. Each
- <classname>Zend_Service_Technorati_*ResultSet</classname> class holds a type-specific
- result set which can be easily iterated, with each result being contained in a type
- result object. All result set classes extend
- <classname>Zend_Service_Technorati_ResultSet</classname> class and implement the
- <code>SeekableIterator</code> interface, allowing for easy iteration and seeking to a
- specific result.
- <itemizedlist>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.resultset"><classname>Zend_Service_Technorati_ResultSet</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.cosmosresultset"><classname>Zend_Service_Technorati_CosmosResultSet</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.searchresultset"><classname>Zend_Service_Technorati_SearchResultSet</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.tagresultset"><classname>Zend_Service_Technorati_TagResultSet</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.dailycountsresultset"><classname>Zend_Service_Technorati_DailyCountsResultSet</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.tagsresultset"><classname>Zend_Service_Technorati_TagsResultSet</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.result"><classname>Zend_Service_Technorati_Result</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.cosmosresult"><classname>Zend_Service_Technorati_CosmosResult</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.searchresult"><classname>Zend_Service_Technorati_SearchResult</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.tagresult"><classname>Zend_Service_Technorati_TagResult</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.dailycountsresult"><classname>Zend_Service_Technorati_DailyCountsResult</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.tagsresult"><classname>Zend_Service_Technorati_TagsResult</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.getinforesult"><classname>Zend_Service_Technorati_GetInfoResult</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.bloginforesult"><classname>Zend_Service_Technorati_BlogInfoResult</classname></link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link
- linkend="zend.service.technorati.classes.keyinforesult"><classname>Zend_Service_Technorati_KeyInfoResult</classname></link>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_GetInfoResult</classname>,
- <classname>Zend_Service_Technorati_BlogInfoResult</classname> and
- <classname>Zend_Service_Technorati_KeyInfoResult</classname> represent exceptions to
- the above because they don't belong to a result set and they don't implement any
- interface. They represent a single response object and they act as a wrapper for
- additional <classname>Zend_Service_Technorati</classname> objects, such as
- <classname>Zend_Service_Technorati_Author</classname> and
- <classname>Zend_Service_Technorati_Weblog</classname>.
- </para>
- </note>
- <para>
- The <classname>Zend_Service_Technorati</classname> library includes additional
- convenient classes representing specific response objects.
- <classname>Zend_Service_Technorati_Author</classname> represents a single Technorati
- account, also known as a blog author or blogger.
- <classname>Zend_Service_Technorati_Weblog</classname> represents a single weblog object,
- along with all specific weblog properties such as feed <acronym>URL</acronym>s or blog
- name. For full details please see <classname>Zend_Service_Technorati</classname> in the
- <ulink url="http://framework.zend.com/apidoc/core/">API reference guide</ulink>.
- </para>
- <sect3 id="zend.service.technorati.classes.resultset">
- <title>Zend_Service_Technorati_ResultSet</title>
- <para>
- <classname>Zend_Service_Technorati_ResultSet</classname> is the most essential
- result set. The scope of this class is to be extended by a query-specific child
- result set class, and it should never be used to initialize a standalone object.
- Each of the specific result sets represents a collection of query-specific <link
- linkend="zend.service.technorati.classes.result"><classname>Zend_Service_Technorati_Result</classname></link>
- objects.
- </para>
- <para>
- <classname>Zend_Service_Technorati_ResultSet</classname> implements the
- <acronym>PHP</acronym> <code>SeekableIterator</code> interface, and you can iterate
- all result objects via the <acronym>PHP</acronym> <code>foreach</code> statement.
- </para>
- <example id="zend.service.technorati.classes.resultset.example-1">
- <title>Iterating result objects from a resultset collection</title>
- <programlisting language="php"><![CDATA[
- // run a simple query
- $technorati = new Zend_Service_Technorati('VALID_API_KEY');
- $resultSet = $technorati->search('php');
- // $resultSet is now an instance of
- // Zend_Service_Technorati_SearchResultSet
- // it extends Zend_Service_Technorati_ResultSet
- foreach ($resultSet as $result) {
- // do something with your
- // Zend_Service_Technorati_SearchResult object
- }
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.service.technorati.classes.cosmosresultset">
- <title>Zend_Service_Technorati_CosmosResultSet</title>
- <para>
- <classname>Zend_Service_Technorati_CosmosResultSet</classname> represents a
- Technorati Cosmos query result set.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_CosmosResultSet</classname> extends <link
- linkend="zend.service.technorati.classes.resultset">Zend_Service_Technorati_ResultSet</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.searchresultset">
- <title>Zend_Service_Technorati_SearchResultSet</title>
- <para>
- <classname>Zend_Service_Technorati_SearchResultSet</classname> represents a
- Technorati Search query result set.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_SearchResultSet</classname> extends <link
- linkend="zend.service.technorati.classes.resultset">Zend_Service_Technorati_ResultSet</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.tagresultset">
- <title>Zend_Service_Technorati_TagResultSet</title>
- <para>
- <classname>Zend_Service_Technorati_TagResultSet</classname> represents a Technorati
- Tag query result set.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_TagResultSet</classname> extends <link
- linkend="zend.service.technorati.classes.resultset">Zend_Service_Technorati_ResultSet</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.dailycountsresultset">
- <title>Zend_Service_Technorati_DailyCountsResultSet</title>
- <para>
- <classname>Zend_Service_Technorati_DailyCountsResultSet</classname> represents a
- Technorati DailyCounts query result set.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_DailyCountsResultSet</classname> extends
- <link
- linkend="zend.service.technorati.classes.resultset">Zend_Service_Technorati_ResultSet</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.tagsresultset">
- <title>Zend_Service_Technorati_TagsResultSet</title>
- <para>
- <classname>Zend_Service_Technorati_TagsResultSet</classname> represents a Technorati
- TopTags or BlogPostTags queries result set.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_TagsResultSet</classname> extends
- <link
- linkend="zend.service.technorati.classes.resultset">Zend_Service_Technorati_ResultSet</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.result">
- <title>Zend_Service_Technorati_Result</title>
- <para>
- <classname>Zend_Service_Technorati_Result</classname> is the most essential result
- object. The scope of this class is to be extended by a query specific child result
- class, and it should never be used to initialize a standalone object.
- </para>
- </sect3>
- <sect3 id="zend.service.technorati.classes.cosmosresult">
- <title>Zend_Service_Technorati_CosmosResult</title>
- <para>
- <classname>Zend_Service_Technorati_CosmosResult</classname> represents a single
- Technorati Cosmos query result object. It is never returned as a standalone object,
- but it always belongs to a valid <link
- linkend="zend.service.technorati.classes.cosmosresultset">Zend_Service_Technorati_CosmosResultSet</link>
- object.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_CosmosResult</classname> extends <link
- linkend="zend.service.technorati.classes.result">Zend_Service_Technorati_Result</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.searchresult">
- <title>Zend_Service_Technorati_SearchResult</title>
- <para>
- <classname>Zend_Service_Technorati_SearchResult</classname> represents a single
- Technorati Search query result object. It is never returned as a standalone object,
- but it always belongs to a valid <link
- linkend="zend.service.technorati.classes.searchresultset">Zend_Service_Technorati_SearchResultSet</link>
- object.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_SearchResult</classname> extends <link
- linkend="zend.service.technorati.classes.result">Zend_Service_Technorati_Result</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.tagresult">
- <title>Zend_Service_Technorati_TagResult</title>
- <para>
- <classname>Zend_Service_Technorati_TagResult</classname> represents a single
- Technorati Tag query result object. It is never returned as a standalone object, but
- it always belongs to a valid <link
- linkend="zend.service.technorati.classes.tagresultset">Zend_Service_Technorati_TagResultSet</link>
- object.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_TagResult</classname> extends <link
- linkend="zend.service.technorati.classes.result">Zend_Service_Technorati_Result</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.dailycountsresult">
- <title>Zend_Service_Technorati_DailyCountsResult</title>
- <para>
- <classname>Zend_Service_Technorati_DailyCountsResult</classname> represents a single
- Technorati DailyCounts query result object. It is never returned as a standalone
- object, but it always belongs to a valid <link
- linkend="zend.service.technorati.classes.dailycountsresultset">Zend_Service_Technorati_DailyCountsResultSet</link>
- object.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_DailyCountsResult</classname> extends <link
- linkend="zend.service.technorati.classes.result">Zend_Service_Technorati_Result</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.tagsresult">
- <title>Zend_Service_Technorati_TagsResult</title>
- <para>
- <classname>Zend_Service_Technorati_TagsResult</classname> represents a single
- Technorati TopTags or BlogPostTags query result object. It is never returned as a
- standalone object, but it always belongs to a valid <link
- linkend="zend.service.technorati.classes.tagsresultset">Zend_Service_Technorati_TagsResultSet </link>
- object.
- </para>
- <note>
- <para>
- <classname>Zend_Service_Technorati_TagsResult</classname> extends <link
- linkend="zend.service.technorati.classes.result">Zend_Service_Technorati_Result</link>.
- </para>
- </note>
- </sect3>
- <sect3 id="zend.service.technorati.classes.getinforesult">
- <title>Zend_Service_Technorati_GetInfoResult</title>
- <para>
- <classname>Zend_Service_Technorati_GetInfoResult</classname> represents a single
- Technorati GetInfo query result object.
- </para>
- </sect3>
- <sect3 id="zend.service.technorati.classes.bloginforesult">
- <title>Zend_Service_Technorati_BlogInfoResult</title>
- <para>
- <classname>Zend_Service_Technorati_BlogInfoResult</classname> represents a single
- Technorati BlogInfo query result object.
- </para>
- </sect3>
- <sect3 id="zend.service.technorati.classes.keyinforesult">
- <title>Zend_Service_Technorati_KeyInfoResult</title>
- <para>
- <classname>Zend_Service_Technorati_KeyInfoResult</classname> represents a single
- Technorati KeyInfo query result object. It provides information about your
- <link linkend="zend.service.technorati.checking-api-daily-usage">Technorati
- <acronym>API</acronym> Key daily usage</link>.
- </para>
- </sect3>
- </sect2>
- </sect1>
|