rocketapi 1.0.7__tar.gz → 1.0.8__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.7
3
+ Version: 1.0.8
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.7.tar.gz
6
+ Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.8.tar.gz
7
7
  Author: RocketAPI
8
8
  Author-email: developer@rocketapi.io
@@ -48,6 +48,7 @@ class InstagramAPI(RocketAPI):
48
48
  - `search_hashtags`
49
49
  - `search_locations`
50
50
  - `search_audios`
51
+ - `search_clips`
51
52
 
52
53
  Args:
53
54
  query (str): The search query
@@ -102,7 +103,7 @@ class InstagramAPI(RocketAPI):
102
103
 
103
104
  Args:
104
105
  user_id (int): User id
105
- count (int): Number of media to retrieve (max: 50)
106
+ count (int): Number of media to retrieve (max: 12)
106
107
  max_id (str): Use for pagination
107
108
 
108
109
  You can use the `max_id` parameter to paginate through the media (take from the `max_id` (!) field of the response).
@@ -375,7 +376,7 @@ class InstagramAPI(RocketAPI):
375
376
  """
376
377
  return self.request("instagram/location/get_info", {"id": location_id})
377
378
 
378
- def get_location_media(self, location_id, page=None, max_id=None):
379
+ def get_location_media(self, location_id, page=None, max_id=None, tab=None):
379
380
  """
380
381
  Retrieve location media by location id.
381
382
 
@@ -383,6 +384,7 @@ class InstagramAPI(RocketAPI):
383
384
  location_id (int): Location id
384
385
  page (int): Page number
385
386
  max_id (str): Use for pagination
387
+ tab (str): Tab name: recent, ranked (default: recent)
386
388
 
387
389
  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.
388
390
 
@@ -393,6 +395,8 @@ class InstagramAPI(RocketAPI):
393
395
  payload["page"] = page
394
396
  if max_id is not None:
395
397
  payload["max_id"] = max_id
398
+ if tab is not None:
399
+ payload["tab"] = tab
396
400
  return self.request("instagram/location/get_media", payload)
397
401
 
398
402
  def get_hashtag_info(self, name):
@@ -500,6 +504,23 @@ class InstagramAPI(RocketAPI):
500
504
  payload["max_id"] = max_id
501
505
  return self.request("instagram/audio/get_media", payload)
502
506
 
507
+ def get_audio_media_by_canonical_id(self, audio_canonical_id, max_id=None):
508
+ """
509
+ Retrieve audio media by audio canonical id.
510
+
511
+ Args:
512
+ audio_canonical_id (int): Audio canonical id
513
+ max_id (str): Use for pagination
514
+
515
+ You can use the `max_id` parameter to paginate through media (take from the `next_max_id` field of the response).
516
+
517
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/audio/get_media_by_canonical_id
518
+ """
519
+ payload = {"id": audio_canonical_id}
520
+ if max_id is not None:
521
+ payload["max_id"] = max_id
522
+ return self.request("instagram/audio/get_media_by_canonical_id", payload)
523
+
503
524
  def get_user_about(self, user_id):
504
525
  """
505
526
  Obtain user details from «About this Account» section.
@@ -557,3 +578,14 @@ class InstagramAPI(RocketAPI):
557
578
  For more information, see documentation: https://docs.rocketapi.io/api/instagram/audio/search
558
579
  """
559
580
  return self.request("instagram/audio/search", {"query": query})
581
+
582
+ def search_clips(self, query):
583
+ """
584
+ Search for a specific clip with a caption that includes the query (max 12 results)
585
+
586
+ Args:
587
+ query (str): The search query
588
+
589
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/search_clips
590
+ """
591
+ return self.request("instagram/media/search_clips", {"query": query})
@@ -11,6 +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.8"
14
15
  self.token = token
15
16
  self.max_timeout = max_timeout
16
17
 
@@ -18,6 +19,9 @@ class RocketAPI:
18
19
  return requests.post(
19
20
  url=self.base_url + method,
20
21
  json=data,
21
- headers={"Authorization": f"Token {self.token}"},
22
+ headers={
23
+ "Authorization": f"Token {self.token}",
24
+ "User-Agent": f"RocketAPI Python SDK/{self.version}",
25
+ },
22
26
  timeout=self.max_timeout,
23
27
  ).json()
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rocketapi
3
- Version: 1.0.7
3
+ Version: 1.0.8
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.7.tar.gz
6
+ Download-URL: https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.8.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.7",
6
+ version="1.0.8",
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.7.tar.gz",
12
+ download_url="https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.8.tar.gz",
13
13
  install_requires=["requests"],
14
14
  )
File without changes
File without changes
File without changes