File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -540,4 +540,33 @@ def delete_ssh(token, keyid):
540540 headers = {"Content-Type" :
541541 "application/json;charset=UTF-8" ,
542542 "X-Token" : token }
543- )
543+ )
544+
545+
546+ """
547+ Function notifications performs a GET-request at
548+ https://api.vscale.io/v1/billing/notify, return information on notification
549+ policy.
550+ Token has to be provided as a str object.
551+ """
552+
553+
554+ def notifications (token ):
555+ return requests .get ("https://api.vscale.io/v1/billing/notify" ,
556+ headers = {"X-Token" : token }
557+ )
558+
559+
560+ """
561+ Function set_notifications performs a PUT-request at
562+ https://api.vscale.io/v1/billing/notify, sets new notification policy.
563+ Token has to be provided as a str object.
564+ Balance has to be provided as a str object.
565+ """
566+
567+
568+ def set_notifications (token , balance ):
569+ return requests .put ("https://api.vscale.io/v1/billing/notify" ,
570+ headers = {"X-Token" : token },
571+ data = {"notify_balance" : str (balance )}
572+ )
You can’t perform that action at this time.
0 commit comments