Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `hentai` class now has two more static methods for parsing: - `get_url(json: dict) -> str` - `get_api(json: dict) -> str` In some places, the formatting for doc strings was improved. More importantly, as discussed in issue #5, an export method - `def export(self, filename: Path, options: List[Option]=None) -> None` was implemented (which in turn also has an function counterpart in `Utils`). For this reason, an new enum class `Options` was added to the main file. Moreover, some functions now take a `make_request` parameter, namely - `def exists(id: int, make_request: bool=True) -> bool` - `def get_random_id(make_request: bool=True, handler=RequestHandler()) -> int` - `def get_random_hentai(make_request: bool=True) -> Hentai` Instead of making a request, an random `id` will be read from a local file. Note that this is an experimental feature and has some obvious caveats, since this information is at risk of becoming out of date soon.
- Loading branch information
1 parent
e79498e
commit c7046e0
Showing
1 changed file
with
202 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters