xbox.webapi.api.provider.presence.models module

class xbox.webapi.api.provider.presence.models.PresenceLevel(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

USER = 'user'
DEVICE = 'device'
TITLE = 'title'
ALL = 'all'
static _generate_next_value_(name, start, count, last_values)[source]

Generate the next value when not given.

name: the name of the member start: the initial start value or None count: the number of existing members last_values: the list of values assigned

class xbox.webapi.api.provider.presence.models.PresenceState(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

ACTIVE = 'Active'
CLOAKED = 'Cloaked'
static _generate_next_value_(name, start, count, last_values)[source]

Generate the next value when not given.

name: the name of the member start: the initial start value or None count: the number of existing members last_values: the list of values assigned

class xbox.webapi.api.provider.presence.models.LastSeen(*, deviceType, titleId=None, titleName, timestamp)[source]

Bases: CamelCaseModel

Parameters:
  • deviceType (str) –

  • titleId (str | None) –

  • titleName (str) –

  • timestamp (str) –

device_type: str
title_id: str | None
title_name: str
timestamp: str
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'device_type': FieldInfo(annotation=str, required=True, alias='deviceType'), 'timestamp': FieldInfo(annotation=str, required=True, alias='timestamp'), 'title_id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='titleId'), 'title_name': FieldInfo(annotation=str, required=True, alias='titleName')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class xbox.webapi.api.provider.presence.models.ActivityRecord(*, richPresence=None, media=None)[source]

Bases: CamelCaseModel

Parameters:
  • richPresence (str | None) –

  • media (str | None) –

richPresence: str | None
media: str | None
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'media': FieldInfo(annotation=Union[str, NoneType], required=False, alias='media'), 'richPresence': FieldInfo(annotation=Union[str, NoneType], required=False, alias='richPresence')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class xbox.webapi.api.provider.presence.models.TitleRecord(*, id=None, name=None, activity=None, lastModified=None, placement=None, state=None)[source]

Bases: CamelCaseModel

Parameters:
  • id (str | None) –

  • name (str | None) –

  • activity (List[ActivityRecord] | None) –

  • lastModified (str | None) –

  • placement (str | None) –

  • state (str | None) –

id: str | None
name: str | None
activity: List[ActivityRecord] | None
lastModified: str | None
placement: str | None
state: str | None
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'activity': FieldInfo(annotation=Union[List[ActivityRecord], NoneType], required=False, alias='activity'), 'id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='id'), 'lastModified': FieldInfo(annotation=Union[str, NoneType], required=False, alias='lastModified'), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, alias='name'), 'placement': FieldInfo(annotation=Union[str, NoneType], required=False, alias='placement'), 'state': FieldInfo(annotation=Union[str, NoneType], required=False, alias='state')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class xbox.webapi.api.provider.presence.models.DeviceRecord(*, titles=None, type=None)[source]

Bases: CamelCaseModel

Parameters:
titles: List[TitleRecord] | None
type: str | None
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'titles': FieldInfo(annotation=Union[List[TitleRecord], NoneType], required=False, alias='titles'), 'type': FieldInfo(annotation=Union[str, NoneType], required=False, alias='type')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class xbox.webapi.api.provider.presence.models.PresenceItem(*, xuid, state, lastSeen=None, devices=None)[source]

Bases: CamelCaseModel

Parameters:
xuid: str
state: str
last_seen: LastSeen | None
devices: List[DeviceRecord] | None
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'devices': FieldInfo(annotation=Union[List[DeviceRecord], NoneType], required=False, alias='devices'), 'last_seen': FieldInfo(annotation=Union[LastSeen, NoneType], required=False, alias='lastSeen'), 'state': FieldInfo(annotation=str, required=True, alias='state'), 'xuid': FieldInfo(annotation=str, required=True, alias='xuid')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class xbox.webapi.api.provider.presence.models.PresenceBatchResponse(root=PydanticUndefined)[source]

Bases: RootModel[List[PresenceItem]], CamelCaseModel

Parameters:

root (List[PresenceItem]) –

root: List[PresenceItem]
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'root': FieldInfo(annotation=List[PresenceItem], required=True, alias='root')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.