It is a simple API wrapper for the streaming service streamtape.com. The API documentation can be found on the docs page. The whole structure of the API has been split into different classes for easy overview and usage.
Install with
pip install streamtape
Every class starts with following initialization:
my_var = selectedClass(API_USER_KEY, API_PASSWORD)
API key and password you can get in your account in Account Settings.
For the general purpose of any response, the ApiResponse class has been created to return a dict with this structure:
{
"status": <status-code>,
"msg": "<informational message. might vary, use the status code in your code!>",
"result": <result of the request. varies depending on the request>
}
Example
account = Account(API_USER_KEY, API_PASSWORD)
print(account.get_info())
Example
converts = Convertation(API_USER_KEY, API_PASSWORD)
print(converts.list_converts())
Class for working with files and folders
Example
f_manager = FileManager(API_USER_KEY, API_PASSWORD)
print(f_manager.list_data())
Example
remote = Remote(API_USER_KEY, API_PASSWORD)
print(remote.remote_upload("path_to_file", "folder_id"))
Example
stream = Stream(API_USER_KEY, API_PASSWORD)
print(stream.file_info("file_id"))
Example
uploader = Upload(API_USER_KEY, API_PASSWORD)
print(uploader.upload("path_to_file", "folder_id"))
- Initial release
- Fixed variables
- Fixed upload parameters
- Fixed API link (thx to @Gairolarishav)
- Revert changes from 1.0.2. It seems it was spam. Sorry. Set your own url with function
set_api_url