sxcu.SXCU¶
-
class
sxcu.
SXCU
(subdomain: str = None, upload_token: str = None, file_sxcu: str = None)¶ The Main class for sxcu.net request
-
__init__
(subdomain: str = None, upload_token: str = None, file_sxcu: str = None) → None¶ This initialise the handler
- Parameters
subdomain (
str
, optional) – The subdomain you get from sxcu.netupload_token (
str
, optional) – The upload token that comes along with subdomainfile_sxcu (
str
,optional) –The sxcu file you have got. Parses only
RequestURL
andupload_token
.Note
The content in
.sxcu
file has more priority than passed parameters.
Methods
This initialise the handler
This method is deprecated.
Get collection details and list of images (if any are uploaded) for a given collection.
Create a new collection on sxcu.net.
Creates a new link.
Deletes images from sxcu.net
This method is deprecated.
Get basic details about an image on sxcu.net or any of its subdomain
This method is deprecated.
This lists all the public domains available, sorted by upload count.
This uploads image to sxcu
This method is deprecated.
Uploads an text to sxcu.net (via cancer-co.de)
-
static
collection_details
(*args: Any, **kwargs: Any) → Union[dict, list]¶ This method is deprecated. Use
collection_meta()
instead.
-
static
collection_meta
(collection_id: str) → Union[dict, list]¶ Get collection details and list of images (if any are uploaded) for a given collection.
-
static
create_collection
(title: str, private: bool = False, unlisted: bool = False, desc: Optional[str] = None) → Union[dict, list]¶ Create a new collection on sxcu.net.
Note
If you are creating one time / bot collections you must make them unlisted!
- Parameters
- Returns
The returned JSON from the request.
- Return type
-
static
domain_list
(*args: Any, **kwargs: Any) → Union[dict, list]¶ This method is deprecated.
Use
list_subdomain()
instead.
-
static
file_meta
(file_id: str = None, file_url: str = None, image_id: str = None, image_url: str = None) → Union[dict, list]¶ Get basic details about an image on sxcu.net or any of its subdomain
- Parameters
file_id (
str
) –The id of the image. For example, if
https://sxcu.net/QNeo92
is the image URL thenQNeo92
will be theimage_id
.Note
The
image_id
can be from any subdomain also as alway the id would be same.file_url (
str
) – The image URL returned of successfully upload. For example,https://sxcu.net/QNeo92
. Either one of :param:`file_id` or :param:`file_url` is required.
- Returns
The returned JSON from the request.
- Return type
-
static
image_details
(*args: Any, **kwargs: Any) → Union[dict, list]¶ This method is deprecated.
Use
file_meta()
instead.
-
static
list_subdomain
(count: int = - 1) → list¶ This lists all the public domains available, sorted by upload count.
-
upload_file
(file: str, collection: Optional[str] = None, collection_token: Optional[str] = None, noembed: Optional[bool] = False, og_properties: Optional[sxcu.og_properties.OGProperties] = None, self_destruct: bool = False) → Union[dict, list]¶ This uploads image to sxcu
- Parameters
file – The path of File to Upload
collection – The collection ID to which you want to upload to if you want to upload to a collection
collection_token – The collection upload token if one is required by the collection you’re uploading to.
noembed – If
True
, the uploader will return a direct URL to the uploaded image, instead of a dedicated page.og_properties – This will configure the OpenGraph properties of the file’s page, effectively changing the way it embeds in various websites and apps.
self_destruct – If
True
, the file will be deleted automatically after 24 hours.
- Returns
The returned JSON from the request.
- Return type
- Raises
SXCUError – Any error from the request side.
-
upload_image
(*args: Any, **kwargs: Any) → Union[dict, list]¶ This method is deprecated. Use
upload_file()
instead.
-