Compare commits

..

No commits in common. "855f9b652dea35d5d66f94e8c3d93c354b0484e3" and "af6ecb2864998b224230c31cfbdbd43c1f53483c" have entirely different histories.

3 changed files with 413 additions and 767 deletions

View File

@ -197,10 +197,6 @@ class MembershipWorks:
) )
if r.status_code != 200: if r.status_code != 200:
raise MembershipWorksRemoteError("csv generation", r) raise MembershipWorksRemoteError("csv generation", r)
if r.text[0] == "\ufeff":
r.encoding = r.encoding + "-sig"
return list(csv.DictReader(StringIO(r.text))) return list(csv.DictReader(StringIO(r.text)))
def get_transactions(self, start_date, end_date, json=False): def get_transactions(self, start_date, end_date, json=False):
@ -214,7 +210,7 @@ class MembershipWorks:
r = self._get_v1( r = self._get_v1(
BASE_URL + "/v1/csv", BASE_URL + "/v1/csv",
params={ params={
"crm": ",".join(str(k) for k in CRM.keys()), "crm": "12,13,14,18,19", # transaction types, see CRM
**({"txl": ""} if json else {}), **({"txl": ""} if json else {}),
"sdp": start_date.strftime("%s"), "sdp": start_date.strftime("%s"),
"edp": end_date.strftime("%s"), "edp": end_date.strftime("%s"),
@ -225,9 +221,6 @@ class MembershipWorks:
if json: if json:
return r.json() return r.json()
else: else:
if r.text[0] == "\ufeff":
r.encoding = r.encoding + "-sig"
return list(csv.DictReader(StringIO(r.text))) return list(csv.DictReader(StringIO(r.text)))
def get_all_members(self): def get_all_members(self):

1161
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -17,16 +17,16 @@ authors = ["Adam Goldsmith <adam@adamgoldsmith.name>"]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.7" python = "^3.7"
requests = "^2.23.0" requests = "^2.23.0"
"ruamel.yaml" = "^0.17.20" "ruamel.yaml" = "^0.16.10"
bitstring = "^3.1.6" bitstring = "^3.1.6"
lxml = "^4.5.0" lxml = "^4.5.0"
peewee = "^3.13.2" peewee = "^3.13.2"
mysqlclient = "^2.1.0" mysqlclient = "^1.4.6"
udm-rest-client = "^1.0.6" udm-rest-client = "^0.4.0"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
black = "^22.3.0" black = "^19.10b0"
isort = "^5.10.1" isort = "^4.3.21"
[tool.poetry.scripts] [tool.poetry.scripts]
doorUpdater = 'memberPlumbing.doorUpdater:main' doorUpdater = 'memberPlumbing.doorUpdater:main'