Skip to content
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

Wiki Browser #45

Open
coderedart opened this issue Jan 31, 2023 · 0 comments
Open

Wiki Browser #45

coderedart opened this issue Jan 31, 2023 · 0 comments
Milestone

Comments

@coderedart
Copy link
Owner

coderedart commented Jan 31, 2023

The idea is to not leave gw2 window when you want to look up an entry in wiki.
https://wiki.guildwars2.com/ is actually a mediawiki server. so, we can use the api exposed by mediawiki.
So, we can use that api in jokolay to render wiki pages in a window within the game itself.

example: https://wiki.guildwars2.com/api.php?action=query&format=json&prop=revisions&titles=Revenant&rvprop=ids%7Ctimestamp%7Cflags%7Ccomment%7Cuser%7Ccontent%7Ccontentmodel%7Ctags&rvslots=*

Fortunately, mediawiki even provides an API sandbox GUI page where we can modify various endpoints and experiment.
example: the above provided api url is generated using https://wiki.guildwars2.com/wiki/Special:ApiSandbox#action=query&format=json&prop=revisions&titles=Revenant&rvprop=ids%7Ctimestamp%7Cflags%7Ccomment%7Cuser%7Ccontent%7Ccontentmodel%7Ctags&rvslots=*

just modify the parameters and get any info you need. we can use the help action to get info about the possible endpoints.
example: getting endpoints/docs of query action -> https://wiki.guildwars2.com/api.php?action=help&modules=query

The returned content of wiki content will use mediawiki formatting
https://wiki.guildwars2.com/wiki/Help:Editing has a helpful guide covering most of the usage includidng templates/images/iwlinks(internal wiki links) etc..
we can probably write a basic renderer for mediawiki using egui.
there's existing api crates too https://github.com/magnusmanske/mediawiki_rust , so we probably don't need to write it.

@coderedart coderedart added this to the Alpha 0.5 milestone Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant