gfrenoy / TabT-API

Programming interface for TabT, the free table tennis manager software
http://tabt.frenoy.net
GNU Affero General Public License v3.0
9 stars 5 forks source link

Génération listes de forces. #9

Closed Nux007 closed 5 years ago

Nux007 commented 5 years ago

Bonjour, et tout d'abord, merci pour le boulot !

J'ai commencé à écrire un plugin wordpress pour la gestion de base d'un club ( résultats, classements, calendriers, challenge ), au début, ne connaissant pas votre api, j'étais parti pour scraper, pour ensuite passer à votre api, cependant, je ne vois aucun moyen de récupérer la liste de force au format PDF, en effet, l'api retourne l'index officiel de la fédération, et non l'index DB, ce qui m'empêche d'appeller le menu 6 via URL avec l'index db du club pour la génération server side du PDF... ( index.php?menu=6&club_id="MISSING"&pdf=1&compute_pdf=1 )

Vous serait il possible d'ajouter l'index db dans l'appel GetClubs ?

gfrenoy commented 5 years ago

Thanks for your support and suggestion :)

I understand the issue but internal database ID shall not be used ; the way to identify a club should remain its UniqueIndex (that is typically given by the federation). See also http://api.frenoy.net/classClubEntry.html#ac1b369b2b7621ff09e0dba1e02f14832

I'll need to change a few things on the web interface to do so but ultimately, you'll be able to access the PDF using this URL:

https://<tabt_website_url>/club/<club_unique_index>/members/pdf

Stay tuned.

ps: For WordPress, you may want to take a look at this : https://bitbucket.org/gfrenoy/tabt4wp

Nux007 commented 5 years ago

Thank's, I will try to find an other way... I just tried your WP plugin, what minimum credentials level is needed to get the divisions ranking working ? ( the example provided inside the readme file does not work )

gfrenoy commented 5 years ago

Thank's, I will try to find an other way...

Why would you rush and implement the wrong way while if you wait a bit, you'll get it the right way ? In your application, simply implement the link mentioned above and it will eventually work.

what minimum credentials level is needed to get the divisions ranking working

No special credential required.

Btw, to test APIs, here is a great repository : https://github.com/Laoujin/ttc-test-tabtapi

the example provided inside the readme file does not work

Well, it used to work but who knows ... If you can give more details about the issue (to be recorded on https://bitbucket.org/gfrenoy/tabt4wp/issues), we'll look into it and try to fix it...

Nux007 commented 5 years ago

Why would you rush and implement the wrong way while if you wait a bit, you'll get it the right way ? In your application, simply implement the link mentioned above and it will eventually work

I was meaning "until the link you provided works" ;-)

Btw, to test APIs, here is a great repository

Great tool indeed

gfrenoy commented 5 years ago

Up to you. Faire et défaire, c'est toujours travailler :)

Fonsvanh commented 5 years ago

Thank's, I will try to find an other way...

Why would you rush and implement the wrong way while if you wait a bit, you'll get it the right way ? In your application, simply implement the link mentioned above and it will eventually work.

what minimum credentials level is needed to get the divisions ranking working

No special credential required.

Btw, to test APIs, here is a great repository : https://github.com/Laoujin/ttc-test-tabtapi

the example provided inside the readme file does not work

Well, it used to work but who knows ... If you can give more details about the issue (to be recorded on https://bitbucket.org/gfrenoy/tabt4wp/issues), we'll look into it and try to fix it...

There is also a great program named "SOAP UI" that I use to test an API, not only the TABT-api. Have a look at this website to download the program - https://www.soapui.org/

gfrenoy commented 5 years ago

@Nux007 Give it a try, it should work now ; example: https://competitie.vttl.be/club/Vl-B225/leden/pdf

Nux007 commented 5 years ago

@Fonsvanh I'm also using it ;-) but using the tool pointed by @gfrenoy has more sense for my project imo. @gfrenoy

Give it a try, it should work now ;

It works like a charm :-) thank's a lot !!