API Availability ??

Request amendments or pass comments on this free service.
Locked
User avatar
John Upham
Posts: 7179
Joined: Wed Apr 04, 2007 10:29 am
Location: Cove, Hampshire, England.
Contact:

API Availability ??

Post by John Upham » Sun Sep 23, 2007 3:48 pm

Carl,

Are you planning to allow any APIs to hook into the system?

I'd like to do some HTTP POSTs and GETs maybe?

What do you think?

John
British Chess News : britishchessnews.com
Twitter: @BritishChess
Facebook: facebook.com/groups/britishchess :D

User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Re: API Availability ??

Post by Carl Hibbard » Sun Sep 23, 2007 7:15 pm

John Upham wrote:Carl,

Are you planning to allow any APIs to hook into the system?

I'd like to do some HTTP POSTs and GETs maybe?

What do you think?

John
I could do I suppose - what do you want to do exactly?
Cheers
Carl Hibbard

User avatar
John Upham
Posts: 7179
Joined: Wed Apr 04, 2007 10:29 am
Location: Cove, Hampshire, England.
Contact:

Post by John Upham » Sun Sep 23, 2007 11:07 pm

I'll think of something!

John
British Chess News : britishchessnews.com
Twitter: @BritishChess
Facebook: facebook.com/groups/britishchess :D

User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Post by Carl Hibbard » Mon Sep 24, 2007 10:28 pm

John Upham wrote:I'll think of something!

John
Let me know and I will add it to the ever expanding list...
Cheers
Carl Hibbard

Brent Smith
Posts: 36
Joined: Fri Oct 24, 2008 10:58 pm
Location: Reading
Contact:

Re:

Post by Brent Smith » Sun Jan 04, 2009 8:56 pm

Carl Hibbard wrote:
John Upham wrote:I'll think of something!

John
Let me know and I will add it to the ever expanding list...
Sorry, I realise this is a very old thread, but was an API proposed and/or is an API available?

Currently, I take a CSV download and pick out "Berkshire Junior" players who also have entries in our local database (at bjca.org.uk), then use the data to update the player's local records. I could program a "screen-scrape", but I know from experience (of scraping, and being scraped) that such an approach is likely to stop working when the target site changes its layout. A well-defined set of parameters giving an XML document as output (or JSON) would be great. In fact, it would be wonderful :D

User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Re: Re:

Post by Carl Hibbard » Sun Jan 04, 2009 10:01 pm

Brent Smith wrote:Currently, I take a CSV download and pick out "Berkshire Junior" players who also have entries in our local database (at bjca.org.uk), then use the data to update the player's local records. I could program a "screen-scrape", but I know from experience (of scraping, and being scraped) that such an approach is likely to stop working when the target site changes its layout. A well-defined set of parameters giving an XML document as output (or JSON) would be great. In fact, it would be wonderful :D
There isn't anything (at the moment...) but there could be I suppose

What selection criteria would you use however?
Cheers
Carl Hibbard

User avatar
John Upham
Posts: 7179
Joined: Wed Apr 04, 2007 10:29 am
Location: Cove, Hampshire, England.
Contact:

Re: Re:

Post by John Upham » Sun Jan 04, 2009 10:13 pm

Brent Smith wrote: Currently, I take a CSV download and pick out "Berkshire Junior" players who also have entries in our local database (at bjca.org.uk), then use the data to update the player's local records. I could program a "screen-scrape", but I know from experience (of scraping, and being scraped) that such an approach is likely to stop working when the target site changes its layout. A well-defined set of parameters giving an XML document as output (or JSON) would be great. In fact, it would be wonderful :D
Brent,
I could have penned the very same posting....we should talk.

That's at least two people thinking about XML...

I rang Richard Haddrell some time ago with some of my ideas. He didn't know (then) what XML was.

Some of the propriety formats in use are truly wonderful and quaint!

Anyway, I am making good progress in getting my League Management s/w to create XML data to upload to the rating system.

What is the DB underlying the rating calculations? You'll never guess..! :lol:

J.
British Chess News : britishchessnews.com
Twitter: @BritishChess
Facebook: facebook.com/groups/britishchess :D

Brent Smith
Posts: 36
Joined: Fri Oct 24, 2008 10:58 pm
Location: Reading
Contact:

Re: Re:

Post by Brent Smith » Mon Jan 05, 2009 10:33 pm

Carl Hibbard wrote: There isn't anything (at the moment...) but there could be I suppose

What selection criteria would you use however?
Currently, a list of players for a given club can be viewed with a URL such as http://grading.bcfservices.org.uk/getcl ... e%20Junior - this could be extended with an extra parameter such as xml=Y (or outputFormat=XML, which would allow for other possibilities such as outputFormat=csv). The result might be a file containing the text/data as below (I tried to add this as an attachment, instead of in-line text, but .xml files were not allowed)

Details for a given player in XML format could have a URL such as http://grading.bcfservices.org.uk/getre ... Format=XML giving an XML document such as example 2 below.

Please consider these straw man suggestions to be implemented as you see fit, if you consider it worthwhile at all ! As you work on a database which can be considered a central / national resource, and I only work on a local database, I'm not sure I can offer anything in return, but if you can think of anything, just ask.

Possible XML document for query 1:
<?xml version="1.0"?>
<ECFGradingDatabaseEntries>
<ECFGradingDatabaseEntry Ref="259489E">Adair, James</ECFGradingDatabaseEntry>
<ECFGradingDatabaseEntry Ref="246172K">Andrews, David A</ECFGradingDatabaseEntry>
<ECFGradingDatabaseEntry Ref="247351D">Archer-Lock, Adrian</ECFGradingDatabaseEntry>
</ECFGradingDatabaseEntries>

Possible XML document for query 2:
<?xml version="1.0"?>
<ECFGradingDatabaseEntry
Ref="259489E"
Sex="M"
Age="15"
Category="A"
Grade="174"
GradeLast="150"
GradeGames="95"
RapidCategory="B"
RapidGrade="168"
RapidGradeLast="167"
RapidGradeGames="23"
FIDECode="406252"
Nation="ENG"
GradeNew="193"
RapidGradeNew="184">
Adair, James
<Clubs>
<Club>Reading</Club>
<Club>Berkshire Junior</Club>
<Club>Berkshire CA</Club>
<Club>Conquistadors</Club>
<Club>Sandhurst</Club>
</Clubs>
</ECFGradingDatabaseEntry>

User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Re: Re:

Post by Carl Hibbard » Mon Jan 05, 2009 11:50 pm

Brent Smith wrote:
Carl Hibbard wrote: There isn't anything (at the moment...) but there could be I suppose

What selection criteria would you use however?
Currently, a list of players for a given club can be viewed with a URL such as http://grading.bcfservices.org.uk/getcl ... e%20Junior - this could be extended with an extra parameter such as xml=Y (or outputFormat=XML, which would allow for other possibilities such as outputFormat=csv). The result might be a file containing the text/data as below (I tried to add this as an attachment, instead of in-line text, but .xml files were not allowed)
Drop me an email to remind me and I will organize it for you - there was already a plain text type inclusion for people to link to from their websites using an inline frame based mechanism

http://grading.bcfservices.org.uk/getcl ... e%20Junior

I will need a reminder to be honest!
Cheers
Carl Hibbard

Harald Heggelund
Posts: 2
Joined: Thu Jan 08, 2009 10:21 pm
Location: Hammerfest, Norway
Contact:

Re: API Availability ??

Post by Harald Heggelund » Mon Jan 12, 2009 4:57 pm

Hello there,
I am the author of TournamentService (TS), a piece of software for managing chess tournaments.
I am now playing with the idea of adapting it to the ECF grading system (provided the ECF grading will persist??). So, API availability is of interest to me, too.

However, I guess you mr.Hibbard has more than enough to do :wink: , so my question is very simple: Instead of working out a new API, all I need is a predictable and permanent URL for the latest list. The current download link (http://grading.bcfservices.org.uk/grades2008v3.csv) obviously will change as the next list (year or version) is released.

I noticed the "Live database" button links to http://grading.bcfservices.org.uk/getdownload.php. Now, THAT might be a permanent link. Only, the web page says "Only accessible when the current database differs from the master list". Is that true? Will getdownload.php not work all the time?

What I would like to do is to have TS automatically download this list and use it for aiding player input and identification, like I've done for other federations, including FIDE.

The next step is of course to produce the result file for ECF, but that's another post....

Any answers or comments would be greatly appreciated! :D

User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Re: API Availability ??

Post by Carl Hibbard » Mon Jan 12, 2009 5:09 pm

Harald Heggelund wrote:I noticed the "Live database" button links to http://grading.bcfservices.org.uk/getdownload.php. Now, THAT might be a permanent link. Only, the web page says "Only accessible when the current database differs from the master list". Is that true? Will getdownload.php not work all the time?
The text isn't actually true no!

That should be a permanent link to the "live" database and will always be available - please help yourself...

The "other" download is only ever a historical copy of that just so people can tell the difference
Cheers
Carl Hibbard

User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Re: API Availability ??

Post by Carl Hibbard » Mon Jan 12, 2009 5:21 pm

Harald Heggelund wrote:Any answers or comments would be greatly appreciated! :D
I should add I will soon be doing a database update to 2008v4 although the "live" will still work

Next season the two extra new grade columns stuck on the end after "nation" will be removed when those new grades become the standard

Any questions then please let me know :!:
Cheers
Carl Hibbard

Locked