Hi,
Does anyone have asp.net api scripts like the sample's that Kent have on his site?
Erkan.
Asp.Net API script
Re: Asp.Net API script
Erkan,
I do all my programming in asp.net/vb.net. What specifically are you looking for?
I do all my programming in asp.net/vb.net. What specifically are you looking for?
Ricky Jones
http://www.pokerzombie.net
http://www.pokerzombie.net
Re: Asp.Net API script
I also do some programming in asp.net Vb but I am not a pro.
Just wondering how the API scripts Kent made in PHP look in VB so I can learn to make my own
scripts.
Regards,
Erkan.
Just wondering how the API scripts Kent made in PHP look in VB so I can learn to make my own
scripts.
Regards,
Erkan.
Re: Asp.Net API script
Can some give me a automated login API scrip for PM.
The same as Kent has in PHP but I want it in Asp.Net / VB.
Thanks.
The same as Kent has in PHP but I want it in Asp.Net / VB.
Thanks.
Re: Asp.Net API script
That API libarary was created a while ago. Not all functions was implemented, just part of them for own needs.
Not sure if that works with current version of PM, but at least can direct you how to implement that with VB.NET.
To use that script:
Not sure if that works with current version of PM, but at least can direct you how to implement that with VB.NET.
To use that script:
Code: Select all
Private Const pokerAPIURL As String = "http://ipaddess:8087/api?"
Private Const pokerAPIPassword As String = "password"
Dim Results As String = ""
Dim pmAPI As New pokerAPI.PokerAPI(pokerAPIURL, pokerAPIPassword)
------------------------------------------------------------------------------------------
Public Sub examplesub(ByVal mUserName As String, ByVal mUserPassword As String)
Results = ""
Dim mData As New Hashtable
Dim mPokerPlayer As New pokerAPI.pokerPlayer
mPokerPlayer.Player = mUserName
mPokerPlayer.PW = mUserPassword
mData = mAPI.AccountsGet(mUserName)
If mData("Result") = "Ok" Then
'if user exist. then just update some data for user
mData = mAPI.AccountsEdit(mUserName)
Else
'user not exist. create account
mData = mAPI.AccountsAdd("playername")
End If
If mData("Result") <> "Ok" Then
'for some reason can't create account
Results =mData("Error")
Exit Sub
end if
'we are cool. or user exist or just created.
' refresh user's data
mData = mAPI.AccountsGet("playername")
Dim Balance as long
Balance = mData("Balance")
' if user's balance less then 1000 chips increase it to 20000 chips
If Balance <= 10000 Then
mData = mAPI.AccountsIncBalance(mUserName, 20000)
End If
If mData("Result") <> "Ok" Then
'error with balance increase
Results =mData("Error")
Exit Sub
endif
End Sub
- Attachments
-
- PMVBAPI.zip
- API library
- (2.73 KiB) Downloaded 427 times