-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
scripts/generate-docs.js
Outdated
|
||
const methods = [ | ||
{ | ||
name: "authWithAPIKey", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm dead link
There was a problem hiding this comment.
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
There was a problem hiding this 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
I agree. Created #33 to track this issue and add a Get Started section. |
The updated doc is deployed and live on: https://avaprotocol.org/docs/ethereum/develop/js-sdk#usage-authentication-api-key-authentication |
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