Jeżeli interesuje cię publikowanie danych dotyczących zawodów np. na tablicy z wynikami lub w relacji wideo, możesz skorzystać z pliku tekstowego, który zawiera wszystkie informacje o zawodach. Listy startowe i wyniki w formie pliku CSV (dla wszystkich lub jednej konkurencji) można pobrać w dowolnym momencie przed, w trakcie lub po zakończeniu zawodów. Można zrobić to ręcznie lub automatycznie. 


Przykładowe skrypty automatyzujące ten proces są dostępne do pobrania na końcu tego dokumentu (.bat dla Windows, .sh dla Linux/Mac).


Pliki CSV z listą startową i wynikami można pobrać w widoku Szczegóły zawodów, klikając przycisk Import/Eksport pliku CSV i wybierając Eksport list startowych lub Eksport wyników.


 

W załącznikach (na dole strony) dostępne są dwa przykładowe pliki CSV z listą startową i wynikami.


Możesz także zautomatyzować proces pobierania plików. Wymaga to jednak wcześniejszej konfiguracji.


This is how you set it up:

    1. Authenticate and store cookies (the important one is cookie named rac). 

  • data makes it a POST and sends the payload
  • c tells it to store cookies in a file named "cookiejar"


curl –data 'username=myaccount@gmail.com&password=super_secret_pass' -c cookiejar https://api.admin.rosterathletics.com/api/login


    2. Now using acquired cookies, you can fetch start lists or results in CSV

  • b tells curl to attach cookies from file "cookiejar", where we saved them in step 1.
  • c same as above; cookies can (and will) be refreshed, so it's essential to store them


101 is the meet/meeting id - you can see it referenced in the location bar when viewing our website. It would be here: https://admin.rosterathletics.com/meeting/101/details


Start lists:

curl -b cookiejar -c cookiejar https://api.admin.rosterathletics.com/api/admin/meeting/101/export-csv


Results:

curl -b cookiejar https://api.admin.rosterathletics.com/api/admin/meeting/101/export-results-csv/v2


You can also download results for a single event. In the example below, 201 is the event id. You can see it referenced in the location bar when viewing our website. It would be here: https://admin.rosterathletics.com/admin/meeting/101/results?meIdPk=201


Results for single event:

curl -b cookiejar -c cookiejar https://api.admin.rosterathletics.com/api/admin/meeting/101/export-event/201



Cookies expire after 2h. So if no request is made for 2h (or you don't store refreshed cookies), you'll need to do step 1) again. 


A simple bash script for Linux/Mac could look like this (also attached as a .sh file):



Or for Windows like this (also attached as a .bat file):