AlexandreSenpai / Enma

Enma is a Python library designed to fetch and download manga and doujinshi data from many sources including Manganato and NHentai.
MIT License
94 stars 17 forks source link

Difference Between `get()` and `search()`? #68

Closed SakiSakiSakiSakiSaki closed 7 months ago

SakiSakiSakiSakiSaki commented 7 months ago

I'd appreciate if the readme.md could provide more usage examples and their differences. Just single line examples would be great, and maybe even example responses so we'd know what to expect.

AlexandreSenpai commented 7 months ago

Hello @SakiSakiSakiSakiSaki

# This method fetches the manga directly by its id if you already know based on the source that youre using.
# For example: I know that 1234 refers to doujin x on NHentai so i can use `.get` to directly access it.
manga = enma.get(identifier="1234")
# Now, you can use `.search` if you dont know whats the id of a manga or 
# whether you dont know if it exists on the current source.
results = enma.search(query="monster musume", page=1)
SakiSakiSakiSakiSaki commented 7 months ago

Hello @SakiSakiSakiSakiSaki

# This method fetches the manga directly by its id if you already know based on the source that youre using.
# For example: I know that 1234 refers to doujin x on NHentai so i can use `.get` to directly access it.
manga = enma.get(identifier="1234")
# Now, you can use `.search` if you dont know whats the id of a manga or 
# whether you dont know if it exists on the current source.
results = enma.search(query="monster musume", page=1)

Thanks for this. It'd be nice if you included this in the readme!

AlexandreSenpai commented 7 months ago

Closed this issue as the documentation was updated including the entrypoint methods explanation. https://enma.gitbook.io/enma/documentation/entrypoint-methods