-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Plugin API #7
Comments
Sorry for the long delay, and thanks for taking on this! Backward compatibility won't be an issue because we should let plugin developers specify the API version they are targeting. For example, we can add a Everything else looks good as a first draft. Now I just need to take some time to actually implement this into the main app, and along the way I might be able to find ways to improve the draft. Again thanks a lot for the help! Feel free to throw in any new ideas. |
I put together something here: https://github.com/hkalexling/mango-plugins/wiki/Development-Guideline-v2-(RFC). The new API would allow authentication (with the new Feel free to let me know if you have any suggestions! |
That looks really nice! The I do have a question regarding the manga/chapter ID. Currently the id can only contain alphanumerical characters or underscores, is this a limitation of Duktape, and if not, would it be possible to allow more special characters? For sites that have a backend API, they usually have a mangaID that fits within the current limitations, but sites that have to be scraped, the manga ID ends up having to contain either key parts of the URL or the entire URL itself. If it's the former, extra encoding/decoding has to occur to extract these parts (e.g. storing the chapter ID of a chapter like Other than that, I don't have any suggestions. Thank you for the time you spend on mango! |
Ah yes good point! Currently we are doing some hacky string manipulation to retrieve the plugin ID and chapter ID, so we don't want them to contain hyphens. I think we can get rid of this hacky code and directly store the two IDs explicitly in the DB. In this way we don't have to restrict the chapters in the chapter IDs. Thanks for the suggestion! |
Requirements
Below is what I've drafted. Let me know if the number of variables seems right and if any other changes need to be made. I've written a description as to what they are for / rationale for adding them.
getSeries(query)
The function is called by Mango when the user searches something on the plugin download page (
/download/plugins
), andquery
is a string containing the user's input.The function should return a JSON stringified object with all of the following required variables and any of the optional ones.
Series
Chapter
Example:
When a user searches for a manga, the returned metadata is displayed on the download UI.
id
.genres
list since tags are currently supported.I think
selectChapter(id)
&nextPage()
work fine and don't need to be changed, but let me know what you think.I've based the variables around what the MangaDex & CatManga API normally return, so designing plugins for these should be easy. Other sites should be good too, since all these new variables are optional.
Let me know if there are anything that can be improved! :)
The text was updated successfully, but these errors were encountered: