-
Notifications
You must be signed in to change notification settings - Fork 9
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
remove inconsistencies #1
remove inconsistencies #1
Conversation
Hi Patrick, thanks for your contribution! Unfortunately I have to close your PR: we left the PENDING parameter out of the properties table on purpose as we do not consider it as a "return property". It is similar to the response CODE / DESCRIPTION and gives you information about the executed transaction. [RESPONSE] -> Only parameters that are included in the response as "PROPERTY[XXX][X] = XXX" are considered as return properties and show up in the table. The rest of your proposed changes are reflected in the latest commit to the master. Cheers, |
Hello Daniel, I'm glad I could help! Can you think of any way to document the PENDING field in a machine-readable way? We are currently stumbling over it. We also have a problem with the USER/ORDER/EXECUTEORDER command, because there is no information about which properties the response can have. Can this be documented somehow? |
To find out for which commands "PENDING=1" might be included in the response you could just match for the string "NOTE: The response might include the parameter 'PENDING = 1'" for now. We will look into this and try to find a way of including that information which is easier to parse. Regarding the ExecuteOrder command: We haven't included any explicit return properties into the documentation as the return properties always depend on the kind of order that's being executed. |
What is the recommended way to check if pending is set? There is no special method for it in the node sdk. |
Dear @patrickhilker, thanks for getting in touch with us. I will work on an implementation of this in node-sdk. You may add yourself as watcher/follower to the node-sdk repository, to get updated when things are released. |
Awesome, thank you! :-) |
@patrickhilker give v5.5.0 of our node-sdk a try. got already auto-published on npm. const apiconnector = require('@hexonet/ispapi-apiconnector')
const cl = new apiconnector.APIClient()
//... apply your credential config etc.
const r = await cl.request(mycommand);
if (r.isPending()){
console.log('operation is still pending');
} else {
console.log('operation has finished');
} give it a try. |
There are several minor inconsistencies in the documentation which make it hard to machine-read it. :-)