Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crmne/slskd-python-client
A slskd python client
https://github.com/crmne/slskd-python-client
Last synced: 6 days ago
JSON representation
A slskd python client
- Host: GitHub
- URL: https://github.com/crmne/slskd-python-client
- Owner: crmne
- Created: 2023-06-28T14:07:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-14T21:15:44.000Z (over 1 year ago)
- Last Synced: 2024-11-08T19:46:02.022Z (about 2 months ago)
- Language: Python
- Size: 252 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slskd
A python client for slskdThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 0.17.8.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen
For more information, please visit [https://paolino.me](https://paolino.me)## Requirements.
Python 3.7+
## Installation & Usage
### pip installIf the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/crmne/slskd-python-client.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/crmne/slskd-python-client.git`)Then import the package:
```python
import slskd
```### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)Then import the package:
```python
import slskd
```### Tests
Execute `pytest` to run the tests.
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import time
import slskd
from slskd.rest import ApiException
from pprint import pprint# Defining the host is optional and defaults to http://localhost:5030/api/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = slskd.Configuration(
host = "http://localhost:5030/api/v0"
)# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'# Enter a context with an instance of the API client
async with slskd.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = slskd.ApplicationApi(api_client)try:
# Stops the application.
api_response = await api_instance.application_delete()
print("The response of ApplicationApi->application_delete:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ApplicationApi->application_delete: %s\n" % e)```
## Documentation for API Endpoints
All URIs are relative to *http://localhost:5030/api/v0*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ApplicationApi* | [**application_delete**](docs/ApplicationApi.md#application_delete) | **DELETE** /application | Stops the application.
*ApplicationApi* | [**application_dump_get**](docs/ApplicationApi.md#application_dump_get) | **GET** /application/dump |
*ApplicationApi* | [**application_gc_post**](docs/ApplicationApi.md#application_gc_post) | **POST** /application/gc | Forces garbage collection.
*ApplicationApi* | [**application_get**](docs/ApplicationApi.md#application_get) | **GET** /application | Gets the current state of the application.
*ApplicationApi* | [**application_put**](docs/ApplicationApi.md#application_put) | **PUT** /application | Restarts the application.
*ApplicationApi* | [**application_version_get**](docs/ApplicationApi.md#application_version_get) | **GET** /application/version | Gets the current application version.
*ApplicationApi* | [**application_version_latest_get**](docs/ApplicationApi.md#application_version_latest_get) | **GET** /application/version/latest | Checks for updates.
*ConversationsApi* | [**conversations_get**](docs/ConversationsApi.md#conversations_get) | **GET** /conversations | Gets all active conversations.
*ConversationsApi* | [**conversations_username_delete**](docs/ConversationsApi.md#conversations_username_delete) | **DELETE** /conversations/{username} | Closes the conversation associated with the given username.
*ConversationsApi* | [**conversations_username_get**](docs/ConversationsApi.md#conversations_username_get) | **GET** /conversations/{username} | Gets the conversation associated with the specified username.
*ConversationsApi* | [**conversations_username_id_put**](docs/ConversationsApi.md#conversations_username_id_put) | **PUT** /conversations/{username}/{id} | Acknowledges the given message id for the given username.
*ConversationsApi* | [**conversations_username_messages_get**](docs/ConversationsApi.md#conversations_username_messages_get) | **GET** /conversations/{username}/messages |
*ConversationsApi* | [**conversations_username_post**](docs/ConversationsApi.md#conversations_username_post) | **POST** /conversations/{username} | Sends a private message to the specified username.
*ConversationsApi* | [**conversations_username_put**](docs/ConversationsApi.md#conversations_username_put) | **PUT** /conversations/{username} | Acknowledges all messages from the given username.
*LogsApi* | [**logs_get**](docs/LogsApi.md#logs_get) | **GET** /logs | Gets the last few application logs.
*MetricsApi* | [**metrics_get**](docs/MetricsApi.md#metrics_get) | **GET** /metrics | Gets application metrics.
*OptionsApi* | [**options_debug_get**](docs/OptionsApi.md#options_debug_get) | **GET** /options/debug | Gets the debug view of the current application options.
*OptionsApi* | [**options_get**](docs/OptionsApi.md#options_get) | **GET** /options | Gets the current application options.
*OptionsApi* | [**options_startup_get**](docs/OptionsApi.md#options_startup_get) | **GET** /options/startup | Gets the application options provided at startup.
*OptionsApi* | [**options_yaml_get**](docs/OptionsApi.md#options_yaml_get) | **GET** /options/yaml |
*OptionsApi* | [**options_yaml_location_get**](docs/OptionsApi.md#options_yaml_location_get) | **GET** /options/yaml/location |
*OptionsApi* | [**options_yaml_post**](docs/OptionsApi.md#options_yaml_post) | **POST** /options/yaml |
*OptionsApi* | [**options_yaml_validate_post**](docs/OptionsApi.md#options_yaml_validate_post) | **POST** /options/yaml/validate |
*PublicChatApi* | [**publicchat_delete**](docs/PublicChatApi.md#publicchat_delete) | **DELETE** /publicchat | Stops public chat.
*PublicChatApi* | [**publicchat_post**](docs/PublicChatApi.md#publicchat_post) | **POST** /publicchat | Starts public chat.
*RelayApi* | [**relay_agent_delete**](docs/RelayApi.md#relay_agent_delete) | **DELETE** /relay/agent | Disconnects from the connected controller.
*RelayApi* | [**relay_agent_put**](docs/RelayApi.md#relay_agent_put) | **PUT** /relay/agent | Connects to the configured controller.
*RelayApi* | [**relay_controller_downloads_token_get**](docs/RelayApi.md#relay_controller_downloads_token_get) | **GET** /relay/controller/downloads/{token} | Downloads a file from the connected controller.
*RelayApi* | [**relay_controller_files_token_post**](docs/RelayApi.md#relay_controller_files_token_post) | **POST** /relay/controller/files/{token} | Uploads a file to the connected controller.
*RelayApi* | [**relay_controller_shares_token_post**](docs/RelayApi.md#relay_controller_shares_token_post) | **POST** /relay/controller/shares/{token} | Uploads share information to the connected controller.
*RoomsApi* | [**rooms_available_get**](docs/RoomsApi.md#rooms_available_get) | **GET** /rooms/available | Gets a list of rooms from the server.
*RoomsApi* | [**rooms_joined_get**](docs/RoomsApi.md#rooms_joined_get) | **GET** /rooms/joined | Gets all rooms.
*RoomsApi* | [**rooms_joined_post**](docs/RoomsApi.md#rooms_joined_post) | **POST** /rooms/joined | Joins a room.
*RoomsApi* | [**rooms_joined_room_name_delete**](docs/RoomsApi.md#rooms_joined_room_name_delete) | **DELETE** /rooms/joined/{roomName} | Leaves a room.
*RoomsApi* | [**rooms_joined_room_name_get**](docs/RoomsApi.md#rooms_joined_room_name_get) | **GET** /rooms/joined/{roomName} | Gets the specified room.
*RoomsApi* | [**rooms_joined_room_name_members_post**](docs/RoomsApi.md#rooms_joined_room_name_members_post) | **POST** /rooms/joined/{roomName}/members | Adds a member to a private room.
*RoomsApi* | [**rooms_joined_room_name_messages_get**](docs/RoomsApi.md#rooms_joined_room_name_messages_get) | **GET** /rooms/joined/{roomName}/messages | Gets the current list of messages for the specified room.
*RoomsApi* | [**rooms_joined_room_name_messages_post**](docs/RoomsApi.md#rooms_joined_room_name_messages_post) | **POST** /rooms/joined/{roomName}/messages | Sends a message to the specified room.
*RoomsApi* | [**rooms_joined_room_name_ticker_post**](docs/RoomsApi.md#rooms_joined_room_name_ticker_post) | **POST** /rooms/joined/{roomName}/ticker | Sets a ticker for the specified room.
*RoomsApi* | [**rooms_joined_room_name_users_get**](docs/RoomsApi.md#rooms_joined_room_name_users_get) | **GET** /rooms/joined/{roomName}/users | Gets the current list of users for the specified room.
*SearchesApi* | [**searches_get**](docs/SearchesApi.md#searches_get) | **GET** /searches | Gets the list of active and completed searches.
*SearchesApi* | [**searches_id_delete**](docs/SearchesApi.md#searches_id_delete) | **DELETE** /searches/{id} | Deletes the search corresponding to the specified id.
*SearchesApi* | [**searches_id_get**](docs/SearchesApi.md#searches_id_get) | **GET** /searches/{id} | Gets the state of the search corresponding to the specified id.
*SearchesApi* | [**searches_id_put**](docs/SearchesApi.md#searches_id_put) | **PUT** /searches/{id} | Stops the search corresponding to the specified id.
*SearchesApi* | [**searches_id_responses_get**](docs/SearchesApi.md#searches_id_responses_get) | **GET** /searches/{id}/responses | Gets the state of the search corresponding to the specified id.
*SearchesApi* | [**searches_post**](docs/SearchesApi.md#searches_post) | **POST** /searches | Performs a search for the specified request.
*ServerApi* | [**server_delete**](docs/ServerApi.md#server_delete) | **DELETE** /server | Disconnects the client.
*ServerApi* | [**server_get**](docs/ServerApi.md#server_get) | **GET** /server | Retrieves the current state of the server.
*ServerApi* | [**server_put**](docs/ServerApi.md#server_put) | **PUT** /server | Connects the client.
*SessionApi* | [**session_enabled_get**](docs/SessionApi.md#session_enabled_get) | **GET** /session/enabled | Checks whether security is enabled.
*SessionApi* | [**session_get**](docs/SessionApi.md#session_get) | **GET** /session | Checks whether the provided authentication is valid.
*SessionApi* | [**session_post**](docs/SessionApi.md#session_post) | **POST** /session | Logs in.
*SharesApi* | [**shares_contents_get**](docs/SharesApi.md#shares_contents_get) | **GET** /shares/contents | Returns a list of all shared directories and files.
*SharesApi* | [**shares_delete**](docs/SharesApi.md#shares_delete) | **DELETE** /shares | Cancels a share scan, if one is running.
*SharesApi* | [**shares_get**](docs/SharesApi.md#shares_get) | **GET** /shares | Gets the current list of shares.
*SharesApi* | [**shares_id_contents_get**](docs/SharesApi.md#shares_id_contents_get) | **GET** /shares/{id}/contents | Gets the contents of the share associated with the specified <see paramref=\"id\" />.
*SharesApi* | [**shares_id_get**](docs/SharesApi.md#shares_id_get) | **GET** /shares/{id} | Gets the share associated with the specified <see paramref=\"id\" />.
*SharesApi* | [**shares_put**](docs/SharesApi.md#shares_put) | **PUT** /shares | Initiates a scan of the configured shares.
*TransfersApi* | [**transfers_downloads_all_completed_delete**](docs/TransfersApi.md#transfers_downloads_all_completed_delete) | **DELETE** /transfers/downloads/all/completed | Removes all completed downloads, regardless of whether they failed or succeeded.
*TransfersApi* | [**transfers_downloads_get**](docs/TransfersApi.md#transfers_downloads_get) | **GET** /transfers/downloads | Gets all downloads.
*TransfersApi* | [**transfers_downloads_username_get**](docs/TransfersApi.md#transfers_downloads_username_get) | **GET** /transfers/downloads/{username} | Gets all downloads for the specified username.
*TransfersApi* | [**transfers_downloads_username_id_delete**](docs/TransfersApi.md#transfers_downloads_username_id_delete) | **DELETE** /transfers/downloads/{username}/{id} | Cancels the specified download.
*TransfersApi* | [**transfers_downloads_username_id_get**](docs/TransfersApi.md#transfers_downloads_username_id_get) | **GET** /transfers/downloads/{username}/{id} |
*TransfersApi* | [**transfers_downloads_username_id_position_get**](docs/TransfersApi.md#transfers_downloads_username_id_position_get) | **GET** /transfers/downloads/{username}/{id}/position | Gets the downlaod for the specified username matching the specified filename, and requests the current place in the remote queue of the specified download.
*TransfersApi* | [**transfers_downloads_username_post**](docs/TransfersApi.md#transfers_downloads_username_post) | **POST** /transfers/downloads/{username} | Enqueues the specified download.
*TransfersApi* | [**transfers_uploads_all_completed_delete**](docs/TransfersApi.md#transfers_uploads_all_completed_delete) | **DELETE** /transfers/uploads/all/completed | Removes all completed uploads, regardless of whether they failed or succeeded.
*TransfersApi* | [**transfers_uploads_get**](docs/TransfersApi.md#transfers_uploads_get) | **GET** /transfers/uploads | Gets all uploads.
*TransfersApi* | [**transfers_uploads_username_get**](docs/TransfersApi.md#transfers_uploads_username_get) | **GET** /transfers/uploads/{username} | Gets all uploads for the specified username.
*TransfersApi* | [**transfers_uploads_username_id_delete**](docs/TransfersApi.md#transfers_uploads_username_id_delete) | **DELETE** /transfers/uploads/{username}/{id} | Cancels the specified upload.
*TransfersApi* | [**transfers_uploads_username_id_get**](docs/TransfersApi.md#transfers_uploads_username_id_get) | **GET** /transfers/uploads/{username}/{id} | Gets the upload for the specified username matching the specified filename.
*UsersApi* | [**users_username_browse_get**](docs/UsersApi.md#users_username_browse_get) | **GET** /users/{username}/browse | Retrieves the files shared by the specified username.
*UsersApi* | [**users_username_browse_status_get**](docs/UsersApi.md#users_username_browse_status_get) | **GET** /users/{username}/browse/status | Retrieves the status of the current browse operation for the specified username, if any.
*UsersApi* | [**users_username_directory_post**](docs/UsersApi.md#users_username_directory_post) | **POST** /users/{username}/directory | Retrieves the files from the specified directory from the specified username.
*UsersApi* | [**users_username_endpoint_get**](docs/UsersApi.md#users_username_endpoint_get) | **GET** /users/{username}/endpoint | Retrieves the address of the specified username.
*UsersApi* | [**users_username_info_get**](docs/UsersApi.md#users_username_info_get) | **GET** /users/{username}/info | Retrieves information about the specified username.
*UsersApi* | [**users_username_status_get**](docs/UsersApi.md#users_username_status_get) | **GET** /users/{username}/status | Retrieves status for the specified username.## Documentation For Models
- [AddressFamily](docs/AddressFamily.md)
- [ApiKeyOptions](docs/ApiKeyOptions.md)
- [BlacklistedOptions](docs/BlacklistedOptions.md)
- [BufferOptions](docs/BufferOptions.md)
- [BuiltInOptions](docs/BuiltInOptions.md)
- [CertificateOptions](docs/CertificateOptions.md)
- [ConnectionOptions](docs/ConnectionOptions.md)
- [Conversation](docs/Conversation.md)
- [DiagnosticLevel](docs/DiagnosticLevel.md)
- [DirectoriesOptions](docs/DirectoriesOptions.md)
- [Directory](docs/Directory.md)
- [DirectoryContentsRequest](docs/DirectoryContentsRequest.md)
- [DistributedNetworkOptions](docs/DistributedNetworkOptions.md)
- [FeatureOptions](docs/FeatureOptions.md)
- [File](docs/File.md)
- [FileAttribute](docs/FileAttribute.md)
- [FileAttributeType](docs/FileAttributeType.md)
- [FiltersOptions](docs/FiltersOptions.md)
- [FlagsOptions](docs/FlagsOptions.md)
- [FtpOptions](docs/FtpOptions.md)
- [GlobalDownloadOptions](docs/GlobalDownloadOptions.md)
- [GlobalOptions](docs/GlobalOptions.md)
- [GlobalUploadOptions](docs/GlobalUploadOptions.md)
- [GroupsOptions](docs/GroupsOptions.md)
- [HttpsOptions](docs/HttpsOptions.md)
- [IPAddress](docs/IPAddress.md)
- [IPEndPoint](docs/IPEndPoint.md)
- [Info](docs/Info.md)
- [IntegrationOptions](docs/IntegrationOptions.md)
- [JwtOptions](docs/JwtOptions.md)
- [LeecherOptions](docs/LeecherOptions.md)
- [LoggerOptions](docs/LoggerOptions.md)
- [LoginRequest](docs/LoginRequest.md)
- [MessageDirection](docs/MessageDirection.md)
- [MetricsAuthenticationOptions](docs/MetricsAuthenticationOptions.md)
- [MetricsOptions](docs/MetricsOptions.md)
- [Options](docs/Options.md)
- [PrivateMessage](docs/PrivateMessage.md)
- [ProblemDetails](docs/ProblemDetails.md)
- [ProxyOptions](docs/ProxyOptions.md)
- [PushbulletOptions](docs/PushbulletOptions.md)
- [QueueDownloadRequest](docs/QueueDownloadRequest.md)
- [RelayAgentConfigurationOptions](docs/RelayAgentConfigurationOptions.md)
- [RelayControllerConfigurationOptions](docs/RelayControllerConfigurationOptions.md)
- [RelayOptions](docs/RelayOptions.md)
- [Room](docs/Room.md)
- [RoomInfo](docs/RoomInfo.md)
- [RoomMessage](docs/RoomMessage.md)
- [SearchOptions](docs/SearchOptions.md)
- [SearchRequest](docs/SearchRequest.md)
- [ServerState](docs/ServerState.md)
- [Share](docs/Share.md)
- [ShareCacheOptions](docs/ShareCacheOptions.md)
- [SharesOptions](docs/SharesOptions.md)
- [SoulseekClientStates](docs/SoulseekClientStates.md)
- [SoulseekOptions](docs/SoulseekOptions.md)
- [Status](docs/Status.md)
- [ThresholdOptions](docs/ThresholdOptions.md)
- [TimeoutOptions](docs/TimeoutOptions.md)
- [TokenResponse](docs/TokenResponse.md)
- [Transfer](docs/Transfer.md)
- [TransferDirection](docs/TransferDirection.md)
- [TransferStates](docs/TransferStates.md)
- [UploadOptions](docs/UploadOptions.md)
- [UserData](docs/UserData.md)
- [UserDefinedOptions](docs/UserDefinedOptions.md)
- [UserPresence](docs/UserPresence.md)
- [WebAuthenticationOptions](docs/WebAuthenticationOptions.md)
- [WebOptions](docs/WebOptions.md)
## Documentation For AuthorizationAuthentication schemes defined for the API:
### ApiKeyAuth- **Type**: API key
- **API key parameter name**: X-API-KEY
- **Location**: HTTP header## Author