Update pyproject.toml & keydelivery.py
- Update pykeydelivery dependency to version >= 0.9.1 in pyproject.toml - Refactor the supported_carriers method in keydelivery.py to use self.api.list_carriers() instead of making an HTTPRequest to "https://app.kd100.com/console/utils/kdbm"
This commit is contained in:
parent
bcbd2989eb
commit
f2ca2e0748
2 changed files with 2 additions and 3 deletions
|
@ -18,7 +18,7 @@ classifiers = [
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pykeydelivery",
|
"pykeydelivery >= 0.9.1",
|
||||||
"postat",
|
"postat",
|
||||||
"glsapi",
|
"glsapi",
|
||||||
"fedextrack",
|
"fedextrack",
|
||||||
|
|
|
@ -38,8 +38,7 @@ class KeyDelivery(BaseTracker):
|
||||||
|
|
||||||
def supported_carriers(self):
|
def supported_carriers(self):
|
||||||
try:
|
try:
|
||||||
request = HTTPRequest("https://app.kd100.com/console/utils/kdbm")
|
response = self.api.list_carriers()
|
||||||
response = request.execute()
|
|
||||||
carriers = [
|
carriers = [
|
||||||
(carrier["code"], 1, carrier["name"])
|
(carrier["code"], 1, carrier["name"])
|
||||||
for carrier in response["data"]
|
for carrier in response["data"]
|
||||||
|
|
Loading…
Reference in a new issue