-
Notifications
You must be signed in to change notification settings - Fork 20
Currency
AnkhHeart edited this page Feb 26, 2018
·
11 revisions
bool AddPoints(string userid, string username, long amount)Parent.AddPoints(data.User,data.UserName,100)bool RemovePoints(string userid, string username, long amount)Parent.RemovePoints(data.User,data.UserName,100)//--------------------------
// Syncronous
//--------------------------
List<string> AddPointsAll(PythonDictionary<string userid,long amount> data)
//--------------------------
// Asyncronous
//--------------------------
List<string> AddPointsAllAsync(PythonDictionary<string userid,long amount> data,
Action callback)#--------------------------
# Syncronous
#--------------------------
dict = {
'ankhheart': 100,
'momo': 10
}
# Returns a list of users that could not receive currency because they were not in chat
failedUsers = Parent.AddPointsAll(dict)
#--------------------------
# Asyncronous
#--------------------------
Parent.AddPointsAll(dict,callback)
def callback(result):
failedUsers = result # Returns a list of users that could not receive currency because they were not in chat
return//--------------------------
// Syncronous
//--------------------------
List<string> AddPointsAll(PythonDictionary<string userid,long amount> data)
//--------------------------
// Asyncronous
//--------------------------
List<string> AddPointsAllAsync(PythonDictionary<string userid,long amount> data,
Action callback)#--------------------------
# Syncronous
#--------------------------
dict = {
'ankhheart': 100,
'momo': 10
}
# Returns a list of users that could not lose currency because they were not in chat
failedUsers = Parent.RemovePointsAll(dict)
#--------------------------
# Asyncronous
#--------------------------
Parent.RemovePointsAll(dict,callback)
def callback(result):
failedUsers = result # Returns a list of users that could not losecurrency because they were not in chat
returnlong GetPoints(string userid)result = Parent.GetPoints("ankhheart")long GetHours(string userid)result = Parent.GetHours("ankhheart")long GetRank(string userid)result = Parent.GetRank("ankhheart")PythonDictionary<string userid,long amount> GetTopCurrency(int top)result = Parent.GetTopCurrency(10)PythonDictionary<string userid,long amount> GetTopHours(int top)result = Parent.GetTopHours(10)PythonDictionary<string userid,long amount> GetPointsAll(List<string> userids)# Import List from .NET at the top of your page
from System.Collections.Generic import List
mylist = List[str](){
'ankhheart',
'momo',
'castorr91',
'must13',
'wellbrained'
}
result = Parent.GetPointsAll(mylist)PythonDictionary<string userid,long amount> GetRanksAll(List<string> userids)# Import List from .NET at the top of your page
from System.Collections.Generic import List
mylist = List[str](){
'ankhheart',
'momo',
'castorr91',
'must13',
'wellbrained'
}
result = Parent.GetRanksAll(mylist)PythonDictionary<string userid,long amount> GetHoursAll(List<string> userids)# Import List from .NET at the top of your page
from System.Collections.Generic import List
mylist = List[str](){
'ankhheart',
'momo',
'castorr91',
'must13',
'wellbrained'
}
result = Parent.GetHoursAll(mylist)| Variable | Usage |
|---|---|
| string UserId | obj.UserId |
| string UserName | obj.UserName |
| long Points | obj.Points |
| long TimeWatched (In Minutes) | obj.TimeWatched |
| string Rank | obj.Rank |
List<Currency> GetCurrencyUsers(List<string> userids)# Import List from .NET at the top of your page
from System.Collections.Generic import List
mylist = List[str](){
'ankhheart',
'momo',
'castorr91',
'must13',
'wellbrained'
}
result = Parent.GetCurrencyUsers(mylist)