Skip to content

Commit 1eb87ae

Browse files
chore: update SDK to v0.10.6
1 parent ee70b0a commit 1eb87ae

74 files changed

Lines changed: 20293 additions & 20287 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
project = "X API SDK"
2222
copyright = "2024, X Developer Platform"
2323
author = "X Developer Platform"
24-
release = "0.10.5"
25-
version = "0.10.5"
24+
release = "0.10.6"
25+
version = "0.10.6"
2626

2727
# -- General configuration ----------------------------------------------------
2828

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build-backend = "hatchling.build"
1414

1515
[project]
1616
name = "xdk"
17-
version = "0.10.5"
17+
version = "0.10.6"
1818
description = "Python SDK for the X API"
1919
authors = [
2020
{name = "X Developer Platform", email = "devs@x.com"},

tests/account_activity/test_contracts.py

Lines changed: 206 additions & 206 deletions
Large diffs are not rendered by default.

tests/account_activity/test_structure.py

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,31 @@ def setup_class(self):
4343
self.account_activity_client = getattr(self.client, "account_activity")
4444

4545

46-
def test_validate_subscription_exists(self):
47-
"""Test that validate_subscription method exists with correct signature."""
46+
def test_get_subscription_count_exists(self):
47+
"""Test that get_subscription_count method exists with correct signature."""
4848
# Check method exists
49-
method = getattr(AccountActivityClient, "validate_subscription", None)
49+
method = getattr(AccountActivityClient, "get_subscription_count", None)
5050
assert (
5151
method is not None
52-
), f"Method validate_subscription does not exist on AccountActivityClient"
52+
), f"Method get_subscription_count does not exist on AccountActivityClient"
5353
# Check method is callable
54-
assert callable(method), f"validate_subscription is not callable"
54+
assert callable(method), f"get_subscription_count is not callable"
5555
# Check method signature
5656
sig = inspect.signature(method)
5757
params = list(sig.parameters.keys())
5858
# Should have 'self' as first parameter
5959
assert (
6060
len(params) >= 1
61-
), f"validate_subscription should have at least 'self' parameter"
61+
), f"get_subscription_count should have at least 'self' parameter"
6262
assert (
6363
params[0] == "self"
6464
), f"First parameter should be 'self', got '{params[0]}'"
6565
# Check required parameters exist (excluding 'self')
66-
required_params = [
67-
"webhook_id",
68-
]
66+
required_params = []
6967
for required_param in required_params:
7068
assert (
7169
required_param in params
72-
), f"Required parameter '{required_param}' missing from validate_subscription"
70+
), f"Required parameter '{required_param}' missing from get_subscription_count"
7371
# Check optional parameters have defaults (excluding 'self')
7472
optional_params = []
7573
for optional_param in optional_params:
@@ -80,32 +78,32 @@ def test_validate_subscription_exists(self):
8078
), f"Optional parameter '{optional_param}' should have a default value"
8179

8280

83-
def test_validate_subscription_return_annotation(self):
84-
"""Test that validate_subscription has proper return type annotation."""
85-
method = getattr(AccountActivityClient, "validate_subscription")
81+
def test_get_subscription_count_return_annotation(self):
82+
"""Test that get_subscription_count has proper return type annotation."""
83+
method = getattr(AccountActivityClient, "get_subscription_count")
8684
sig = inspect.signature(method)
8785
# Check return annotation exists
8886
assert (
8987
sig.return_annotation is not inspect.Signature.empty
90-
), f"Method validate_subscription should have return type annotation"
88+
), f"Method get_subscription_count should have return type annotation"
9189

9290

93-
def test_create_subscription_exists(self):
94-
"""Test that create_subscription method exists with correct signature."""
91+
def test_get_subscriptions_exists(self):
92+
"""Test that get_subscriptions method exists with correct signature."""
9593
# Check method exists
96-
method = getattr(AccountActivityClient, "create_subscription", None)
94+
method = getattr(AccountActivityClient, "get_subscriptions", None)
9795
assert (
9896
method is not None
99-
), f"Method create_subscription does not exist on AccountActivityClient"
97+
), f"Method get_subscriptions does not exist on AccountActivityClient"
10098
# Check method is callable
101-
assert callable(method), f"create_subscription is not callable"
99+
assert callable(method), f"get_subscriptions is not callable"
102100
# Check method signature
103101
sig = inspect.signature(method)
104102
params = list(sig.parameters.keys())
105103
# Should have 'self' as first parameter
106104
assert (
107105
len(params) >= 1
108-
), f"create_subscription should have at least 'self' parameter"
106+
), f"get_subscriptions should have at least 'self' parameter"
109107
assert (
110108
params[0] == "self"
111109
), f"First parameter should be 'self', got '{params[0]}'"
@@ -116,7 +114,7 @@ def test_create_subscription_exists(self):
116114
for required_param in required_params:
117115
assert (
118116
required_param in params
119-
), f"Required parameter '{required_param}' missing from create_subscription"
117+
), f"Required parameter '{required_param}' missing from get_subscriptions"
120118
# Check optional parameters have defaults (excluding 'self')
121119
optional_params = []
122120
for optional_param in optional_params:
@@ -127,43 +125,44 @@ def test_create_subscription_exists(self):
127125
), f"Optional parameter '{optional_param}' should have a default value"
128126

129127

130-
def test_create_subscription_return_annotation(self):
131-
"""Test that create_subscription has proper return type annotation."""
132-
method = getattr(AccountActivityClient, "create_subscription")
128+
def test_get_subscriptions_return_annotation(self):
129+
"""Test that get_subscriptions has proper return type annotation."""
130+
method = getattr(AccountActivityClient, "get_subscriptions")
133131
sig = inspect.signature(method)
134132
# Check return annotation exists
135133
assert (
136134
sig.return_annotation is not inspect.Signature.empty
137-
), f"Method create_subscription should have return type annotation"
135+
), f"Method get_subscriptions should have return type annotation"
138136

139137

140-
def test_get_subscriptions_exists(self):
141-
"""Test that get_subscriptions method exists with correct signature."""
138+
def test_delete_subscription_exists(self):
139+
"""Test that delete_subscription method exists with correct signature."""
142140
# Check method exists
143-
method = getattr(AccountActivityClient, "get_subscriptions", None)
141+
method = getattr(AccountActivityClient, "delete_subscription", None)
144142
assert (
145143
method is not None
146-
), f"Method get_subscriptions does not exist on AccountActivityClient"
144+
), f"Method delete_subscription does not exist on AccountActivityClient"
147145
# Check method is callable
148-
assert callable(method), f"get_subscriptions is not callable"
146+
assert callable(method), f"delete_subscription is not callable"
149147
# Check method signature
150148
sig = inspect.signature(method)
151149
params = list(sig.parameters.keys())
152150
# Should have 'self' as first parameter
153151
assert (
154152
len(params) >= 1
155-
), f"get_subscriptions should have at least 'self' parameter"
153+
), f"delete_subscription should have at least 'self' parameter"
156154
assert (
157155
params[0] == "self"
158156
), f"First parameter should be 'self', got '{params[0]}'"
159157
# Check required parameters exist (excluding 'self')
160158
required_params = [
161159
"webhook_id",
160+
"user_id",
162161
]
163162
for required_param in required_params:
164163
assert (
165164
required_param in params
166-
), f"Required parameter '{required_param}' missing from get_subscriptions"
165+
), f"Required parameter '{required_param}' missing from delete_subscription"
167166
# Check optional parameters have defaults (excluding 'self')
168167
optional_params = []
169168
for optional_param in optional_params:
@@ -174,44 +173,43 @@ def test_get_subscriptions_exists(self):
174173
), f"Optional parameter '{optional_param}' should have a default value"
175174

176175

177-
def test_get_subscriptions_return_annotation(self):
178-
"""Test that get_subscriptions has proper return type annotation."""
179-
method = getattr(AccountActivityClient, "get_subscriptions")
176+
def test_delete_subscription_return_annotation(self):
177+
"""Test that delete_subscription has proper return type annotation."""
178+
method = getattr(AccountActivityClient, "delete_subscription")
180179
sig = inspect.signature(method)
181180
# Check return annotation exists
182181
assert (
183182
sig.return_annotation is not inspect.Signature.empty
184-
), f"Method get_subscriptions should have return type annotation"
183+
), f"Method delete_subscription should have return type annotation"
185184

186185

187-
def test_delete_subscription_exists(self):
188-
"""Test that delete_subscription method exists with correct signature."""
186+
def test_validate_subscription_exists(self):
187+
"""Test that validate_subscription method exists with correct signature."""
189188
# Check method exists
190-
method = getattr(AccountActivityClient, "delete_subscription", None)
189+
method = getattr(AccountActivityClient, "validate_subscription", None)
191190
assert (
192191
method is not None
193-
), f"Method delete_subscription does not exist on AccountActivityClient"
192+
), f"Method validate_subscription does not exist on AccountActivityClient"
194193
# Check method is callable
195-
assert callable(method), f"delete_subscription is not callable"
194+
assert callable(method), f"validate_subscription is not callable"
196195
# Check method signature
197196
sig = inspect.signature(method)
198197
params = list(sig.parameters.keys())
199198
# Should have 'self' as first parameter
200199
assert (
201200
len(params) >= 1
202-
), f"delete_subscription should have at least 'self' parameter"
201+
), f"validate_subscription should have at least 'self' parameter"
203202
assert (
204203
params[0] == "self"
205204
), f"First parameter should be 'self', got '{params[0]}'"
206205
# Check required parameters exist (excluding 'self')
207206
required_params = [
208207
"webhook_id",
209-
"user_id",
210208
]
211209
for required_param in required_params:
212210
assert (
213211
required_param in params
214-
), f"Required parameter '{required_param}' missing from delete_subscription"
212+
), f"Required parameter '{required_param}' missing from validate_subscription"
215213
# Check optional parameters have defaults (excluding 'self')
216214
optional_params = []
217215
for optional_param in optional_params:
@@ -222,41 +220,43 @@ def test_delete_subscription_exists(self):
222220
), f"Optional parameter '{optional_param}' should have a default value"
223221

224222

225-
def test_delete_subscription_return_annotation(self):
226-
"""Test that delete_subscription has proper return type annotation."""
227-
method = getattr(AccountActivityClient, "delete_subscription")
223+
def test_validate_subscription_return_annotation(self):
224+
"""Test that validate_subscription has proper return type annotation."""
225+
method = getattr(AccountActivityClient, "validate_subscription")
228226
sig = inspect.signature(method)
229227
# Check return annotation exists
230228
assert (
231229
sig.return_annotation is not inspect.Signature.empty
232-
), f"Method delete_subscription should have return type annotation"
230+
), f"Method validate_subscription should have return type annotation"
233231

234232

235-
def test_get_subscription_count_exists(self):
236-
"""Test that get_subscription_count method exists with correct signature."""
233+
def test_create_subscription_exists(self):
234+
"""Test that create_subscription method exists with correct signature."""
237235
# Check method exists
238-
method = getattr(AccountActivityClient, "get_subscription_count", None)
236+
method = getattr(AccountActivityClient, "create_subscription", None)
239237
assert (
240238
method is not None
241-
), f"Method get_subscription_count does not exist on AccountActivityClient"
239+
), f"Method create_subscription does not exist on AccountActivityClient"
242240
# Check method is callable
243-
assert callable(method), f"get_subscription_count is not callable"
241+
assert callable(method), f"create_subscription is not callable"
244242
# Check method signature
245243
sig = inspect.signature(method)
246244
params = list(sig.parameters.keys())
247245
# Should have 'self' as first parameter
248246
assert (
249247
len(params) >= 1
250-
), f"get_subscription_count should have at least 'self' parameter"
248+
), f"create_subscription should have at least 'self' parameter"
251249
assert (
252250
params[0] == "self"
253251
), f"First parameter should be 'self', got '{params[0]}'"
254252
# Check required parameters exist (excluding 'self')
255-
required_params = []
253+
required_params = [
254+
"webhook_id",
255+
]
256256
for required_param in required_params:
257257
assert (
258258
required_param in params
259-
), f"Required parameter '{required_param}' missing from get_subscription_count"
259+
), f"Required parameter '{required_param}' missing from create_subscription"
260260
# Check optional parameters have defaults (excluding 'self')
261261
optional_params = []
262262
for optional_param in optional_params:
@@ -267,24 +267,24 @@ def test_get_subscription_count_exists(self):
267267
), f"Optional parameter '{optional_param}' should have a default value"
268268

269269

270-
def test_get_subscription_count_return_annotation(self):
271-
"""Test that get_subscription_count has proper return type annotation."""
272-
method = getattr(AccountActivityClient, "get_subscription_count")
270+
def test_create_subscription_return_annotation(self):
271+
"""Test that create_subscription has proper return type annotation."""
272+
method = getattr(AccountActivityClient, "create_subscription")
273273
sig = inspect.signature(method)
274274
# Check return annotation exists
275275
assert (
276276
sig.return_annotation is not inspect.Signature.empty
277-
), f"Method get_subscription_count should have return type annotation"
277+
), f"Method create_subscription should have return type annotation"
278278

279279

280280
def test_all_expected_methods_exist(self):
281281
"""Test that all expected methods exist on the client."""
282282
expected_methods = [
283-
"validate_subscription",
284-
"create_subscription",
283+
"get_subscription_count",
285284
"get_subscriptions",
286285
"delete_subscription",
287-
"get_subscription_count",
286+
"validate_subscription",
287+
"create_subscription",
288288
]
289289
for expected_method in expected_methods:
290290
assert hasattr(

0 commit comments

Comments
 (0)