Download file set
The DownloadFileSet class defines the properties of a Download list item.
- class newsbinpro_client.downloadfileset.DownloadFileSet(data)
Bases:
objectRepresents a set of downloadable files, providing functionality to parse and manage file-related properties and statuses based on the input data.
- property file_size: int
- Returns:
The size of the file in bytes.
- property item_id: int
- Returns:
The unique identifier of the object.
- Return type:
int
- parse_download(strings: List[str]) None
Parses and extracts information related to a download from a list of strings.
- Parameters:
strings – A list of strings containing specific information about the download.
- Returns:
None
- parse_header(strings: List[str]) None
Parses the header information from a list of strings, extracting and processing specific values to update properties.
- Parameters:
strings – List of strings containing header-related information. It is expected to have specific indices populated with data for subject and size calculations.
- Returns:
None
- parse_repair(strings: List[str]) None
Parses and extracts information related to a repair from a list of strings.
- Parameters:
strings – List of strings passed as input. Not directly used in the function.
- Returns:
None. This method processes and updates internal instance variables.
- parse_unpack(strings: List[str]) None
Parses the input list of strings and updates the object’s download status.
- Parameters:
strings – A list of strings to be parsed for updating download status.
- Returns:
None
- property poster: str
- Returns:
The poster string that represents the corresponding attribute.
- property subject: str
- Returns:
The subject as a string.
- property time_stamp: datetime
- Returns:
The timestamp as a datetime object.
- Return type:
datetime.datetime
- class newsbinpro_client.downloadfileset.FileSetType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
EnumAn enumeration that defines the types of file sets used in the application.
- Attributes:
Header: Represents a file set containing header files. Assigned the value 1. Download: Represents a file set used for downloading files. Assigned the value 2. Repair: Represents a file set used for file repair operations. Assigned the value 3. Unpack: Represents a file set used for unpacking files. Assigned the value 4.
- Download = 2
- Header = 1
- Repair = 3
- Unpack = 4