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

Are the docs out of date? #469

Open
edukaded opened this issue Jan 22, 2020 · 4 comments
Open

Are the docs out of date? #469

edukaded opened this issue Jan 22, 2020 · 4 comments

Comments

@edukaded
Copy link

edukaded commented Jan 22, 2020

I am getting a strange error.
My code is literally taken right off the front page...

steem.api.getDiscussionsByPayout(query, function(err, result) {
  console.log(err, result);
});

The error I get is

Error [RPCError]: Assert Exception:method_itr != api_itr->second.end(): Could not find method get_discussions_by_payout
    at new RPCError (/home/username/Projects/steem-manager/node_modules/steem/lib/api/transports/http.js:43:106)
    at /home/username/Projects/steem-manager/node_modules/steem/lib/api/transports/http.js:93:13
    at processTicksAndRejections (internal/process/task_queues.js:94:5) {
  name: 'RPCError',
  code: -32002,
  data: {
    code: 10,
    name: 'assert_exception',
    message: 'Assert Exception',
    stack: [ [Object] ]
  }
}

Expected behavior

I expected that line of code to work, perhaps with a limit, (would be nice if query were documented somewhere)

Actual behavior

It threw the above error

How to reproduce

Run the sample code from the readme

Environment information

Ubuntu Bionic, Node 10

My guess is the docs are out of date and possibly the code. Is there a way to get a list of what is expected to work now days? Also is there someplace where query is documented? Thanks!

@roadscape
Copy link
Contributor

Could you share the script?

@edukaded
Copy link
Author

Actually the script was literally just that line, but it looks like there is quite a bit that's out of date. For example...

for(let name of names){
            let results = await steem.api.getAccountVotesAsync(name);
            console.debug("result: ",results);
}
result:  {
  error: {
    code: -32000,
    message: 'get_account_votes is no longer supported, for details see https://steemit.com/steemit/@steemitdev/additional-public-api-change (hivemind-alpha)'
  }
}

https://steemit.com/steemit/@steemitdev/additional-public-api-change

getAccountVotes is no longer supported and I don't see anything for the suggested replacement of using database_api.list_votes

I'm not seeing a function that maps to this database_api.list_votes, and I don't see how to use steemjs to call it.
Is there a tutorial I'm missing somewhere?

@roadscape
Copy link
Contributor

Regarding list_votes, here is docs: https://developers.steem.io/apidefinitions/#database_api.list_votes

@roadscape
Copy link
Contributor

Regarding getDiscussionsByPayout, could you please share the full script, including the definition of query param?

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

2 participants