Skip to content

Commit 1141d24

Browse files
committed
1.0.14
1 parent 3fb26b0 commit 1141d24

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

rocketapi/instagramapi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ def __init__(self, token, max_timeout=30):
1919
"""
2020
self.last_response = None
2121
self.counter = 0
22+
self.version = None
2223
super().__init__(token, max_timeout=max_timeout)
2324

2425
def request(self, method, data):
26+
if isinstance(self.version, str):
27+
data = {**data, "version": self.version}
2528
response = super().request(method, data)
2629
self.last_response = response
2730
self.counter += 1

rocketapi/rocketapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def __init__(self, token, max_timeout=30):
1111
For more information, see documentation: https://docs.rocketapi.io/api/
1212
"""
1313
self.base_url = "https://v1.rocketapi.io/"
14-
self.version = "1.0.13"
14+
self.sdk_version = "1.0.14"
1515
self.token = token
1616
self.max_timeout = max_timeout
1717

@@ -21,7 +21,7 @@ def request(self, method, data):
2121
json=data,
2222
headers={
2323
"Authorization": f"Token {self.token}",
24-
"User-Agent": f"RocketAPI Python SDK/{self.version}",
24+
"User-Agent": f"RocketAPI Python SDK/{self.sdk_version}",
2525
},
2626
timeout=self.max_timeout,
2727
).json()

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
setuptools.setup(
55
name="rocketapi",
6-
version="1.0.13",
6+
version="1.0.14",
77
author="RocketAPI",
88
author_email="developer@rocketapi.io",
99
description="RocketAPI Python SDK",
1010
packages=["rocketapi"],
1111
url="https://github.com/rocketapi-io/rocketapi-python",
12-
download_url="https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.13.tar.gz",
12+
download_url="https://github.com/rocketapi-io/rocketapi-python/archive/refs/tags/v1.0.14.tar.gz",
1313
install_requires=["requests"],
1414
)

0 commit comments

Comments
 (0)