FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
rocketapi-python/rocketapi/rocketapi.py at main · rocketapi-io/rocketapi-python · GitHub
rocketapi-io
/
rocketapi-python
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
43
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
rocketapi-python
/
rocketapi
/
rocketapi.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (22 loc) · 810 Bytes
Breadcrumbs
rocketapi-python
/
rocketapi
/
rocketapi.py
Copy path
File metadata and controls
27 lines (22 loc) · 810 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import
requests
class
RocketAPI
:
def
__init__
(
self
,
token
,
max_timeout
=
30
):
"""
RocketAPI client.
If your base_url is different from the default, you can reassign it after initialization.
For more information, see documentation: https://docs.rocketapi.io/api/
"""
self
.
base_url
=
"https://v1.rocketapi.io/"
self
.
version
=
"1.0.13"
self
.
token
=
token
self
.
max_timeout
=
max_timeout
def
request
(
self
,
method
,
data
):
return
requests
.
post
(
url
=
self
.
base_url
+
method
,
json
=
data
,
headers
=
{
"Authorization"
:
f"Token
{
self
.
token
}
"
,
"User-Agent"
:
f"RocketAPI Python SDK/
{
self
.
version
}
"
,
},
timeout
=
self
.
max_timeout
,
).
json
()
Back
|
FazBrowse Home
|
New Git URL