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

HTTP API Documentation #591

Open
Daomephsta opened this issue Jul 16, 2022 · 5 comments
Open

HTTP API Documentation #591

Daomephsta opened this issue Jul 16, 2022 · 5 comments

Comments

@Daomephsta
Copy link

Daomephsta commented Jul 16, 2022

I'm currently attempting to launch Improved Initiative from an adhoc local HTML site I use for DM notes.
I've found mention of API endpoints (#46, #231), but no documentation. Are these endpoints meant for general usage at all?

@JaiSpicer
Copy link

Did you get any details on this one?

@Daomephsta
Copy link
Author

@JaiSpicer No, I ended up deciding to build my own adhoc initiative tracker. It's less feature rich than Improved Initiative, but in some ways it suits my purposes better.

@cynicaloptimist
Copy link
Owner

There's no dedicated documentation for this, but there is an example of a minimal POST request that can launch an encounter similar to what Kobold Fight Club does:
https://github.com/cynicaloptimist/improved-initiative/blob/development/test-post.html
As long as the payload conforms to the StatBlock type, it should work as expected; you can include any supported parts of the StatBlock:
https://github.com/cynicaloptimist/improved-initiative/blob/development/common/StatBlock.ts

@dprothero
Copy link
Contributor

Thanks @cynicaloptimist ! Any thoughts about supporting pulling in data from it (e.g. lists of encounters, characters, etc)? I could probably achieve this with a Chrome plugin. Or, perhaps I could open a PR that allowed for some kind of extension system for II. It could allow for adding an extension from another site which it loads in a protected iframe and then provide an api object to the iframe to allow it to pull in the user's info.

Nothing pressing, just brainstorming ideas.

@cynicaloptimist
Copy link
Owner

I likely won't make the time to work on this API any time soon. Thanks for the suggestions though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants