Reference Manual

Data Points

When you access the python dictionary with respect to each attribute of the object, it is parsing the information reflected in this document.

http://www.loginradius.com/datapoints

Warning

These data points are subject to change and vary with providers.

For example

print login.user.profile['NickName']

May work for some providers like Mixi, but will not work for Facebook. Instead, you would get a key value error.

REST API

You can take advantage of the raw API if you wish and learn how it works.

http://api.loginradius.com/help/

LoginRadius Object

class LoginRadius.Exceptions

Common exceptions used by LoginRadius.

exception APIKeyInvalid

Raised if you entered your API wrong, or not at all.

exception Exceptions.APISecretInvalid

Raised if you your API Secret is invalid.

exception Exceptions.EndPointNotSupported

Raised if a the endpoint is not supported by the provider which correlates to the token.

exception Exceptions.FeatureNotSupported

Raised if the request cannot be completed because your account/API access does not include this.

exception Exceptions.InvalidAccessToken

Raised if you access token is invalid.

exception Exceptions.InvalidLibrary(library)

Raised on trying to change library to through _settings on invalid library argument.

exception Exceptions.InvalidRequestToken

Raised if you your request token is invalid from the POST request.

exception Exceptions.MissingJsonResponseParameter(missing_parameter, raw=None)

Raised if construction of namedtuple would fail because missing expected response from LoginRadius API.

exception Exceptions.NoAPISecret(version)

Raised on construction of the LoginRadius object, if no API_SECRET has been set for the class.

exception Exceptions.ParameterMissing

Raised if a parameter in the GET or POST request is missing.

exception Exceptions.ParameterNotFormatted

Raised if a parameter in the GET or POST request is not formatted properly for the provider.

exception Exceptions.RequestTokenExpired

Raised if you your request token has expired from the POST request.

exception Exceptions.RequestsLibraryDated(version)

Raise exception if module requests is outdated. By default 0.12 is included in Python. We need at least version 2.0

exception Exceptions.TokenExpired(time)

Raised if the request cannot be completed because the access token has expired.

exception Exceptions.UnknownJsonError(result)

Raised if cannot determine error number from Json

class LoginRadius.LazyLoad(lr_object, raw=False)

“lazy load” the details when needed. This methodology is inspired by SQLAlchemy.

flush()

Clears the local data stored so that the next request doesn’t default to the local cache and instead grabs it from the LoginRadius servers.

get()

This will get the JSON API and return it as a dictionary.

load()

Promptly load the data instead of loading it on first access.

set_raw(state)

Change the state of the raw parameter to determine what data set is grabbed from the provider.

class LoginRadius.LoginRadius(token)

LoginRadius Class. Use this to obtain social data and other information from the LoginRadius API. Requires Python 2.7 or greater.

class LoginRadius.LoginRadiusAPI(lr_object)

Where all the API commands can be invoked locally.

direct_message(to, subject, message)

Direct message another user on behalf of this user.

get_activity()

Get activity from profile.

get_activity_raw()

Get activity from profile but in raw format based on provider.

get_album()

Get albums from profile.

get_album_raw()

Get albums from profile but in raw format based on provider.

get_audio()

Get audio from the profile.

get_audio_raw()

Get audio from the profile but in raw format based on provider.

get_checkin()

Get check ins from profile.

get_checkin_raw()

Get check ins but in raw format based on provider.

get_company()

Get company from profile.

get_company_raw()

Get company from profile but in raw format based on provider.

get_contacts(next_cursor='')

Get a list of contacts from the profile.

get_contacts_raw(next_cursor='')

Get a list of contacts from the profile but in raw format based on provider.

get_event()

Get events from profile.

get_event_raw()

Get events from profile but in raw format based on provider.

get_following()

Get following/followers from profile.

get_following_raw()

Get following/followers from profile but in raw format based on provider.

get_group()

Get group data from profile.

get_group_raw()

Get group data from profile but in raw format based on provider.

get_like()

Get likes from profile.

get_like_raw()

Get likes from profile but in raw format based on provider.

get_mention()

Get mentions from profile.

get_mention_raw()

Get mentions from profile but in raw format based on provider.

get_page(page_name)

Get page information from profile.

get_page_raw(page_name)

Get page information from profile but in raw format based on provider.

get_photo(album_id='')

Get photos based on the album_id retrieved.

get_photo_raw(album_id='')

Get photos based on the album_id retrieved but unformatted based on the provider.

get_post()

Get posts from profile.

get_post_raw()

Get posts from profile but in raw format based on provider.

get_status()

Get status updates from profile.

get_status_raw()

Get status updates from profile but in raw format based on provider.

get_user_profile()

Retrieve basic profile information.

get_user_profile_raw()

Retrieve basic profile information but unformatted based on the provider.

get_video()

Get videos from the profile.

get_video_raw()

Get videos from the profile but in raw format based on provider.

status_update(status, title='', url='', imageurl='', caption='', description='')

Perform a status update on the profile on behalf of the user. Some of these arguments may be ignored depending on the provider. For what is and is not supported, please refer to: http://www.loginradius.com/datapoints

exception LoginRadius.LoginRadiusExceptions

This is the base for all LoginRadius Exceptions. Makes dealing with exceptions easy!