Services_Technorati
[ class tree: Services_Technorati ] [ index: Services_Technorati ] [ all elements ]

Class: Services_Technorati

Source Location: /Services_Technorati-0.7.1beta/Services/Technorati.php

Class Overview


Client for Technorati's REST-based webservices


Author(s):

Version:

  • Release: 0.7.1beta

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 49]
Client for Technorati's REST-based webservices

Technorati is a blog search engine with a number of tools to help explore and utilise the blogosphere. The API provides enhanced access to all the site's features, performing API calls and returning SimpleXML objects of results.



[ Top ]


Class Variables

$apiKey =  null

[line 72]

API Key
  • Access: protected

Type:   string


[ Top ]

$apiUrl =  'http://api.technorati.com'

[line 57]

URI of the REST API
  • Access: protected

Type:   string


[ Top ]

$userAgent =  'Services_Technorati v2'

[line 64]

User agent to send with requests
  • Access: public

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 81]

Services_Technorati __construct( string $apiKey, [object cache $cache = null])

Create our client
  • Access: public

Parameters:

string   $apiKey   —  apiKey
object cache   $cache   — 

[ Top ]

attention   [line 302]

array attention( string $user, string $password)

This lets users retrieve their Attention.XML This API query is currently experimental.
  • Access: public

Parameters:

string   $user   —  username
string   $password   —  password

[ Top ]

attentionPost   [line 320]

boolean attentionPost( string $user, string $password, string $file)

This posts a new Attention.XML file to the Technorati system.

This API query is currently experimental. This is the one call that doesn't use sendRequest, because it needs to POST a file.

  • Access: public

Parameters:

string   $user   —  username
string   $password   —  password
string   $file   —  filename

[ Top ]

blogInfo   [line 286]

array blogInfo( string $url)

The bloginfo query provides info on what blog, if any, is associated with a given URL
  • Access: public

Parameters:

string   $url   —  url

[ Top ]

blogPostTags   [line 173]

array blogPostTags( string $url, [array $options = array()])

The BlogPostTags query returns the top tags for a given blog URL.
  • Access: public

Parameters:

string   $url   —  the url to query for
array   $options   —  options

[ Top ]

checkOptions   [line 424]

void checkOptions( array $current, array $accepted)

Filter options for those acceptable for this query. Raise warnings if others have been passed.
  • Access: protected

Parameters:

array   $current   —  specified options
array   $accepted   —  acceptable options

[ Top ]

cosmos   [line 187]

array cosmos( string $url, [array $options = null])

Cosmos lets you see what blogs are linking to a given URL
  • Access: public

Parameters:

string   $url   —  url
array   $options   —  options

[ Top ]

factory   [line 100]

Services_Technorati factory( string $apiKey, [object cache $cache = null], [float $apiVersion = 1.0])

Factory methods to create client. This is in place to prepare for forwards compatibility with future versions of the API.
  • Return: object
  • Access: public

Parameters:

string   $apiKey   —  apiKey
object cache   $cache   — 
float   $apiVersion   —  apiVersion

[ Top ]

general   [line 129]

array general( string $query, array $chief_param, array $valid_options, [array $options = null])

This method handles the majority of the work for most of our queries.
  • Access: protected

Parameters:

string   $query   —  the query type we're performing
array   $chief_param   —  an array for our main query parameter (key and value)
array   $valid_options   —  the valid options for this query
array   $options   —  the user's chosen options

[ Top ]

getInfo   [line 271]

array getInfo( string $username)

The getinfo query tells you things that Technorati knows about a user
  • Access: public

Parameters:

string   $username   —  username

[ Top ]

keyInfo   [line 115]

array keyInfo( )

KeyInfo provides information on daily usage of an API key.

A Technorati API key is typically limited to 500 requests per day, where a day is measured as 00:00-23:59 PST This function does not cache, and this call does not use any of the daily request allocation for the given key.

  • Access: public

[ Top ]

outbound   [line 220]

array outbound( string $url, [array $options = null])

The outbound query let you see what blogs are linked to from a given blog, including their associated info. It has been deprecated.
  • Deprecated:
  • Access: public

Parameters:

string   $url   —  url
array   $options   —  options

[ Top ]

processResponse   [line 392]

array|PEAR_Error processResponse( HTTP_Request $request)

This function takes the request sent by either attentionPost or sendRequest and processes it, returning an unserialized version
  • Access: protected

Parameters:

HTTP_Request   $request   —  the request object

[ Top ]

search   [line 203]

array search( string $query, [array $options = null])

The search lets you see what blogs contain a given search string
  • Access: public

Parameters:

string   $query   —  query
array   $options   —  options

[ Top ]

sendRequest   [line 364]

SimpleXML|PEAR_ERROR sendRequest( string $query, [array $options = null])

Send everything out
  • Access: protected

Parameters:

string   $query   —  type of query
array   $options   —  parameters

[ Top ]

tag   [line 239]

array tag( string $tag, [array $options = null])

The tag query allows you to get a list of posts with the given tag associated with it. This API query is currently experimental.
  • Access: public

Parameters:

string   $tag   —  url
array   $options   —  options

[ Top ]

topTags   [line 257]

array topTags( [array $options = null])

TopTags lets you retrieve a list of the most popular post tags tracked by Technorati
  • Access: public

Parameters:

array   $options   —  options

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:58:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.