Update _Store_Token for api auth changes, and add several MDList functions #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Auth changes
MangaDex updated their /auth/ endpoint (in 5.8.0 I believe?). This broke the wrapper's login function as the user would technically be logged in, but would receive 401 errors for any user get functions. (The docs don't reflect this yet and is still on version 5.7.5 as of writing, but digging through the mangadex discord I found all that needed to be done was add "Bearer" before the auth token in the Authorization header for requests).
MangaDexPy.MDList
Represents a MangaDex MDList
Yields:
id
strThe UUID of the MDList
name
strThe name of the MDList
visibility
strWhether the list is public or private
titles
Array[str, ...]A list of UUIDs of each manga added to this MDList.
creator
strThe UUID of the user the created the MDList.
MangaDexPy.MangaDex
get_MDList()
Gets a specified MDList from MangaDex
Note that it is only possible to get lists that belong to the user you are logged in as, or if the list is marked as 'public'. Otherwise a 404 not found error will occur.
Returns: A
MDList
objectRaises:
NoContentError
if there is no list with the given UUID, or if the currently logged in user does not have access to view that list.APIError
for any other generic error.Arguments:
uuid
of the MDListget_MDList_feed()
Gets the feed of the specified MDList
Returns: Array[
Chapter
, ...]Raises:
NoResultsError
for empty MDListsArguments:
uuid
of the MDList to get feed for.limit
: How many Chapters to retrieve. Each multiple of 100 will make a new request to the API.params
: Custom dictionary of parameters to pass to the search utilityget_user_MDList()
Gets the currently logged user's MDLists, or a specified user's created MDLists.
As a note, the API docs state that private lists will only be included if you are logged in. Otherwise, only the public lists will be available.
Returns: Array[
MDList
, ...]Raises:
NoResultsError
for empty MDLists orNotLoggedInError
if an issue occurs while authenticating.Arguments:
uuid
of the user to get MDLists from.limit
: How many MDLists to retrieve. Each multiple of 100 will make a new request to the API.get_user_followed_MDList()
Gets the currently logged user's followed MDLists
You must be logged in to use this call.
Returns: Array[
MDList
, ...]Raises:
NoResultsError
when no objects were foundArguments:
limit
: How many MDLists to retrieve. Each multiple of 100 will make a new request to the API.is_following_MDList()
Returns whether the currently logged user is following a specified MDList
You must be logged in to use this call.
Returns: bool
Raises:
NotLoggedInError
if user is not logged inArguments:
uuid
of the MDList to checkSome other notes
One known issue while testing this:
https://mangadex.org/title/d1c0d3f9-f359-467c-8474-0b2ea8e06f3d/bocchi-sensei-teach-me-mangadex
Lists are listed on the API as CustomList, but it seems this is an older name.
This should be most, if not all the GET methods related to CustomLists.
This is my first time make a PR on github, I apologize if there's some oddity while making this.