rocketapi 1.0.5__tar.gz → 1.0.7__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.5 → rocketapi-1.0.7}/PKG-INFO +2 -2
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi/instagramapi.py +63 -10
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi/threadsapi.py +0 -1
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi.egg-info/PKG-INFO +2 -2
- {rocketapi-1.0.5 → rocketapi-1.0.7}/setup.py +2 -2
- {rocketapi-1.0.5 → rocketapi-1.0.7}/README.md +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/pyproject.toml +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi/__init__.py +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi/exceptions.py +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi/rocketapi.py +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi.egg-info/SOURCES.txt +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi.egg-info/dependency_links.txt +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi.egg-info/requires.txt +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/rocketapi.egg-info/top_level.txt +0 -0
- {rocketapi-1.0.5 → rocketapi-1.0.7}/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.7
|
|
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.7.tar.gz
|
|
7
7
|
Author: RocketAPI
|
|
8
8
|
Author-email: developer@rocketapi.io
|
|
@@ -34,13 +34,21 @@ class InstagramAPI(RocketAPI):
|
|
|
34
34
|
elif response["response"]["status_code"] == 404:
|
|
35
35
|
raise NotFoundException("Instagram resource not found")
|
|
36
36
|
else:
|
|
37
|
-
raise BadResponseException(
|
|
38
|
-
|
|
37
|
+
raise BadResponseException(
|
|
38
|
+
f"Bad response from Instagram ({method}: {response['response']['status_code']})"
|
|
39
|
+
)
|
|
40
|
+
raise BadResponseException(f"Bad response from RocketAPI ({method})")
|
|
39
41
|
|
|
40
42
|
def search(self, query):
|
|
41
43
|
"""
|
|
42
44
|
Search for a specific user, hashtag or place.
|
|
43
45
|
|
|
46
|
+
As of September 2024, we no longer recommend using this method, as it now only returns a maximum of 5 users and leaves the places and hashtags arrays empty. Instead, please use the separate methods:
|
|
47
|
+
- `search_users`
|
|
48
|
+
- `search_hashtags`
|
|
49
|
+
- `search_locations`
|
|
50
|
+
- `search_audios`
|
|
51
|
+
|
|
44
52
|
Args:
|
|
45
53
|
query (str): The search query
|
|
46
54
|
|
|
@@ -76,7 +84,7 @@ class InstagramAPI(RocketAPI):
|
|
|
76
84
|
|
|
77
85
|
Args:
|
|
78
86
|
user_id (int): User id
|
|
79
|
-
count (int): Number of media to retrieve (max:
|
|
87
|
+
count (int): Number of media to retrieve (max: 12)
|
|
80
88
|
max_id (str): Use for pagination
|
|
81
89
|
|
|
82
90
|
You can use the `max_id` parameter to paginate through the media (take from the `next_max_id` field of the response).
|
|
@@ -88,19 +96,20 @@ class InstagramAPI(RocketAPI):
|
|
|
88
96
|
payload["max_id"] = max_id
|
|
89
97
|
return self.request("instagram/user/get_media", payload)
|
|
90
98
|
|
|
91
|
-
def get_user_clips(self, user_id, max_id=None):
|
|
99
|
+
def get_user_clips(self, user_id, count=12, max_id=None):
|
|
92
100
|
"""
|
|
93
101
|
Retrieve user clips (videos from "Reels" section) by id.
|
|
94
102
|
|
|
95
103
|
Args:
|
|
96
104
|
user_id (int): User id
|
|
105
|
+
count (int): Number of media to retrieve (max: 50)
|
|
97
106
|
max_id (str): Use for pagination
|
|
98
107
|
|
|
99
108
|
You can use the `max_id` parameter to paginate through the media (take from the `max_id` (!) field of the response).
|
|
100
109
|
|
|
101
110
|
For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_clips
|
|
102
111
|
"""
|
|
103
|
-
payload = {"id": user_id}
|
|
112
|
+
payload = {"id": user_id, "count": count}
|
|
104
113
|
if max_id is not None:
|
|
105
114
|
payload["max_id"] = max_id
|
|
106
115
|
return self.request("instagram/user/get_clips", payload)
|
|
@@ -178,7 +187,7 @@ class InstagramAPI(RocketAPI):
|
|
|
178
187
|
|
|
179
188
|
Args:
|
|
180
189
|
user_id (int): User id
|
|
181
|
-
count (int): Number of users to return (max:
|
|
190
|
+
count (int): Number of users to return (max: 50)
|
|
182
191
|
max_id (str): Use for pagination
|
|
183
192
|
|
|
184
193
|
You can use the `max_id` parameter to paginate through followers (take from the `next_max_id` field of the response).
|
|
@@ -286,14 +295,14 @@ class InstagramAPI(RocketAPI):
|
|
|
286
295
|
|
|
287
296
|
def get_media_likes(self, shortcode, count=12, max_id=None):
|
|
288
297
|
"""
|
|
289
|
-
Retrieve media likes by media shortcode.
|
|
298
|
+
Retrieve up to 1000 media likes by media shortcode.
|
|
290
299
|
|
|
291
300
|
Args:
|
|
292
301
|
shortcode (str): Media shortcode
|
|
293
|
-
count (int):
|
|
294
|
-
max_id (str):
|
|
302
|
+
count (int): Not supported right now
|
|
303
|
+
max_id (str): Not supported right now
|
|
295
304
|
|
|
296
|
-
|
|
305
|
+
Pagination is not supported for this endpoint.
|
|
297
306
|
|
|
298
307
|
For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/get_likes
|
|
299
308
|
"""
|
|
@@ -504,3 +513,47 @@ class InstagramAPI(RocketAPI):
|
|
|
504
513
|
For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_about
|
|
505
514
|
"""
|
|
506
515
|
return self.request("instagram/user/get_about", {"id": user_id})
|
|
516
|
+
|
|
517
|
+
def search_users(self, query):
|
|
518
|
+
"""
|
|
519
|
+
Search for a specific user (max 50 results)
|
|
520
|
+
|
|
521
|
+
Args:
|
|
522
|
+
query (str): The search query
|
|
523
|
+
|
|
524
|
+
For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/search
|
|
525
|
+
"""
|
|
526
|
+
return self.request("instagram/user/search", {"query": query})
|
|
527
|
+
|
|
528
|
+
def search_hashtags(self, query):
|
|
529
|
+
"""
|
|
530
|
+
Search for a specific hashtag (max 20 results)
|
|
531
|
+
|
|
532
|
+
Args:
|
|
533
|
+
query (str): The search query
|
|
534
|
+
|
|
535
|
+
For more information, see documentation: https://docs.rocketapi.io/api/instagram/hashtag/search
|
|
536
|
+
"""
|
|
537
|
+
return self.request("instagram/hashtag/search", {"query": query})
|
|
538
|
+
|
|
539
|
+
def search_locations(self, query):
|
|
540
|
+
"""
|
|
541
|
+
Search for a specific location (max 20 results)
|
|
542
|
+
|
|
543
|
+
Args:
|
|
544
|
+
query (str): The search query
|
|
545
|
+
|
|
546
|
+
For more information, see documentation: https://docs.rocketapi.io/api/instagram/location/search
|
|
547
|
+
"""
|
|
548
|
+
return self.request("instagram/location/search", {"query": query})
|
|
549
|
+
|
|
550
|
+
def search_audios(self, query):
|
|
551
|
+
"""
|
|
552
|
+
Search for a specific audio (max 10 results)
|
|
553
|
+
|
|
554
|
+
Args:
|
|
555
|
+
query (str): The search query
|
|
556
|
+
|
|
557
|
+
For more information, see documentation: https://docs.rocketapi.io/api/instagram/audio/search
|
|
558
|
+
"""
|
|
559
|
+
return self.request("instagram/audio/search", {"query": query})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rocketapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.7
|
|
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.7.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.7",
|
|
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.7.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
|