python-xbox 0.2.2__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-xbox
3
- Version: 0.2.2
3
+ Version: 0.3.0
4
4
  Summary: A library to authenticate with Xbox Network and use their API
5
5
  Project-URL: Source, https://github.com/tr4nt0r/python-xbox
6
6
  Author-email: Manfred Dennerlein Rodelo <tr4nt0r@uber.space>
@@ -1,4 +1,4 @@
1
- pythonxbox/__init__.py,sha256=nnle9s-38pDEtMYWhZyDCJzhMOGTPf1mPPzS00VqBhQ,91
1
+ pythonxbox/__init__.py,sha256=FXnxtSc-yQP4XNZu2en_Xs5bu1_PrO-ubx4BDUNI39s,91
2
2
  pythonxbox/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  pythonxbox/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pythonxbox/api/client.py,sha256=3OqKJDAk-5Jm3zISwRqnyzJeZPrvzzUeXvvkYyPe7h4,5776
@@ -33,7 +33,7 @@ pythonxbox/api/provider/screenshots/__init__.py,sha256=zRmPy4GmpFeoITPPaaIFJlz8i
33
33
  pythonxbox/api/provider/screenshots/models.py,sha256=fLmliYx8yzGAiQlsnujCldHKDKjvUGYxEwUz_CUxWow,1176
34
34
  pythonxbox/api/provider/smartglass/__init__.py,sha256=MlkTPZk4Fz_uNOqoUeogaSFyCyGKFG97hnEKXdRSpE0,11632
35
35
  pythonxbox/api/provider/smartglass/models.py,sha256=KXPwF5cKjQ_RmBhzVrfplIQp-iBFbBgnxXp2Sy4gE5A,4261
36
- pythonxbox/api/provider/titlehub/__init__.py,sha256=728Kp8GBJUX6o2bxQpFY8dJAkQNbJRzlwTjPxcCQJXo,4651
36
+ pythonxbox/api/provider/titlehub/__init__.py,sha256=QArYTyPT2lA3lnN9N-PGjHO9kZgseeIwRdIrsXUOaxI,5348
37
37
  pythonxbox/api/provider/titlehub/models.py,sha256=i3YOuRtuDJ26qzJmGzev3OE7ekbKSyXa7em-aeFO028,2557
38
38
  pythonxbox/api/provider/usersearch/__init__.py,sha256=G9q299C9XwF1ajmXbaUrnNF-_HrCjt1-h2XCn1CfaMw,967
39
39
  pythonxbox/api/provider/usersearch/models.py,sha256=C2l8nJJpaHOwXLiUMpnndbhs_MQYiMQdEkWk0JxPbuc,307
@@ -57,8 +57,8 @@ pythonxbox/scripts/change_gamertag.py,sha256=k4tAqc4rDT10a-ethejg9ufs_c-fVJeYK7P
57
57
  pythonxbox/scripts/friends.py,sha256=TmcpLJ3FJaNMCNc5gVyxabgnlFd2hS_tBYautx1xD6s,2139
58
58
  pythonxbox/scripts/search.py,sha256=DusjFE4q10sHVrbdE44kBw0xvv6i_muJqZLCcnO6zzc,1074
59
59
  pythonxbox/scripts/xal.py,sha256=rRM5Opl5GlHykaf4Ad755XzUbdG24tFMVnRCuY6Z1kk,2928
60
- python_xbox-0.2.2.dist-info/METADATA,sha256=5jf_L7HRxVAjDRQPnACUigReZ3fWwvplZiabU03jLnU,7701
61
- python_xbox-0.2.2.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
62
- python_xbox-0.2.2.dist-info/entry_points.txt,sha256=9k_ot4_yHrDQTbXDWZPCHtn7S_rJLLv5Sw1Vf__TY78,267
63
- python_xbox-0.2.2.dist-info/licenses/LICENSE,sha256=NylgC1sD9vQJ92ofyOI0lvDYOuvbTyWa-tCSU8KgeeI,1104
64
- python_xbox-0.2.2.dist-info/RECORD,,
60
+ python_xbox-0.3.0.dist-info/METADATA,sha256=BXXqPBOeG6Cti54SOqx8EsAIG1_bx_aP95RFivR8ZuE,7701
61
+ python_xbox-0.3.0.dist-info/WHEEL,sha256=THafob7ofN-NsuMN7Mg4qZyHaQI7KkD-QlcQatYhXPo,87
62
+ python_xbox-0.3.0.dist-info/entry_points.txt,sha256=9k_ot4_yHrDQTbXDWZPCHtn7S_rJLLv5Sw1Vf__TY78,267
63
+ python_xbox-0.3.0.dist-info/licenses/LICENSE,sha256=NylgC1sD9vQJ92ofyOI0lvDYOuvbTyWa-tCSU8KgeeI,1104
64
+ python_xbox-0.3.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.0
2
+ Generator: hatchling 1.32.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
pythonxbox/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Top-level package for python-xbox."""
2
2
 
3
3
  __author__ = """tr4nt0r"""
4
- __version__ = "0.2.2"
4
+ __version__ = "0.3.0"
@@ -66,7 +66,11 @@ class TitlehubProvider(BaseProvider):
66
66
  return TitleHubResponse.model_validate_json(resp.text)
67
67
 
68
68
  async def _get_title_info(
69
- self, moniker: str, fields: list[TitleFields] | None = None, **kwargs
69
+ self,
70
+ xuid: str,
71
+ moniker: str,
72
+ fields: list[TitleFields] | None = None,
73
+ **kwargs,
70
74
  ) -> TitleHubResponse:
71
75
  if not fields:
72
76
  fields = [
@@ -78,7 +82,7 @@ class TitlehubProvider(BaseProvider):
78
82
  ]
79
83
  fields = self.SEPARATOR.join(fields)
80
84
 
81
- url = f"{self.TITLEHUB_URL}/users/xuid({self.client.xuid})/titles/{moniker}/decoration/{fields}"
85
+ url = f"{self.TITLEHUB_URL}/users/xuid({xuid})/titles/{moniker}/decoration/{fields}"
82
86
  resp = await self.client.session.get(url, headers=self._headers, **kwargs)
83
87
  resp.raise_for_status()
84
88
  return TitleHubResponse.model_validate_json(resp.text)
@@ -96,7 +100,31 @@ class TitlehubProvider(BaseProvider):
96
100
  Returns:
97
101
  :class:`TitleHubResponse`: Title Hub Response
98
102
  """
99
- return await self._get_title_info(f"titleid({title_id})", fields, **kwargs)
103
+ return await self._get_title_info(
104
+ self.client.xuid, f"titleid({title_id})", fields, **kwargs
105
+ )
106
+
107
+ async def get_title_info_by_xuid(
108
+ self,
109
+ xuid: str,
110
+ title_id: str,
111
+ fields: list[TitleFields] | None = None,
112
+ **kwargs,
113
+ ) -> TitleHubResponse:
114
+ """
115
+ Get info for specific title by XUID
116
+
117
+ Args:
118
+ xuid: XUID of user to get title info for
119
+ title_id: Title Id
120
+ fields: List of title fields
121
+
122
+ Returns:
123
+ :class:`TitleHubResponse`: Title Hub Response
124
+ """
125
+ return await self._get_title_info(
126
+ xuid, f"titleid({title_id})", fields, **kwargs
127
+ )
100
128
 
101
129
  async def get_title_info_by_pfn(
102
130
  self, pfn: str, fields: list[TitleFields] | None = None, **kwargs
@@ -111,7 +139,9 @@ class TitlehubProvider(BaseProvider):
111
139
  Returns:
112
140
  :class:`TitleHubResponse`: Title Hub Response
113
141
  """
114
- return await self._get_title_info(f"pfn({pfn})", fields, **kwargs)
142
+ return await self._get_title_info(
143
+ self.client.xuid, f"pfn({pfn})", fields, **kwargs
144
+ )
115
145
 
116
146
  async def get_titles_batch(
117
147
  self, pfns: list[str], fields: list[TitleFields] | None = None, **kwargs