Hi ,
It looks like you're using an ad blocker.



The revenue generated from the adverts on the site is a critical part of our funding - and it's because of these ads that I can offer the site for free. But using the site for free AND blocking the ads doesn't feel like a great thing to do, which is why this box is so large and inconvenient. Some sites will completely block your access, but I'm not doing that - I'm appealing to your good nature instead. Did you know that you can allow ads for specific sites, whilst still blocking them on others?

Thanks,
Ian Williams aka Fetch
or for an ad-free Fetcheveryone experience!

API

37 watchers
Aug 2014
11:04am, 25 Aug 2014
14,793 posts
  • Quote
  • Pin
fetcheveryone
Two updates to report:

1) I've added GPX support to training/import

2) There's some documentation here: http://www.fetcheveryone.com/api-doc.php - at the moment it just lists the accepted / required parameters, but I'll add to it as we go. It's auto-generated, so as I add new methods, they'll show up automatically.
Aug 2014
10:18pm, 25 Aug 2014
68 posts
  • Quote
  • Pin
jonbev
That would be sweet. I spoke to garmin about their api recently for use with GoldenCheetah and they wanted 5k! WTF!
Aug 2014
8:22pm, 26 Aug 2014
99 posts
  • Quote
  • Pin
nuttyficket
Small bit of API feedback: if I upload iffy run data (I didn't url encode it correctly), I still get a response outcome of SUCCESS even though no run has been added to my log - I'd expect a FAIL. The returned run id is still an empty field in this case, though.
Aug 2014
10:35pm, 26 Aug 2014
14,799 posts
  • Quote
  • Pin
fetcheveryone
Ok, I'll see what I can do about that.

To all watchers of this thread: join the developer group as well please - link on the right. Ta.

I also have some Python scripts to upload tomoz (thanks Badger). Would be great to have some Java and Objective C classes to demo too. Anyone?
BFC
Aug 2014
8:19am, 27 Aug 2014
8 posts
  • Quote
  • Pin
BFC
I hit the same issue nuttyficket did with incorrectly encoded and compressed data returning success.

Another request/suggestion: can uid be an optional argument? You seen to already know who we are so it seems unnecessary to specify our own uid in requests.

Regarding other implementations: I've got a ruby implementation which needs a little tidying and then I'll publish the GitHub (you should bung your examples up on GitHub too;-)) repo here.
Aug 2014
9:28am, 27 Aug 2014
14,800 posts
  • Quote
  • Pin
fetcheveryone
Morning :-)

I've made some adjustments. If the import code can't process the file i.e. can't create a valid XML DOM from the string you supply, it will return a fail message now.

BFC - you're right in that technically we could do without the uid when you're importing to your own account - but I validate it against the list of users who have approved an 'app' to work on their behalf.
Aug 2014
9:40am, 27 Aug 2014
14,801 posts
  • Quote
  • Pin
fetcheveryone
Badger's Python examples are now live - see the link in the thread description over on the right.
Aug 2014
11:28am, 27 Aug 2014
4,384 posts
  • Quote
  • Pin
Badger
Just run some code that pulls the last few activities & identifies the newest, then runs through tcx files in a directory, identifies newer ones than are in the log and uploads them as the appropriate type. With a UI and some improvements to detecting a fresh upload, this might actually be useful.

Putting them on GitHub is a good call, I reckon. OK by you, Fetch?
Aug 2014
11:30am, 27 Aug 2014
14,807 posts
  • Quote
  • Pin
fetcheveryone
My only concern at the moment is what will happen if someone imports a trillion files. But hey, go for it :-)
Aug 2014
12:08pm, 27 Aug 2014
4,385 posts
  • Quote
  • Pin
Badger
I imported two, seeing as that was all the un-uploaded files I had :)
Anything you can do to choke things on your end?
Where my (current) code would run into trouble is if somebody made a new account and tried to upload all their existing data; as it stands, it won't upload anything older than the newest, even if that isn't in the database already. This is probably quite a useful way for it to be dumb.

About This Thread

Maintained by fetcheveryone
We're very much in the "gently trying things out" stage, but please join in if you're interested in working with a Fetch API:

Get your developer keys here:
http://www.fetcheveryone.com/api-request-keys.php

And a basic PHP client example here:
http://www.fetcheveryone.com/demo/api_client.0.2.zip

With thanks to Badger, here's a Python version:
http://www.fetcheveryone.com/demo/FetchAPIPython_0.2.zip

Available methods:
http://www.fetcheveryone.com/api-doc.php

Join the developer group here:
http://www.fetcheveryone.com/groups-view.php?id=1167

If you'd care to port the client into another language, please let me know, and I can upload it to share with others.
  • Show full description...

Related Threads

  • api
  • coding
  • import

Report This Content

You can report any content you believe to be unsafe. Please let me know why you believe this content is unsafe by choosing a category below.



Thank you for your report. The content will be assessed as soon as possible.










Back To Top

Tag A User

To tag a user, start typing their name here:
X

Free training & racing tools for runners, cyclists, swimmers & walkers.

Fetcheveryone lets you analyse your training, find races, plot routes, chat in our forum, get advice, play games - and more! Nothing is behind a paywall, and it'll stay that way thanks to our awesome community!
Get Started
Click here to join 114,521 Fetchies!
Already a Fetchie? Sign in here