1
0

Move group translation into OnepifEntry class.

This commit is contained in:
2021-08-18 23:38:48 +02:00
parent cce8e30bc4
commit 5847073699
2 changed files with 36 additions and 38 deletions

View File

@@ -1,7 +1,35 @@
TYPES = {
"112": "API Credential",
"wallet.financial.BankAccountUS": "Bank Account",
"wallet.financial.CreditCard": "Credit Card",
"wallet.computer.Database": "Database",
# Not exported: Document
"wallet.government.DriversLicense": "Driver License",
"wallet.onlineservices.Email.v2": "Email Account",
"identities.Identity": "Identity",
"webforms.WebForm": "Login",
"113": "Medical Record",
"wallet.membership.Membership": "Membership",
"wallet.government.HuntingLicense": "Outdoor License",
"wallet.government.Passport": "Passport",
"passwords.Password": "Password",
"wallet.membership.RewardProgram": "Reward Program",
"securenotes.SecureNote": "Secure Note",
"wallet.computer.UnixServer": "Server",
"wallet.government.SsnUS": "Social Security Number",
"wallet.computer.License": "Software License",
"wallet.computer.Router": "Wireless Router",
}
class OnepifEntry():
def __init__(self, data):
self.raw = data
if data["typeName"] not in TYPES:
raise Exception("Unknown record type: {}".format(data["typeName"]))
self.type = data["typeName"]
self.type_name = TYPES[data["typeName"]]
def __getattr__(self, name):
if name not in self.raw: