Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
|
9bf834148f | ||
|
9c62a84810 |
|
@ -13,5 +13,5 @@ These Python scripts allow to extract records from the DineConnect API and post
|
||||||
* Copy the file `config-sample.py` to `config.py`.
|
* Copy the file `config-sample.py` to `config.py`.
|
||||||
* Edit `config.py` with your credentials and defaults.
|
* Edit `config.py` with your credentials and defaults.
|
||||||
* To extract the tickets records from the DineConnect API and post them to the Mongo database, run `python3 extract_tickets.py` and follow the instructions of the script.
|
* To extract the tickets records from the DineConnect API and post them to the Mongo database, run `python3 extract_tickets.py` and follow the instructions of the script.
|
||||||
* To delete tickets from the Mongo database, run `python3 delte_tickets.py` and follow de instructions of the script.
|
* To delete tickets from the Mongo database, run `python3 delete_tickets.py` and follow de instructions of the script.
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import base64
|
||||||
|
|
||||||
def extract_tickets():
|
def extract_tickets():
|
||||||
from_date = str(input('From date [YYYY-MM-DD]: ') or "")
|
from_date = str(input('From date [YYYY-MM-DD]: ') or "")
|
||||||
to_date = str(input('To date YYYY-MM-DD]: ') or "")
|
to_date = str(input('To date [YYYY-MM-DD]: ') or "")
|
||||||
url = base_url + "api/Account/Authenticate/"
|
url = base_url + "api/Account/Authenticate/"
|
||||||
payload = json.dumps({
|
payload = json.dumps({
|
||||||
"tenancyName": api_tenancy_name,
|
"tenancyName": api_tenancy_name,
|
||||||
|
|
Loading…
Reference in a new issue