Skip to content

Commit

Permalink
Implement method to delete a pass by passTypeIdentifier and serialNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
echoTraum committed Jul 20, 2024
1 parent b6470c7 commit 6bcf7e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions passslot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os.path, logging, sys, time

try:
import ujson as json
except ImportError:
Expand Down Expand Up @@ -102,6 +100,10 @@ def update_pass_value(self, pspass, placeholderName, value):
resource = "/passes/%s/%s/values/%s" % (pspass.passTypeIdentifier, pspass.serialNumber, placeholderName)
content = {'value': value}
return self.__call('put', resource, content)

def delete_pass(self, pspass):
resource = "/passes/%s/%s" % (pspass.passTypeIdentifier, pspass.serialNumber)
return self.__call('delete', resource)

def __call(self, method, resource, content=None, multipart=False):

Expand Down

0 comments on commit 6bcf7e7

Please sign in to comment.