Public API for note tracking

Euro tracking discussion in English

Moderators: Fons, avij, Phaseolus

Post Reply
hanska
Euro-Newbie
Euro-Newbie
Posts: 3
Joined: Thu Jun 17, 2010 7:40 pm
Location: Mazara del Vallo
Contact:

Public API for note tracking

Post by hanska »

Hello people,
is there any plan to provide an API for note-tracking?
I mean, so that people can write/use stand-alone applications (desktop, mobile phones, [..]) to interact with EBT.

I'm new to the site, but I believe I'll be more efficient inserting notes with a desktop app :) (which could also have the advantage of taking notes offline and submit them one the computer goes online)

Ideas? Comments?

David
User avatar
dserrano5
Euro-Master
Euro-Master
Posts: 3772
Joined: Sun Jan 31, 2010 11:59 am
Location: Madrid, ES

Re: Public API for note tracking

Post by dserrano5 »

An unofficial one could be written without much effort, by interacting with the web site under the hood, although it would be convenient to have approval from the EBT gods.
User avatar
R/J
Euro-Master
Euro-Master
Posts: 2300
Joined: Fri May 16, 2008 12:04 pm
Location: Eindhoven & omgeving, Nederland

Re: Public API for note tracking

Post by R/J »

Perhaps you could take a loot at the EBT-tool.
My NIG stats have finally disappeared. My EBTST stats are still available.
User avatar
Nerzhul
Euro-Master
Euro-Master
Posts: 1417
Joined: Tue Apr 27, 2004 12:33 am
Location: Berlin

Re: Public API for note tracking

Post by Nerzhul »

What exactly do you expect from an "API"?

You can simply use the same mechanisms the website uses. Post your note data to the central controller.

Example (single note entry):

Code: Select all

http://eurobilltracker.com/?command=4&PHPSESSID=<SESSION_ID>&my_denomination=<DENOMINATION>&my_year=2002&my_shortcode=<SHORTCODE>&my_serial=<SERIAL>&my_comment=<COMMENT>&my_city=<CITY>&my_country=<COUNTR>&my_zip=<POSTAL_CODE>
For further information I suggest exploring the site with Firebug a bit :-)
EBT Webmaster | Author of the EBT-Tool | Dothunter! | EBT News on Twitter
User avatar
m_vw
Euro-Regular in Training
Euro-Regular in Training
Posts: 148
Joined: Mon Apr 01, 2002 3:57 pm
Location: Lewedorp, The Netherlands

Re: Public API for note tracking

Post by m_vw »

Nerzhul,

Following your example I tried to login in, but I keep getting the message that there is no account or my password is wrong.

What I tried is:

Code: Select all

http://en.eurobilltracker.com/login/?command=576&my_email=some@address.com&my_password=mypassword&autoLogin=checked
Also tried to use %40 for the @ and %2E for the . but nothing seems to work.
Also tried without the /login/ part

Can you give some hints?

Maurice
My first Note
My Stats (updated 2020.08.13)
hanska
Euro-Newbie
Euro-Newbie
Posts: 3
Joined: Thu Jun 17, 2010 7:40 pm
Location: Mazara del Vallo
Contact:

Re: Public API for note tracking

Post by hanska »

R/J wrote:Perhaps you could take a loot at the EBT-tool.
I'm using Debian GNU/Linux, so running an .exe is not the very first option :)
Thank you for your suggestion, though!
Nerzhul wrote:What exactly do you expect from an "API"?
Let's say, some RESTful API, with OAuth as authentication mechanism. With some XML response, maybe.
Nerzhul wrote:For further information I suggest exploring the site with Firebug a bit :-)
Sure, just wanted to know if there was something official, or if I should just emulate
a browser and send queries to the PHP files underneath ;)
Also, using PHP files is not failsafe as one could think: for example, the error messages have to
be parsed from the output HTML; while a proper API could return different HTTP error codes,
or an XML files with the status, and so on.

Also, a proper API would let the code/program ("user") get info rather easily, like: "which notes did I insert?".
Again, currently, this would require some HTML parsing.

Is the code available somewhere? I could hack something and see if it works. :)
User avatar
Nerzhul
Euro-Master
Euro-Master
Posts: 1417
Joined: Tue Apr 27, 2004 12:33 am
Location: Berlin

Re: Public API for note tracking

Post by Nerzhul »

m_vw wrote:Can you give some hints?
Sure,

You probably forgot to actually POST the data. Also, the login command is 64 and can simply be sent to the central controller (http://eurobilltracker.com/index.php" onclick="window.open(this.href);return false; or short http://eurobilltracker.com/" onclick="window.open(this.href);return false;)

As I said, Firebug or something similar is your friend here, there's really no magic going on :-)
EBT Webmaster | Author of the EBT-Tool | Dothunter! | EBT News on Twitter
User avatar
Nerzhul
Euro-Master
Euro-Master
Posts: 1417
Joined: Tue Apr 27, 2004 12:33 am
Location: Berlin

Re: Public API for note tracking

Post by Nerzhul »

hanska wrote:Also, a proper API would let the code/program ("user") get info rather easily, like: "which notes did I insert?".
Again, currently, this would require some HTML parsing.
Well, to date there's been no need for a special note insertion API, but I guess it could be quite useful. I'll see if I can come up with something :-) What are your plans actually?

Btw, there already ARE a few APIs, for search requests and some personal stats (locations, zip codes, comments). Guess I should write some documentation some day :-)
EBT Webmaster | Author of the EBT-Tool | Dothunter! | EBT News on Twitter
User avatar
dserrano5
Euro-Master
Euro-Master
Posts: 3772
Joined: Sun Jan 31, 2010 11:59 am
Location: Madrid, ES

Re: Public API for note tracking

Post by dserrano5 »

hanska wrote:I'm using Debian GNU/Linux, so running an .exe is not the very first option :)
Oh, yes it is. Both NIG and EBT-Tool run fine under wine. Version 1.1.42 here.
hanska
Euro-Newbie
Euro-Newbie
Posts: 3
Joined: Thu Jun 17, 2010 7:40 pm
Location: Mazara del Vallo
Contact:

Re: Public API for note tracking

Post by hanska »

Nerzhul wrote:Well, to date there's been no need for a special note insertion API, but I guess it could be quite useful. I'll see if I can come up with something :-)
Is the code behind EBT pubicly available? I could give a hand, if needed.
Being new here, I understand I might be seen as some unknown guy try to destroy EBT :) -- for reference, this is my blog, and this is my Debian-related work. Hope this suffices ;)
Nerzhul wrote:What are your plans actually?
Can't exactly tell :)
I'm going to write some python-GTK/Qt app to use EBT without a browser, at least for my needs.

Ideally, the stand-alone app would be able to provide the same features of the website.
For the 1.0 version though, I'd expect it to do:
  • add and modify notes
  • notify the user about hits
  • add notes offline and upload them in batch when possible, maybe with the possibility of faking the date
  • see statistics
Maybe I'm a bit ambitious? :)
Nerzhul wrote:Btw, there already ARE a few APIs, for search requests and some personal stats (locations, zip codes, comments). Guess I should write some documentation some day :-)
Heh, maybe :-)
dserrano5 wrote:
hanska wrote:I'm using Debian GNU/Linux, so running an .exe is not the very first option :)
Oh, yes it is. Both NIG and EBT-Tool run fine under wine. Version 1.1.42 here.
I mean, I'd prefer to use free software, and I'd regard the .exe as a last resort.

Thank you people for your prompt replies!
David
Post Reply

Return to “Site and Euro-tracking Discussion (English)”