Slowgeek » Forums » Technical Support
 
FAQ   •     •   Login  •   Challenge Search:

API Changes?

(3 posts)

Tags:


  1. kaufman

    new member
    Joined: Jul '09
    Posts: 2

    Hi Rasmus,
    I've been having a lot of problems with my own application retrieving nike's data for the last week or so. It seems to me that the XML is not as clean as it used to be (for instance - it's all one line, no CR's or CRLF's). (My app is for my own personal use - I'm not a competitor trying to rebuild your site. I'm just very stuck and can't seem to make much progress.)

    This is the URL that I'm using to get the run list:
    https://secure-nikerunning.nike.com/nikeplus/v1/services/app/run_list.jsp
    is that still the best one to use? The results I get back from that show up as well-formed XML, but since it's all one line I'm having a lot of difficulty parsing it - even if i try to replace ">" with ">\n", for instance, i still can read at most only 4096 chars. I cannot seem to read more than that (or even have php's str_replace work past that point). I've tried a number of different ways, and I'm just spinning my wheels.

    I guess my question is this: did you notice any significant changes to the xml? And if you did - what did you have to do to compensate for it? My app has been working for almost a year and half to this point, and now I can no longer retrieve my data.

    Any help or guidance you could offer would be greatly appreciated!

    thanks,

    kaufman

    Posted 2 years ago #      

  2. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 258

    Well, I use the public API. For the run list the URL is http://nikerunning.nike.com/nikeplus/v1/services/widget/get_public_run_list.jsp

    And XML parsers don't care about line feeds. To parse it, just do:

    $runs = simplexml_load_string($data);

    And you can see it with:

    print_r($runs);

    And no, I didn't see any real changes in the public api. There were some new fields, but that doesn't affect a normal xml parser.

    Posted 2 years ago #      

  3. kaufman

    new member
    Joined: Jul '09
    Posts: 2

    Thanks for your help, I finally figured it out - my webhost must have changed their cURL installation - it was corrupting the files.

    I was wondering why it all just stopped working for me.

    Now I just have to figure out to fix it or work around it, but that's obviously a discussion for another board

    thanks again!

    Posted 2 years ago #      

Reply

You must log in to post.

RSS feed for this topic