Follow

Integrating the Servasport JSON Feed (OLD)

If there are any questions about the following information or examples are needed, please contact Servasport: GAA Support.

An Example

An Example of the JSON feed can be found at: 

http://people.gaa.ie/club/longford/

 

The Code

Insert the following lines of code into the head of your HTML document:

 

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript">var params='[ENTER PARAMETERS HERE]&colour=555555';var colour = '555555';</script>
<script type="text/javascript" src="http://people.gaa.ie/club/javascript/fixtures.min.js"></script>

 

Insert the following line of code into the area where you want your feed:

<div id="content"></div>

 

The Parameters

Any of the following parameters can be added into the second line of code in the 'params' variable before the var colour statement:

 

  • clubID=1234: Get all fixtures and results for club 1234
  • compID=1234: Get all fixtures and results for competition 1234
  • venueID=1234: Get all fixtures and results for venue 1234
  • compGroupID=1234: Get all fixtures and results for competitions that are part of competitionGroup 1234
  • fixturesOnly=: Y/N Only return fixtures
  • resultsOnly=: Y/N Only return results
  • countyBoardID=1234: Get all fixtures for clubs from County Board 1234
  • includeCountyGames=: Y/N Include fixtures that the County is participating in.(always defaulted to Y when it's not included)
  • includeProvincialGames-: Y/N Include fixtures that the province is participating in.(always defaulted to Y when it's not included)
  • includeClubGames-: Y/N Include fixtures that clubs are participating in.(always defaulted to Y when it's not included)
  • provinceName=: Ulster/Munster/Leinster/Connacht/Britain/Europe/North America Get all fixtures for clubs in the province specified.
  • leagueTable=Y/N: Generate League Table XML if Y (must be used in conjunction with compID)
  • daysPrevious=X: Gets results for the previous X days (ignores fix/results filter mutually exclusive with daysAfter)NOTE:This is up to a Max of 15 days
  • daysAfter=X: Gets fixtures for next X days (ignores fix/results filter - mutually exclusive with daysPrevious)NOTE:This is up to a Max of 15 days
  • dateFrom=20091230: Gets fixtures/results from date 2009/12/30 combined with dateTo (ignores fix/results filter)
  • dateTo=20091230: Gets fixtures/results from date 2009/12/30 combined with dateFrom (ignores fix/results filter)
  • owner=1234: Gets all of the fixtures that a county owns, plus all of the fixtures that county is participating in.
  • compStyle=: football/hurling Only return specified type of fixtures
  • reverseDateOrder=Y/N: Reverse the Order of the fixtures based on date.
  • noTBC=Y: Add this parameter to not show TBC fixtures
  • orderTBCLast=Y: Add this parameter to show the TBC fixtures at the bottom of this list.
  • gender: Add this parameter to the list with no value and it will pull out female fixtures only.
  • showArchive=Y: If your site has an archive section, this parameter is needed to display the historical results, as by default the feed will not return these results.
  • season=: For searching historical results use this parameter with the above parameter (showArchive) to retrieve all results from a certain season.
  • compLevel:=(Senior, Intermediate...) get all the fixtures/results for that Level
  • compAgeLevel:=(Senior, U21, U20...) get all fixtures/results for that age level
  • uniqueID=42415: Get the result/Fixture for the specific game
  • includeCollegeGames:= Y/N Include fixtures that the College is participating in.(always defaulted to Y when it's not included)
  • includeSchoolGames:= Y/N Include fixtures that the School is participating in.(always defaulted to Y when it's not included)
  • leagueTableOnly:= Y/N Returns a League table with no fixtures or results (Must be used in conjunction with a CompID or CompGroupID

 

e.g. Lets say we want to put in a parameter to pull out results only, the second line of code would look something like this:

<script type="text/javascript">var params='countyBoardID=1234&orderTBCLast=Y&colour=555555&resultsOnly=Y';var colour = '555555';</script>

If you don't want the navigation to show up up the gadget then insert the following into the second line:

 

var showNav = false;

so the second line would look like this:

<script type="text/javascript">var params='countyBoardID=1234&orderTBCLast=Y&colour=555555';var colour = '555555'; var showNav = false;</script>

If you want to change the colours instead of grey (555555), just simply change the two colour references in the second line. For example, if we want to change the colour to blue (0065CC).

Note - Colours are in Hexadecimal format

 

<script type="text/javascript">var params='countyBoardID=1234&orderTBCLast=Y&colour=0065CC';var colour = '0065CC';</script>

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Mick Nolan

    Is it possible to attach the fixtures.min.js script, for download ?

  • Avatar
    Raymond McKeown, Moy GAC

    Mike - the script is available from http://people.gaa.ie/club/javascript/fixtures.min.js

  • Avatar
    Martin McCarry

    Can a different Id be used for the Fixture content?

    <div id="content"></div>

     

  • Avatar
    Raymond McKeown, Moy GAC

    Martin - to do this I had to:

    • Download the javascript file as per above and host locally
    • Amend the line in the javascript file: 
    • ());$('head').append(addCSS());$('#content').html(addHolderDivs());
    • change the word 'content' to what you need it to be e.g. content1

    - On the call page - change the javascript & div call to:

    <script type="text/javascript" src="fixtures.min.js"></script>

    <div id="content1"></div>

    This worked OK for me.

  • Avatar
    Raymond McKeown, Moy GAC

    I was a little overzealous with my copy & paste there - remove the ()); at the start of the content line!

  • Avatar
    Martin McCarry

    Super, straight forward enough.

    Cheers

  • Avatar
    Declan Buckley

    Is it possible to exclude a sepcific group or specific comp

  • Avatar
    Earnan Roche

    if i want to to display 2 club id's on the one fix/results page - how do i do this?  (e.g ClubID 1234 and ClubID4321)?

  • Avatar
    GOCServices

    Guys,

    New to the forum. Integrating into a club website. Where can I access the ClubID and CompID within my own county? 

  • Avatar
    Martin McCarry

    You can contact the support team and they will provide you with a ClubId

  • Avatar
    GOCServices

    Guys,

    When I am on the Fixtures page (JSON) my dropdown menus for the rest of the site navigation don't work until I change to another wedsite page. Any Ideas?

  • Avatar
    Raymond McKeown, Moy GAC

    GOCServices - there will probably be a jquery conflict between your menu system and the Servasport feed - have you a link to your site which you can post so I can look a little closer?

  • Avatar
    GOCServices

    Hi,

    The link to the feed is http://www.clannagaeldundalk.com/fixrestables.html

    rgs,

    Gerry