marqetive-lib 0.1.12__py3-none-any.whl → 0.1.13__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.
@@ -207,14 +207,6 @@ class TwitterClient(SocialMediaPlatform):
207
207
  platform=self.platform_name,
208
208
  )
209
209
 
210
- # Validate tweet length (280 characters)
211
- if request.content and len(request.content) > 280:
212
- raise ValidationError(
213
- f"Tweet exceeds 280 characters ({len(request.content)} characters)",
214
- platform=self.platform_name,
215
- field="content",
216
- )
217
-
218
210
  try:
219
211
  media_ids = []
220
212
 
@@ -234,11 +226,17 @@ class TwitterClient(SocialMediaPlatform):
234
226
  if media_ids:
235
227
  tweet_params["media_ids"] = media_ids
236
228
 
237
- response = self._tweepy_client.create_tweet(**tweet_params)
229
+ response = self._tweepy_client.create_tweet(**tweet_params, user_auth=False)
238
230
  tweet_id = response.data["id"] # type: ignore[index]
239
231
 
240
- # Fetch full tweet details
241
- return await self.get_post(tweet_id)
232
+ # Return minimal Post object without fetching details
233
+ return Post(
234
+ post_id=tweet_id,
235
+ platform=self.platform_name,
236
+ content=request.content or "",
237
+ status=PostStatus.PUBLISHED,
238
+ created_at=datetime.now(),
239
+ )
242
240
 
243
241
  except tweepy.TweepyException as e:
244
242
  if "429" in str(e):
@@ -278,6 +276,7 @@ class TwitterClient(SocialMediaPlatform):
278
276
  ],
279
277
  expansions=["attachments.media_keys"],
280
278
  media_fields=["url", "type", "width", "height"],
279
+ user_auth=False,
281
280
  )
282
281
 
283
282
  if not response.data: # type: ignore[attr-defined]
@@ -339,7 +338,7 @@ class TwitterClient(SocialMediaPlatform):
339
338
  raise RuntimeError("Client must be used as async context manager")
340
339
 
341
340
  try:
342
- self._tweepy_client.delete_tweet(post_id)
341
+ self._tweepy_client.delete_tweet(post_id, user_auth=False)
343
342
  return True
344
343
 
345
344
  except tweepy.errors.NotFound as e: # type: ignore[attr-defined]
@@ -432,18 +431,22 @@ class TwitterClient(SocialMediaPlatform):
432
431
  response = self._tweepy_client.create_tweet(
433
432
  text=content,
434
433
  in_reply_to_tweet_id=post_id,
434
+ user_auth=False,
435
435
  )
436
436
 
437
437
  reply_id = response.data["id"] # type: ignore[index]
438
438
 
439
- # Fetch full reply details
440
- reply_response = self._tweepy_client.get_tweet(
441
- reply_id,
442
- tweet_fields=["created_at", "author_id", "public_metrics"],
439
+ # Return minimal Comment object without fetching details
440
+ return Comment(
441
+ comment_id=reply_id,
442
+ post_id=post_id,
443
+ platform=self.platform_name,
444
+ content=content,
445
+ author_id="",
446
+ created_at=datetime.now(),
447
+ status=CommentStatus.VISIBLE,
443
448
  )
444
449
 
445
- return self._parse_reply(reply_response.data, post_id) # type: ignore[attr-defined]
446
-
447
450
  except tweepy.TweepyException as e:
448
451
  raise PlatformError(
449
452
  f"Failed to create reply: {e}",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: marqetive-lib
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: Modern Python utilities for web APIs
5
5
  Keywords: api,utilities,web,http,marqetive
6
6
  Requires-Python: >=3.12
@@ -22,7 +22,7 @@ marqetive/platforms/tiktok/exceptions.py,sha256=vxwyAKujMGZJh0LetG1QsLF95QfUs_kR
22
22
  marqetive/platforms/tiktok/media.py,sha256=aa47EDRA7woKGqKZkl_5XWu7kcRp2nT93Ol2skEQJpY,28592
23
23
  marqetive/platforms/tiktok/models.py,sha256=WWdjuFqhTIR8SnHkz-8UaNc5Mm2PrGomwQ3W7pJcQFg,2962
24
24
  marqetive/platforms/twitter/__init__.py,sha256=dvcgVT-v-JOtjSz-OUvxGrn_43OI6w_ep42Wx_nHTSM,217
25
- marqetive/platforms/twitter/client.py,sha256=08jV2hQVmGOpnG3C05u7bCqL7KapWn7bSsG0wbN_t5M,23270
25
+ marqetive/platforms/twitter/client.py,sha256=ATjNOLV3LLVAPo7An_O1G0Sd0NX4t2hljn_EF7foUaY,23345
26
26
  marqetive/platforms/twitter/exceptions.py,sha256=eZ-dJKOXH_-bAMg29zWKbEqMFud29piEJ5IWfC9wFts,8926
27
27
  marqetive/platforms/twitter/media.py,sha256=KpPxnLCas8NhnsEvaXSJZ7To4wW4FY0YqQvUkJIIr7g,28010
28
28
  marqetive/platforms/twitter/models.py,sha256=yPQlx40SlNmz7YGasXUqdx7rEDEgrQ64aYovlPKo6oc,2126
@@ -34,6 +34,6 @@ marqetive/utils/media.py,sha256=O1rISYdaP3CuuPxso7kqvxWXNfe2jjioNkaBc4cpwkY,1466
34
34
  marqetive/utils/oauth.py,sha256=1SkYCE6dcyPvcDqbjRFSSBcKTwLJy8u3jAANPdftVmo,13108
35
35
  marqetive/utils/retry.py,sha256=lAniJLMNWp9XsHrvU0XBNifpNEjfde4MGfd5hlFTPfA,7636
36
36
  marqetive/utils/token_validator.py,sha256=dNvDeHs2Du5UyMMH2ZOW6ydR7OwOEKA4c9e-rG0f9-0,6698
37
- marqetive_lib-0.1.12.dist-info/METADATA,sha256=UfSKVNuQnGu17NTqgGUKv8ttCClMOCQMen3shK_GgxY,7876
38
- marqetive_lib-0.1.12.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
39
- marqetive_lib-0.1.12.dist-info/RECORD,,
37
+ marqetive_lib-0.1.13.dist-info/METADATA,sha256=1yExpmKMETEBworXCnaoIVuU9UaDH9nJFbEy8DgMqeI,7876
38
+ marqetive_lib-0.1.13.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
39
+ marqetive_lib-0.1.13.dist-info/RECORD,,