rocketapi 1.0.10__tar.gz → 1.0.12__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.
- {rocketapi-1.0.10 → rocketapi-1.0.12}/PKG-INFO +2 -2
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi/instagramapi.py +69 -12
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi/rocketapi.py +1 -1
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi.egg-info/PKG-INFO +2 -2
- {rocketapi-1.0.10 → rocketapi-1.0.12}/setup.py +2 -2
- {rocketapi-1.0.10 → rocketapi-1.0.12}/README.md +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/pyproject.toml +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi/__init__.py +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi/exceptions.py +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi/threadsapi.py +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi.egg-info/SOURCES.txt +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi.egg-info/dependency_links.txt +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi.egg-info/requires.txt +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/rocketapi.egg-info/top_level.txt +0 -0
- {rocketapi-1.0.10 → rocketapi-1.0.12}/setup.cfg +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rocketapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.12
|
|
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.
|
|
6
|
+
Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.12.tar.gz
|
|
7
7
|
Author: RocketAPI
|
|
8
8
|
Author-email: developer@rocketapi.io
|
|
@@ -26,6 +26,9 @@ class InstagramAPI(RocketAPI):
|
|
|
26
26
|
self.last_response = response
|
|
27
27
|
self.counter += 1
|
|
28
28
|
if response["status"] == "done":
|
|
29
|
+
if method in ["instagram/media/get_shortcode_by_id", "instagram/media/get_id_by_shortcode"]:
|
|
30
|
+
return response
|
|
31
|
+
|
|
29
32
|
if (
|
|
30
33
|
response["response"]["status_code"] == 200
|
|
31
34
|
and response["response"]["content_type"] == "application/json"
|
|
@@ -57,16 +60,30 @@ class InstagramAPI(RocketAPI):
|
|
|
57
60
|
"""
|
|
58
61
|
return self.request("instagram/search", {"query": query})
|
|
59
62
|
|
|
63
|
+
def get_web_profile_info(self, username):
|
|
64
|
+
"""
|
|
65
|
+
Retrieve user web profile information by username.
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
username (str): Username
|
|
69
|
+
|
|
70
|
+
For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_web_profile_info
|
|
71
|
+
"""
|
|
72
|
+
return self.request(
|
|
73
|
+
"instagram/user/get_web_profile_info", {"username": username}
|
|
74
|
+
)
|
|
75
|
+
|
|
60
76
|
def get_user_info(self, username):
|
|
61
77
|
"""
|
|
62
78
|
Retrieve user information by username.
|
|
79
|
+
This is an alias for get_web_profile_info.
|
|
63
80
|
|
|
64
81
|
Args:
|
|
65
82
|
username (str): Username
|
|
66
83
|
|
|
67
84
|
For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_info
|
|
68
85
|
"""
|
|
69
|
-
return self.
|
|
86
|
+
return self.get_web_profile_info(username)
|
|
70
87
|
|
|
71
88
|
def get_user_info_by_id(self, user_id):
|
|
72
89
|
"""
|
|
@@ -97,6 +114,24 @@ class InstagramAPI(RocketAPI):
|
|
|
97
114
|
payload["max_id"] = max_id
|
|
98
115
|
return self.request("instagram/user/get_media", payload)
|
|
99
116
|
|
|
117
|
+
def get_user_media_by_username(self, username, count=12, max_id=None):
|
|
118
|
+
"""
|
|
119
|
+
Retrieve user media by username.
|
|
120
|
+
|
|
121
|
+
Args:
|
|
122
|
+
username (str): Username
|
|
123
|
+
count (int): Number of media to retrieve (max: 12)
|
|
124
|
+
max_id (str): Use for pagination
|
|
125
|
+
|
|
126
|
+
You can use the `max_id` parameter to paginate through the media (take from the `next_max_id` field of the response).
|
|
127
|
+
|
|
128
|
+
For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_media_by_username
|
|
129
|
+
"""
|
|
130
|
+
payload = {"username": username, "count": count}
|
|
131
|
+
if max_id is not None:
|
|
132
|
+
payload["max_id"] = max_id
|
|
133
|
+
return self.request("instagram/user/get_media_by_username", payload)
|
|
134
|
+
|
|
100
135
|
def get_user_clips(self, user_id, count=12, max_id=None):
|
|
101
136
|
"""
|
|
102
137
|
Retrieve user clips (videos from "Reels" section) by id.
|
|
@@ -294,24 +329,39 @@ class InstagramAPI(RocketAPI):
|
|
|
294
329
|
"instagram/media/get_info_by_shortcode", {"shortcode": shortcode}
|
|
295
330
|
)
|
|
296
331
|
|
|
297
|
-
def
|
|
332
|
+
def get_media_likes_by_shortcode(self, shortcode):
|
|
298
333
|
"""
|
|
299
334
|
Retrieve up to 1000 media likes by media shortcode.
|
|
300
335
|
|
|
301
336
|
Args:
|
|
302
337
|
shortcode (str): Media shortcode
|
|
303
|
-
count (int): Not supported right now
|
|
304
|
-
max_id (str): Not supported right now
|
|
305
338
|
|
|
306
339
|
Pagination is not supported for this endpoint.
|
|
307
340
|
|
|
308
341
|
For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/get_likes
|
|
309
342
|
"""
|
|
310
|
-
payload = {"shortcode": shortcode
|
|
311
|
-
if max_id is not None:
|
|
312
|
-
payload["max_id"] = max_id
|
|
343
|
+
payload = {"shortcode": shortcode}
|
|
313
344
|
return self.request("instagram/media/get_likes", payload)
|
|
314
345
|
|
|
346
|
+
def get_media_likes(self, shortcode, count=12, max_id=None):
|
|
347
|
+
"""
|
|
348
|
+
Retrieve up to 1000 media likes by media shortcode.
|
|
349
|
+
This is an alias for get_media_likes_by_shortcode.
|
|
350
|
+
|
|
351
|
+
Note: The parameters count and max_id are kept for backward compatibility but are no longer supported.
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
shortcode (str): Media shortcode
|
|
355
|
+
count (int): DEPRECATED - No longer supported
|
|
356
|
+
max_id (str): DEPRECATED - No longer supported
|
|
357
|
+
|
|
358
|
+
Pagination is not supported for this endpoint.
|
|
359
|
+
|
|
360
|
+
For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/get_likes
|
|
361
|
+
"""
|
|
362
|
+
# Ignoring count and max_id parameters as they're no longer supported
|
|
363
|
+
return self.get_media_likes_by_shortcode(shortcode)
|
|
364
|
+
|
|
315
365
|
def get_media_likes_by_id(self, media_id):
|
|
316
366
|
"""
|
|
317
367
|
Retrieve up to 1000 media likes by media id.
|
|
@@ -366,7 +416,6 @@ class InstagramAPI(RocketAPI):
|
|
|
366
416
|
return self.request(
|
|
367
417
|
"instagram/media/get_id_by_shortcode", {"shortcode": shortcode}
|
|
368
418
|
)
|
|
369
|
-
|
|
370
419
|
|
|
371
420
|
def get_media_id_by_share(self, share):
|
|
372
421
|
"""
|
|
@@ -379,7 +428,6 @@ class InstagramAPI(RocketAPI):
|
|
|
379
428
|
"""
|
|
380
429
|
return self.request("instagram/media/get_id_by_share", {"share": share})
|
|
381
430
|
|
|
382
|
-
|
|
383
431
|
def get_guide_info(self, guide_id):
|
|
384
432
|
"""
|
|
385
433
|
Retrieve guide information by guide id.
|
|
@@ -436,7 +484,7 @@ class InstagramAPI(RocketAPI):
|
|
|
436
484
|
"""
|
|
437
485
|
return self.request("instagram/hashtag/get_info", {"name": name})
|
|
438
486
|
|
|
439
|
-
def get_hashtag_media(self, name, page=None, max_id=None):
|
|
487
|
+
def get_hashtag_media(self, name, page=None, max_id=None, tab=None):
|
|
440
488
|
"""
|
|
441
489
|
Retrieve hashtag media by hashtag name.
|
|
442
490
|
|
|
@@ -444,6 +492,7 @@ class InstagramAPI(RocketAPI):
|
|
|
444
492
|
name (str): Hashtag name
|
|
445
493
|
page (int): Page number
|
|
446
494
|
max_id (str): Use for pagination
|
|
495
|
+
tab (str): Tab name: recent, top, or clips (default: recent)
|
|
447
496
|
|
|
448
497
|
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.
|
|
449
498
|
|
|
@@ -454,6 +503,8 @@ class InstagramAPI(RocketAPI):
|
|
|
454
503
|
payload["page"] = page
|
|
455
504
|
if max_id is not None:
|
|
456
505
|
payload["max_id"] = max_id
|
|
506
|
+
if tab is not None:
|
|
507
|
+
payload["tab"] = tab
|
|
457
508
|
return self.request("instagram/hashtag/get_media", payload)
|
|
458
509
|
|
|
459
510
|
def get_highlight_stories_bulk(self, highlight_ids):
|
|
@@ -613,13 +664,19 @@ class InstagramAPI(RocketAPI):
|
|
|
613
664
|
"""
|
|
614
665
|
return self.request("instagram/audio/search", {"query": query})
|
|
615
666
|
|
|
616
|
-
def search_clips(self, query):
|
|
667
|
+
def search_clips(self, query, max_id=None):
|
|
617
668
|
"""
|
|
618
669
|
Search for a specific clip with a caption that includes the query (max 12 results)
|
|
619
670
|
|
|
620
671
|
Args:
|
|
621
672
|
query (str): The search query
|
|
673
|
+
max_id (str): Use for pagination
|
|
674
|
+
|
|
675
|
+
You can use the max_id parameter to paginate through following (take from the reels_max_id field of the response).
|
|
622
676
|
|
|
623
677
|
For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/search_clips
|
|
624
678
|
"""
|
|
625
|
-
|
|
679
|
+
payload = {"query": query}
|
|
680
|
+
if max_id is not None:
|
|
681
|
+
payload["max_id"] = max_id
|
|
682
|
+
return self.request("instagram/media/search_clips", payload)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rocketapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.12
|
|
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.
|
|
6
|
+
Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.12.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.
|
|
6
|
+
version="1.0.12",
|
|
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.
|
|
12
|
+
download_url="https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.12.tar.gz",
|
|
13
13
|
install_requires=["requests"],
|
|
14
14
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|