Skip to content

Wiki Browser #45

@coderedart

Description

@coderedart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions