Points - danopia/deviantart-difi GitHub Wiki
This class is used to provide Modals for points and interact with points (e.g. transferring points)
More information about this class can be acquired by studying the points.js
file.
Loads the modal to give points to someone
-
username
: string
Unknown
Dialog-like object.
Provides a modal to buy more points when you are low on points
None
Unknown
Dialog-like object.
REMOVED
more research needed
Returns terms of service for points
- When clicking on
Terms and Conditions for Points
in the points page
None
- status:
SUCCESS
- content:
<div id="policy-points" class="policy-page"> . . . </div>
This method is used to transfer points to another user
NOTE: Request includes the user's password!
Unknown
-
toName
: string (i.e. the recipient) -
numPoints
: string (i.e. the amount of points to transfer) -
memo
: string (i.e. a message for transfer description) -
userpass
: string (i.e. current user password) -
tos
: uint (e.g. 0 for decline and 1 for agree)
-
On success, Dialog-like object
-
html
with the following content:
<div class="modal-dialog pointsModal" id="pointsModalReceipt" style="display:none;"> <div class="modal-dialog-header"> <h2><img class="pointsheart" src="https://st.deviantart.net/minish/points/point_hearts.gif?2"/> Points Transferred</h2> </div> <div id="receiptBody">You have given [amount] points to [Username]</div> <div class="modal-dialog-footer c"> <a class="smbutton smbutton-green pointModalOK" href="#" onclick="Modals.pop('OK'); return false;"><span>OK</span></a> </div> </div>
-
-
On argument validation error:
-
code
e.g.ERR_VALIDATION
-
human
e.g.Invalid amount of Points
orInvalid Password
-
-
On amount error error:
-
code
e.g.ERR_INVALID_DEBIT_AMOUNT
-
human
e.g.You may transfer a maximum of 3,500 Points per transaction
-
-
Sometimes an account might be banned from the shop (not from the actual website itself), in this case you will get the following error message:
-
code
e.g.ERR_VALIDATION
-
human
e.g.Sender's account is banned from shop, and cannot transfer Points
-