rocketapi 1.0.6__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.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rocketapi
3
- Version: 1.0.6
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.tar.gz
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("Bad response from Instagram")
38
- raise BadResponseException("Bad response from RocketAPI")
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: 50)
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).
@@ -179,7 +187,7 @@ class InstagramAPI(RocketAPI):
179
187
 
180
188
  Args:
181
189
  user_id (int): User id
182
- count (int): Number of users to return (max: 100)
190
+ count (int): Number of users to return (max: 50)
183
191
  max_id (str): Use for pagination
184
192
 
185
193
  You can use the `max_id` parameter to paginate through followers (take from the `next_max_id` field of the response).
@@ -287,14 +295,14 @@ class InstagramAPI(RocketAPI):
287
295
 
288
296
  def get_media_likes(self, shortcode, count=12, max_id=None):
289
297
  """
290
- Retrieve media likes by media shortcode.
298
+ Retrieve up to 1000 media likes by media shortcode.
291
299
 
292
300
  Args:
293
301
  shortcode (str): Media shortcode
294
- count (int): Number of likers to return (max: 50)
295
- max_id (str): Use for pagination
302
+ count (int): Not supported right now
303
+ max_id (str): Not supported right now
296
304
 
297
- You can use the `max_id` parameter to paginate through likers (take from the `next_max_id` field of the response).
305
+ Pagination is not supported for this endpoint.
298
306
 
299
307
  For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/get_likes
300
308
  """
@@ -505,3 +513,47 @@ class InstagramAPI(RocketAPI):
505
513
  For more information, see documentation: https://docs.rocketapi.io/api/instagram/user/get_about
506
514
  """
507
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.6
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.tar.gz
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",
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.6.tar.gz",
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