WebClientAPI

Any questions related to version 2 or version 3 should be ask here. / Toutes les questions sur la version 2 ou la version 3 devraient être demandées ici.
daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

WebClientAPI

Post by daongochoanganh »

Hi Simon,

I'm reading the code from the WebClientAPI and see that the code is to update the .DB file
I want to understand how we can ask the Simulator to use the .DB files for loading the Roster & the Lines?

Thanks a lot

SimonT
STHS Owner / Propriétaire du STHS
Posts: 13689
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: WebClientAPI

Post by SimonT »

There.

You either do it manually by download the .DB file in your input folder OR you do it automatically by selecting the "Load SQLite Database from Website before Loading Lines Files" option and making sure your Website URL is correct in the output option.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français

daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

Re: WebClientAPI

Post by daongochoanganh »

Hi Simon,

Let me rephrase if I understand it’s correctly or not.
1. After simulation the DB at the Output folder
2. Assume that copy .DB file to the Input folder & point point the API to this .DB
3. When I simulate, the lines change will be effected after I simulate & we repeat the step 1.

Thanks Simon

SimonT
STHS Owner / Propriétaire du STHS
Posts: 13689
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: WebClientAPI

Post by SimonT »

1. After simulation the DB at the Output folder, upload on your web server
2. Before your next simulation, download an copy of .DB from your web server to the Input folder.
3. When the Load Lines function will run, either manually using the Run the "Auto Load Lines" from the menu or right before simulation if you have the option selected in the STHS, the change in the DB will be process.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français

daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

Re: WebClientAPI

Post by daongochoanganh »

Hi Simon,
Thank you so much :)

daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

Re: WebClientAPI

Post by daongochoanganh »

Hi Simon,
I did try to follow the steps.
1. I change lines and save to .DB file (I use sql to check again and see data updated correctly in TeamFarmLines, TeamFarmLinesNumberOnly
2. I put the this file in the Input Folder, and run the "Auto Load Lines" - > The notification = Load & Process League DB File
3. However, when I open the Team Lines I use to test. There is no updated at all

Can I check with you if I missed any step.
TQ

SimonT
STHS Owner / Propriétaire du STHS
Posts: 13689
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: WebClientAPI

Post by SimonT »

You modify the .DB how? If you modify directly, you need to a change the value WebClientModify to True also for the STHS to process it.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français

daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

Re: WebClientAPI

Post by daongochoanganh »

Hi Simon,

Thanks for the instruction.

I did modify the code to update WebClientModify to True in TeamFarmLinesNumberOnly & TeamProLinesNumberOnly.

For TeamFarmLines & TeamProLines. There is no field of WebClientModify.

I did double check in .DB file and it was updated. When I do the Auto Load Lines. The function is not working.

Seeking for your support.

Thanks

SimonT
STHS Owner / Propriétaire du STHS
Posts: 13689
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: WebClientAPI

Post by SimonT »

Well, are you sure you are loading the DB correctly? Can you try it with the manuel command "Process Database".
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français

daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

Re: WebClientAPI

Post by daongochoanganh »

Hi Simon,

Thanks a lot for your response but still even I run that command, they said processed successfully but still I can not see the change when I try to open the file again.

I will put the details to see if I missing anything.
1. CEO simulate & output the .DB file
2. I use this .DB file and upload the location to point the WebClient to:
3. I use WebClient to update the Line15vs5ForwardTime from 35 to 33 (new value) and increase Line2 by 2 so make sure it's 100
4. I click save, I get a copy of this .DB and run the SQL to see if data updated correct or not (It's correct & the Flag WebClientUpdate is True)
5. I put this new updated .DB file in the Input folder which is config in the Simulator
6. I cluck Simulate > Auto Load Lines (or run the command) --> Its success
7. I go back to the Tean Line and see, the Line15vs5ForwardTime value still 35.

So the DB was updated correctly but by some reason the loading is not effective.
Is there anything I'm missing here :(

Best Regards

SimonT
STHS Owner / Propriétaire du STHS
Posts: 13689
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: WebClientAPI

Post by SimonT »

Give me your website URL please.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français

daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

Re: WebClientAPI

Post by daongochoanganh »

Hi Simon,

Please find below for the link that we are testing now, I remove the password verification step so that the change can be made directly to the DB

WebClient Link:
http://www.lhdgv.ca/WebClientIndex.php

DB Link:
http://www.lhdgv.ca/STHS.db
--> This is the DB file after change I use to put into Input Folder.

Thank you for your help.
BR

SimonT
STHS Owner / Propriétaire du STHS
Posts: 13689
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: WebClientAPI

Post by SimonT »

Why are you changing the DB file name? You shouldn't change it's name. That probably why it doesn't work when loading, it doesn't load because it doesn't look for the correct name.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français

daongochoanganh
New in Town / Le Ptit Nouveau
Posts: 27
Joined: Wed Apr 17, 2019 1:09 am

Re: WebClientAPI

Post by daongochoanganh »

Hi Simon,

I changed the name to test.
I did keep the name as the output as: LHDGV2020-SEASON.DB now but still not working (even the data insides the DB updated correctly through the client with flag WebClientModified = True

Can you help to look into this?
Is there any option in the client I need to change?

Thanks Simon

SimonT
STHS Owner / Propriétaire du STHS
Posts: 13689
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: WebClientAPI

Post by SimonT »

The file should be "LHDGV2020-STHS.db". Did you keep changing the name around?

When you "click Simulate > Auto Load Lines (or run the command)". Do should see the message "Load and Process SQLite Database complete." when the DB is load correctly in the STHS.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français

Post Reply