Releases: Taschenbuch/gw2-api-mock
gw2-api-mock
What is this?
- A tool to mock the gw2 api for blish hud to fake and edit gw2 api responses. It helps developing Blish hud modules that require api access. e.g. you can change the amount of gold on an account on the fly, add or modify existing characters (name, race, inventory, ... ). You can basically fake a whole gw2 account this way to test different situations your module will run into or has to process.
How to use
- Download the gw2-api-mock and blish hud zips at the bottom of this page and unpack them.
- Start debugging your module in visual studio with the blish exe from the zip.
- Start the gw2-api-mock.exe and click on the help button to see how to use the app.
Why use blish hud zip instead of offical blish hud?
- Blish does not support changing the gw2 api url used by gw2sharp. So it has to be manually compiled into blish. The only change required to the offical Blish hud version is to add this line: see screenshot
- If you want to do that yourself, dont forget to compile blish in "release" instead of "debug" mode. Otherwise you will get nvidia settings test exceptions every time you try to debug your module.
Edit Api responses
Api responses can be easily edited with a text editor like visual studio code. Example of v2/account/wallet api endpoint response. e.g. the value for id = 1 is the gold amount on the account in copper:
Why is gw2-api-mock app size so big?
The app code itself is just 3 MB. But it is a electron web app. Electron is a fancy way of allowing web developers to use web technologies (javascript, html, css) to create desktop applications. E.g. discord, Teams, Zoom and visual studio code are also electron apps. Each electron app includes a browser (chromium) and a runtime (NodeJs) which is already 150-200 MB even without the app code.
Can some hacker access my pc when this app creates a web server?
No, it runs a localhost web server. It is not possible to access this web server from another PC in the network because localhosts are special hosts (hostname, ip) used for testing purposes. Windows just acts as if those are real URLs, but handles requests and responses to and from them completely locally which makes remote access impossible. https://en.wikipedia.org/wiki/Localhost
Where is the source code?
This is a heavily modified version of a private, non-gw2, not-yet-open-sourced project of mine. So I dont want to publish the source code.