rocketapi 1.0.9__tar.gz → 1.0.11__tar.gz

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,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rocketapi
3
- Version: 1.0.9
3
+ Version: 1.0.11
4
4
  Summary: RocketAPI Python SDK
5
5
  Home-page: https://github.com/rocketapi-io/rocketapi-python
6
- Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.9.tar.gz
6
+ Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.11.tar.gz
7
7
  Author: RocketAPI
8
8
  Author-email: developer@rocketapi.io
@@ -57,16 +57,30 @@ class InstagramAPI(RocketAPI):
57
57
  """
58
58
  return self.request("instagram/search", {"query": query})
59
59
 
60
+ def get_web_profile_info(self, username):
61
+ """
62
+ Retrieve user web profile information by username.
63
+
64
+ Args:
65
+ username (str): Username
66
+
67
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_web_profile_info
68
+ """
69
+ return self.request(
70
+ "instagram/user/get_web_profile_info", {"username": username}
71
+ )
72
+
60
73
  def get_user_info(self, username):
61
74
  """
62
75
  Retrieve user information by username.
76
+ This is an alias for get_web_profile_info.
63
77
 
64
78
  Args:
65
79
  username (str): Username
66
80
 
67
81
  For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_info
68
82
  """
69
- return self.request("instagram/user/get_info", {"username": username})
83
+ return self.get_web_profile_info(username)
70
84
 
71
85
  def get_user_info_by_id(self, user_id):
72
86
  """
@@ -97,6 +111,24 @@ class InstagramAPI(RocketAPI):
97
111
  payload["max_id"] = max_id
98
112
  return self.request("instagram/user/get_media", payload)
99
113
 
114
+ def get_user_media_by_username(self, username, count=12, max_id=None):
115
+ """
116
+ Retrieve user media by username.
117
+
118
+ Args:
119
+ username (str): Username
120
+ count (int): Number of media to retrieve (max: 12)
121
+ max_id (str): Use for pagination
122
+
123
+ You can use the `max_id` parameter to paginate through the media (take from the `next_max_id` field of the response).
124
+
125
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_media_by_username
126
+ """
127
+ payload = {"username": username, "count": count}
128
+ if max_id is not None:
129
+ payload["max_id"] = max_id
130
+ return self.request("instagram/user/get_media_by_username", payload)
131
+
100
132
  def get_user_clips(self, user_id, count=12, max_id=None):
101
133
  """
102
134
  Retrieve user clips (videos from "Reels" section) by id.
@@ -294,24 +326,39 @@ class InstagramAPI(RocketAPI):
294
326
  "instagram/media/get_info_by_shortcode", {"shortcode": shortcode}
295
327
  )
296
328
 
297
- def get_media_likes(self, shortcode, count=12, max_id=None):
329
+ def get_media_likes_by_shortcode(self, shortcode):
298
330
  """
299
331
  Retrieve up to 1000 media likes by media shortcode.
300
332
 
301
333
  Args:
302
334
  shortcode (str): Media shortcode
303
- count (int): Not supported right now
304
- max_id (str): Not supported right now
305
335
 
306
336
  Pagination is not supported for this endpoint.
307
337
 
308
338
  For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/get_likes
309
339
  """
310
- payload = {"shortcode": shortcode, "count": count}
311
- if max_id is not None:
312
- payload["max_id"] = max_id
340
+ payload = {"shortcode": shortcode}
313
341
  return self.request("instagram/media/get_likes", payload)
314
342
 
343
+ def get_media_likes(self, shortcode, count=12, max_id=None):
344
+ """
345
+ Retrieve up to 1000 media likes by media shortcode.
346
+ This is an alias for get_media_likes_by_shortcode.
347
+
348
+ Note: The parameters count and max_id are kept for backward compatibility but are no longer supported.
349
+
350
+ Args:
351
+ shortcode (str): Media shortcode
352
+ count (int): DEPRECATED - No longer supported
353
+ max_id (str): DEPRECATED - No longer supported
354
+
355
+ Pagination is not supported for this endpoint.
356
+
357
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/get_likes
358
+ """
359
+ # Ignoring count and max_id parameters as they're no longer supported
360
+ return self.get_media_likes_by_shortcode(shortcode)
361
+
315
362
  def get_media_likes_by_id(self, media_id):
316
363
  """
317
364
  Retrieve up to 1000 media likes by media id.
@@ -367,6 +414,17 @@ class InstagramAPI(RocketAPI):
367
414
  "instagram/media/get_id_by_shortcode", {"shortcode": shortcode}
368
415
  )
369
416
 
417
+ def get_media_id_by_share(self, share):
418
+ """
419
+ Get media id by share code (for links like https://www.instagram.com/share/XXXxx356, where XXXxx356 is the share code).
420
+
421
+ Args:
422
+ share (str): Share code
423
+
424
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/get_id_by_share
425
+ """
426
+ return self.request("instagram/media/get_id_by_share", {"share": share})
427
+
370
428
  def get_guide_info(self, guide_id):
371
429
  """
372
430
  Retrieve guide information by guide id.
@@ -423,7 +481,7 @@ class InstagramAPI(RocketAPI):
423
481
  """
424
482
  return self.request("instagram/hashtag/get_info", {"name": name})
425
483
 
426
- def get_hashtag_media(self, name, page=None, max_id=None):
484
+ def get_hashtag_media(self, name, page=None, max_id=None, tab=None):
427
485
  """
428
486
  Retrieve hashtag media by hashtag name.
429
487
 
@@ -431,6 +489,7 @@ class InstagramAPI(RocketAPI):
431
489
  name (str): Hashtag name
432
490
  page (int): Page number
433
491
  max_id (str): Use for pagination
492
+ tab (str): Tab name: recent, top, or clips (default: recent)
434
493
 
435
494
  In order to use pagination, you need to use both the `max_id` and `page` parameters. You can obtain these values from the response's `next_page` and `next_max_id` fields.
436
495
 
@@ -441,6 +500,8 @@ class InstagramAPI(RocketAPI):
441
500
  payload["page"] = page
442
501
  if max_id is not None:
443
502
  payload["max_id"] = max_id
503
+ if tab is not None:
504
+ payload["tab"] = tab
444
505
  return self.request("instagram/hashtag/get_media", payload)
445
506
 
446
507
  def get_highlight_stories_bulk(self, highlight_ids):
@@ -600,13 +661,19 @@ class InstagramAPI(RocketAPI):
600
661
  """
601
662
  return self.request("instagram/audio/search", {"query": query})
602
663
 
603
- def search_clips(self, query):
664
+ def search_clips(self, query, max_id=None):
604
665
  """
605
666
  Search for a specific clip with a caption that includes the query (max 12 results)
606
667
 
607
668
  Args:
608
669
  query (str): The search query
670
+ max_id (str): Use for pagination
671
+
672
+ You can use the max_id parameter to paginate through following (take from the reels_max_id field of the response).
609
673
 
610
674
  For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/search_clips
611
675
  """
612
- return self.request("instagram/media/search_clips", {"query": query})
676
+ payload = {"query": query}
677
+ if max_id is not None:
678
+ payload["max_id"] = max_id
679
+ return self.request("instagram/media/search_clips", payload)
@@ -11,7 +11,7 @@ class RocketAPI:
11
11
  For more information, see documentation: https://docs.rocketapi.io/api/
12
12
  """
13
13
  self.base_url = "https://v1.rocketapi.io/"
14
- self.version = "1.0.9"
14
+ self.version = "1.0.11"
15
15
  self.token = token
16
16
  self.max_timeout = max_timeout
17
17
 
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rocketapi
3
- Version: 1.0.9
3
+ Version: 1.0.11
4
4
  Summary: RocketAPI Python SDK
5
5
  Home-page: https://github.com/rocketapi-io/rocketapi-python
6
- Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.9.tar.gz
6
+ Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.11.tar.gz
7
7
  Author: RocketAPI
8
8
  Author-email: developer@rocketapi.io
@@ -3,12 +3,12 @@ import setuptools
3
3
 
4
4
  setuptools.setup(
5
5
  name="rocketapi",
6
- version="1.0.9",
6
+ version="1.0.11",
7
7
  author="RocketAPI",
8
8
  author_email="developer@rocketapi.io",
9
9
  description="RocketAPI Python SDK",
10
10
  packages=["rocketapi"],
11
11
  url="https://github.com/rocketapi-io/rocketapi-python",
12
- download_url="https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.9.tar.gz",
12
+ download_url="https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.11.tar.gz",
13
13
  install_requires=["requests"],
14
14
  )
File without changes
File without changes
File without changes