dropbox.seen_state
– Seen State
- class dropbox.seen_state.PlatformType(tag, value=None)
Bases:
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 correspondingget_*
method.- Variables:
seen_state.PlatformType.web – The content was viewed on the web.
seen_state.PlatformType.desktop – The content was viewed on a desktop client.
seen_state.PlatformType.mobile_ios – The content was viewed on a mobile iOS client.
seen_state.PlatformType.mobile_android – The content was viewed on a mobile android client.
seen_state.PlatformType.api – The content was viewed from an API client.
seen_state.PlatformType.unknown – The content was viewed on an unknown platform.
seen_state.PlatformType.mobile – The content was viewed on a mobile client. DEPRECATED: Use mobile_ios or mobile_android instead.
- api = PlatformType('api', None)
- desktop = PlatformType('desktop', None)
- is_api()
Check if the union tag is
api
.- Return type:
bool
- 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_mobile_android()
Check if the union tag is
mobile_android
.- Return type:
bool
- is_mobile_ios()
Check if the union tag is
mobile_ios
.- 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)
- mobile_android = PlatformType('mobile_android', None)
- mobile_ios = PlatformType('mobile_ios', None)
- other = PlatformType('other', None)
- unknown = PlatformType('unknown', None)
- web = PlatformType('web', None)