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

Added scripts of generating SDK references #32

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Conversation

chrisli30
Copy link
Member

@chrisli30 chrisli30 commented Nov 22, 2024

Adde this script to help us generate the SDK references from the src/index.ts file.

The generated documentation is copied to https://avaprotocol.org/docs/ethereum/develop/js-sdk


const methods = [
{
name: "authWithAPIKey",
Copy link
Member

@v9n v9n Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not publicly document authWithAPIKey for now. Considering it's a private api for now. There is no way for an end-user to acquire this key. after we implemented an oauth process where application can register to get app id and api key then we can start annouce this. right now, no one can actually use this or should use this yet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that’s a good call. I removed it from this PR.

@@ -0,0 +1,228 @@
/**
* This script generates the SDK reference documentation based on the methods array defined at the beginning of the file.
* For a generated example, please refer to https://avaprotocol.org/docs/ethereum/develop/js-sdk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm dead link

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link was on staging website.
https://oak-website-git-staging-avaprotocol.vercel.app/docs/ethereum/develop/js-sdk

I’m deploying it to main

Copy link
Member

@v9n v9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.

is this a simplify jsdoc ?

i also like the approach of https://docs.ethers.org/v6/api/ where they had getting started to guide end-user through a how-to style, and the api docs look up when you know how to use it, you just need to look up api doc.

i think eventually we should incoporate that kind of style into our https://avaprotocol.org/docs/ethereum/develop/api-reference

v9n
v9n previously approved these changes Nov 22, 2024
@chrisli30
Copy link
Member Author

looks good to me.

is this a simplify jsdoc ?

i also like the approach of https://docs.ethers.org/v6/api/ where they had getting started to guide end-user through a how-to style, and the api docs look up when you know how to use it, you just need to look up api doc.

i think eventually we should incoporate that kind of style into our https://avaprotocol.org/docs/ethereum/develop/api-reference

I agree. Created #33 to track this issue and add a Get Started section.

@chrisli30
Copy link
Member Author

@chrisli30 chrisli30 merged commit 126e777 into main Nov 22, 2024
3 of 4 checks passed
@chrisli30 chrisli30 deleted the chris-add_docs_scripts branch November 22, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants