Module buzz :: Class Client
[hide private]
[frames] | no frames]

Class Client

source code

The Buzz API Client object is the primary method of making calls against the Buzz API. It can be used with or without authentication. It attempts to reuse HTTP connections whenever possible. Currently, authentication is done via OAuth.

Instance Methods [hide private]
 
__init__(self) source code
 
use_anonymous_oauth_consumer(self, oauth_display_name=None)
This method sets the consumer key and secret to 'anonymous'.
source code
 
build_oauth_consumer(self, key, secret)
This method sets the consumer key and secret.
source code
 
build_oauth_request_token(self, key, secret)
This method sets the request token key and secret.
source code
 
build_oauth_access_token(self, key, secret) source code
 
fetch_oauth_response(self, oauth_request)
Sends a signed request to Google's Accounts API.
source code
 
fetch_oauth_request_token(self, callback_uri)
Obtains an OAuth request token from Google's Accounts API.
source code
 
build_oauth_authorization_url(self, token=None) source code
 
fetch_oauth_access_token(self, verifier=None, token=None)
Obtains an OAuth access token from Google's Accounts API.
source code
 
build_oauth_request(self, http_method, http_uri) source code
 
fetch_api_response(self, http_method, http_uri, http_headers={}, http_connection=None, http_body='') source code
 
people_search(self, query=None) source code
 
people_search_by_topic(self, query=None, latitude=None, longitude=None, radius=None) source code
 
person(self, user_id='@me') source code
 
followers(self, user_id='@me') source code
 
following(self, user_id='@me') source code
 
follow(self, user_id) source code
 
unfollow(self, user_id) source code
 
search(self, query=None, latitude=None, longitude=None, radius=None) source code
 
posts(self, type_id='@self', user_id='@me', max_results=20) source code
 
post(self, post_id, actor_id='0') source code
 
create_post(self, post) source code
 
update_post(self, post) source code
 
delete_post(self, post) source code
 
comments(self, post_id, actor_id='0', max_results=20) source code
 
create_comment(self, comment) source code
 
update_comment(self, comment) source code
 
delete_comment(self, comment) source code
 
commented_posts(self, user_id='@me')
Returns a collection of posts that the user has commented on.
source code
 
related_links(self, post_id, actor_id='0', max_results=20) source code
 
likers(self, post_id, actor_id='0', max_results=20) source code
 
liked_posts(self, user_id='@me')
Returns a collection of posts that a user has liked.
source code
 
like_post(self, post_id)
Likes a post.
source code
 
unlike_post(self, post_id)
Unlikes a post.
source code
 
mute_post(self, post_id)
Mutes a post.
source code
 
unmute_post(self, post_id)
Unmutes a post.
source code
 
share_count(self, uri)
Returns information about the number of times a URI has been shared.
source code
 
oauth_token_info(self)
Returns information about the client's current access token.
source code
Properties [hide private]
  http_connection
  oauth_http_connection
Method Details [hide private]

use_anonymous_oauth_consumer(self, oauth_display_name=None)

source code 

This method sets the consumer key and secret to 'anonymous'. It can also optionally set the xoauth_displayname parameter. This method is primarily intended for use with installed applications.

Parameters:
  • oauth_display_name (string) - The display name for the application

build_oauth_consumer(self, key, secret)

source code 

This method sets the consumer key and secret. If you do not already have them, these can be obtained by registering your web application.

Parameters:
  • key (string) - Your consumer key. This will be your hostname.
  • secret (string) - Your consumer secret. This is issued to you by Google.

build_oauth_request_token(self, key, secret)

source code 

This method sets the request token key and secret. This allows you to load a request token into the client from persistent storage.

Parameters:
  • key (string) - The request token key.
  • secret (string) - The request token secret.

oauth_token_info(self)

source code 

Returns information about the client's current access token.

Allows a developer to verify that their token is valid.


Property Details [hide private]

http_connection

Get Method:
unreachable.http_connection(self)

oauth_http_connection

Get Method:
unreachable.oauth_http_connection(self)