Package flickrapi :: Module tokencache :: Class TokenCache
[hide private]
[frames] | no frames]

Class TokenCache

source code

object --+
         |
        TokenCache
Known Subclasses:

On-disk persistent token cache for a single application.

The application is identified by the API key used. Per application multiple users are supported, with a single token per user.

Instance Methods [hide private]
 
__init__(self, api_key, username=None)
Creates a new token cache instance
source code
 
get_cached_token_path(self)
Return the directory holding the app data.
source code
 
get_cached_token_filename(self)
Return the full pathname of the cached token file.
source code
 
get_cached_token(self)
Read and return a cached token, or None if not found.
source code
 
set_cached_token(self, token)
Cache a token for later use.
source code
 
forget(self)
Removes the cached token
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  token
The cached token

Inherited from object: __class__

Method Details [hide private]

__init__(self, api_key, username=None)
(Constructor)

source code 
Creates a new token cache instance
Overrides: object.__init__

get_cached_token(self)

source code 

Read and return a cached token, or None if not found.

The token is read from the cached token file.


Property Details [hide private]

token

The cached token
Get Method:
get_cached_token(self) - Read and return a cached token, or None if not found.
Set Method:
set_cached_token(self, token) - Cache a token for later use.
Delete Method:
forget(self) - Removes the cached token