dropbox.seen_state – Seen State¶

class dropbox.seen_state.PlatformType(tag, value=None)

Bases: dropbox.stone_base.Union

Possible platforms on which a user may view content.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables: seen_state.PlatformType.web – The content was viewed on the web. seen_state.PlatformType.mobile – The content was viewed on a mobile client. seen_state.PlatformType.desktop – The content was viewed on a desktop client. seen_state.PlatformType.unknown – The content was viewed on an unknown platform.
desktop = PlatformType('desktop', None)
is_desktop()

Check if the union tag is desktop.

Return type: bool
is_mobile()

Check if the union tag is mobile.

Return type: bool
is_other()

Check if the union tag is other.

Return type: bool
is_unknown()

Check if the union tag is unknown.

Return type: bool
is_web()

Check if the union tag is web.

Return type: bool
mobile = PlatformType('mobile', None)
other = PlatformType('other', None)
unknown = PlatformType('unknown', None)
web = PlatformType('web', None)