I want to display on my WordPress website using MapMyFitness’s API. It needs to be in a friendly format for my readers so I am thinking it can be converted into posts. Should I write a script that would directly pull this data from their servers (during each page refresh) or should I create and schedule a cron job for it? I do like the idea of creating a cron job for it (since my site will need to keep track of ratings and comments for each route), but I am not sure where to start for it.
Here’s a URL I would be using to grab data from:
There API does support JSON, so the &o= parameter can be set to “&o=Json”.
Here’s a link to the API I am using: api.mapmyfitness.com/3.1/
And here’s a link to the Routes method which is being used in the link above. It shows how you can manipulate the data: api.mapmyfitness.com/3.1/routes/get_route?doc
Please let me know if I should provide anymore details about what I am trying to accomplish.
there’s a few ways you could go about this..
but to keep it simple you could just use a XML parser to read the xml returned from the API,
this xml file, you can do what you want with it, adding pages/posts for each route?
are you using, google maps to display the route points?
heres a little code block that you could use in your wordpress sidebar.
open sidebar.php
pop this little code snippet in there.
this should produce a list
User: mm75 RouteName: All PANTHER TRACE – Riverview FL Mar 31, 2010 1:14 PM
etc..etc..etc..
hopefully this puts you on track, 🙂
Marty