SteemVBS - Adding Reputation, GetProfile, GetWitnessVotes, ValidateAccountName

in #utopian-io6 years ago (edited)


SteemVBS is the first Steem Library written in VBScript. Yes, it is VBScript. ;)

SteemVBS

VBScript is still being used nowadays, especially on windows platforms. You can do so much thing using VBScript. The aim of the SteemVBS is to provide a few useful functions that connect Network Adminstrators or MS Officer users (via VBA) to Steem Blockchain.

Fully open source: https://github.com/DoctorLai/steemvbs
Submit PR or Issue.

New Features

Commits: A few functions/classes and unit tests have been added in:

Formater Reputation

Dim Format
Set Format = New Formatter

Const EPSILON = 1e-3

AssertEqualFloat Format.Reputation(95832978796820), 69.833, EPSILON, "Format.Reputation 95832978796820"

AssertEqualFloat Format.Reputation(10004392664120), 61.0017, EPSILON, "Format.Reputation 10004392664120"

AssertEqualFloat Format.Reputation(30999525306309), 65.42219, EPSILON, "Format.Reputation 30999525306309"

AssertEqualFloat Format.Reputation(-37765258368568), -16.193832, EPSILON, "Format.Reputation -37765258368568"

Set Format = Nothing

ValidateAccountName

' Test ValidateAccountName

Dim u
Set u = New Utility

AssertEqual u.ValidateAccountName("justyy"), "", ""

AssertEqual u.ValidateAccountName("justyy**"), "Account name should have only letters, digits, or dashes.", ""

AssertEqual u.ValidateAccountName("a    "), "Account name should have only letters, digits, or dashes.", ""

AssertEqual u.ValidateAccountName("12341234"), "Account name should start with a letter.", ""

AssertEqual u.ValidateAccountName("  askd f"), "Account name should start with a letter.", ""

AssertEqual u.ValidateAccountName("-"), "Account name should be longer.", ""

AssertEqual u.ValidateAccountName("-aasdfasdfasdfasdfasdfasdfasdfasdf"), "Account name should be shorter.", ""

Set u = Nothing

Get Profile String

Dim SteemIt
Set SteemIt = New Steem

WScript.Echo SteemIt.GetAccount_Profile("justyy")

Get Witness Votes

' test GetAccount_WitnessVotes

Dim SteemIt
Set SteemIt = New Steem

Dim Util
Set Util = New Utility

Dim witness
witness = SteemIt.GetAccount_WitnessVotes("justyy")

AssertTrue Util.InArray("abit", witness), "justyy should vote abit"

AssertTrue Util.InArray("jerrybanfield", witness), "justyy should vote jerrybanfield"

Set SteemIt = Nothing
Set Util = Nothing

Roadmap

Most of the features of Steem-Js and Steem-Python will be brought in.

Notice

This library is under development. Beware.


Support me and my work as a witness by

  1. voting me here, or
  2. voting me as a proxy

Some of my contributions: SteemIt Tools, Bots, APIs and Tutorial Thank you!

Sort:  

It's funny to see some VB! It's been ages since I used it :D
I'm curious though, do you have a real world example where your library would used? It's not to criticize I'm genuinely curious. No colleagues or freelancers I know uses VB anymore.

It's really great that you provided tests with your library. Did you develop it using the Test Driven Development method ?

Good luck to you in adding the features provided by the libraries written in the other languages!

Your contribution has been evaluated according to Utopian rules and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post,Click here


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your moderation. One possible usages would be to deal with steem data in the excel spread sheets via VBA.
I write tests roughly at the same time when I develop features.. so I guess this is TDD.

Hey @justyy
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

cool ! Great work !

Coin Marketplace

STEEM 0.36
TRX 0.12
JST 0.040
BTC 70839.13
ETH 3563.41
USDT 1.00
SBD 4.77