Steemit AutoIT UDF

in #programmieren7 years ago

Hallo Steemit,


Ich arbeite im Moment an einer UDF für die Sprache AutoIT um mit der Steemit Blockchain zu interagieren. 

Ich würde mich sehr freuen wen sich noch welche dazugesellen und helfen wollen.


Func _Steemit_Connect($URL = "https://gtg.steem.house:8090")
Dim $obj = ObjCreate ("WinHttp.WinHttpRequest.5.1")
$obj.Open("POST", $URL, false)
$obj.SetCredentials(" "," ",0)
$obj.SetRequestHeader("Content-Type", "application/json-rpc")
Return $obj
EndFunc


Func _Steemit_Get_Block($blocknumber,$obj)
Local $Data1='{"id":23,"method":"get_block","params":["'&$blocknumber&'"]}'
$obj.Send($Data1)
$oStatusCode = $obj.Status
Return $obj.ResponseText
EndFunc

Func _Steemit_Get_Dynamic_Global_Properties($obj)
Local $Data1='{"id":7,"method":"get_dynamic_global_properties","params":[]}'
$obj.Send($Data1)
$oStatusCode = $obj.Status
Return $obj.ResponseText
EndFunc

Func _Steemit_GetAccount($name,$obj)
Local $Data1='{ "jsonrpc": "2.0", "method": "get_accounts", "params": [["'&$name&'"]], "id": 99}'
$obj.Send($Data1)
$oStatusCode = $obj.Status
Return $obj.ResponseText
EndFunc

Func _Steemit_GetAccount_Count($obj)
Local $Data1='{"id":7,"method":"get_account_count","params":[]}'
$obj.Send($Data1)
$oStatusCode = $obj.Status
Return $obj.ResponseText
EndFunc

Func _Steemit_Get_Content_Replies($name,$permalink,$obj)
Local $Data1='{"id":20,"method":"get_content_replies","params":["'&$name&'", "'&$permalink&'"]}'
$obj.Send($Data1)
$oStatusCode = $obj.Status
Return $obj.ResponseText
EndFunc

Func _Steemit_Get_Active_Votes($name,$permalink,$obj)
Local $Data1='{"id":12,"method":"get_active_votes","params":[ "'&$name&'", "'&$permalink&'"]}'
$obj.Send($Data1)
$oStatusCode = $obj.Status
Return $obj.ResponseText
EndFunc

Func _Steemit_Get_Content($name,$permalink,$obj)
Local $Data1='{"id":12,"method":"get_content","params":[ "'&$name&'", "'&$permalink&'"]}'
$obj.Send($Data1)
$oStatusCode = $obj.Status
Return $obj.ResponseText
EndFunc


ein Beispiel um es zu benutzen:


Global $con = _Steemit_Connect()
MsgBox(0,"Steemit",_Steemit_GetAccount("killerfreak",$con))


ich Hoffe das ich die Udf noch weiter ausbauen kann

Sort:  

Hallo @killerfreak, herzlich willkommen auf Steemit.

Wenn Du Fragen zu Steemit hast, oder Dich mit anderen deutschen „Steemians“ austauschen magst, schau einfach mal auf unserem Discord-Server https://discord.gg/g6ktN45 vorbei.

Unter dem folgenden Link findest Du einige Anleitungen, die Dir den Einstieg in das Steem-Universum deutlich erleichtern werden: Deutschsprachige Tutorials für Steemit-Neulinge: Ein Überblick

nice post, I like to kind people who want to share

This post has received a 6.77 % upvote, thanks to: @killerfreak.

This post has received gratitude of 1.11 % from @appreciator thanks to: @killerfreak.

Release the Kraken! You got a 18.25% upvote from @seakraken courtesy of @killerfreak!

Sneaky Ninja Attack! You have been defended with a 3.85% vote... I was summoned by @killerfreak! I have done their bidding and now I will vanish...Whoosh

This post has received a 37.04 % upvote from @kittybot thanks to: @killerfreak.

You got a 10.14% upvote from @allaz courtesy of @killerfreak!