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

Document Algodv2 methods #486

Merged
merged 5 commits into from
Jan 10, 2022
Merged

Conversation

fionnachan
Copy link
Contributor

@fionnachan fionnachan commented Dec 15, 2021

smile with tear
I was looking at this repo's source code and cross-checking with the REST APIs doc and got super annoyed....

Live Deployment
https://js-algosdk.netlify.app/classes/algodv2

Copy link
Member

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution, this is a great improvement! I just have a few comments

Comment on lines 191 to 193
* const getPendingTxns = algodClient.pendingTransactionsInformation();
* getPendingTxns.max(maxTxns);
* const pendingTxns = await getPendingTxns.do();
Copy link
Member

Choose a reason for hiding this comment

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

nit: a simpler way to do this would be:

const pendingTxns = await algodClient
    .pendingTransactionsInformation()
    .max(maxTxns)
    .do();

Also applies to pendingTransactionByAddress

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh right, done! btw pendingTransactionByAddress is returning PendingTransactionsByAddress 🤔

@@ -66,6 +68,7 @@ export default abstract class ServiceClient {
}

/**
* @ignore
Copy link
Member

Choose a reason for hiding this comment

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

Why ignore this? It's a useful method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought developers using the sdk probably don't need to know about it

* ```
* @remarks
* The above configuration is for a sandbox private network.
* For applications on production, you are encouraged to run your own node, or use an Algorand REST API provider with a dedicated API key.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given the recent outage, I've changed the base server example from algoexplorer to sandbox and added the remarks. Can you see if this is okay? @jasonpaulos

Copy link
Member

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, this looks good!

@jasonpaulos jasonpaulos merged commit 8572eff into algorand:develop Jan 10, 2022
aldur pushed a commit that referenced this pull request Jan 20, 2022
* Document Algodv2 methods

* Link to relevant methods on Algodv2 doc

* Replace algoexplorer api with sandbox api

* Clean up pendingTxns examples

* Show setIntEncoding method on docs
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

Successfully merging this pull request may close these issues.

None yet

2 participants