CommunitiesClient

class wwt_api_client.communities.CommunitiesClient(parent_client, oauth_client_secret=None, interactive_login_if_needed=False, state_dir=None)[source]

Bases: object

A client for WWT Communities API requests.

Instantiating such a client will make at least one web request, to refresh the Microsoft Live OAuth login token.

In addition, an interactive user login may be necessary. This must be explicitly allowed by the caller to prevent random programs from hanging waiting for user input. If interactive login is successful, the authentication data from such a login are saved in the current user’s state directory (~/.local/state/wwt_api_client/ on Linux machines) for subsequent use.

Methods

create_community(self[, payload])

Create a new community owned by the current user.

delete_community(self[, id])

Delete a community.

get_community_info(self[, id])

Get information about the specified community.

get_latest_community(self)

Get information about the most recently created WWT Communities.

get_my_profile(self)

Get the logged-in user’s profile information.

get_profile_entities(self[, entity_type, …])

Get “entities” associated with the logged-in user’s profile.

is_user_registered(self)

Query whether the logged-in Microsoft Live user is registered with the WWT Communities system.

Methods Summary

is_user_registered(self)

Query whether the logged-in Microsoft Live user is registered with the WWT Communities system.

Methods Documentation

is_user_registered(self)[source]

Query whether the logged-in Microsoft Live user is registered with the WWT Communities system.

Returns
requestan initialized IsUserRegisteredRequest object

The request.

Examples

There are no arguments:

>>> req = comm_client.is_user_registered()
>>> print(req.send())
True