session.py 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. # mautrix-instagram - A Matrix-Instagram puppeting bridge.
  2. # Copyright (C) 2020 Tulir Asokan
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU Affero General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU Affero General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU Affero General Public License
  15. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. from typing import Optional, Union
  17. from mautrix.types import SerializableAttrs, dataclass, field
  18. @dataclass
  19. class AndroidSession(SerializableAttrs['AndroidSession']):
  20. eu_dc_enabled: Optional[bool] = field(default=None, json="euDCEnabled")
  21. thumbnail_cache_busting_value: int = field(default=1000, json="thumbnailCacheBustingValue")
  22. ads_opt_out: bool = field(default=None, json="adsOptOut")
  23. ig_www_claim: Optional[str] = field(default=None, json="igWWWClaim")
  24. authorization: Optional[str] = None
  25. password_encryption_pubkey: Optional[str] = field(default=None, json="passwordEncryptionPubKey")
  26. password_encryption_key_id: Union[None, str, int] = field(default=None, json="passwordEncryptionKeyId")
  27. region_hint: Optional[str] = field(default=None, json="regionHint")