Page 1 of 1

Consistent 404 When Adding a Lineup via Json API

PostPosted: Sun Jun 15, 2014 6:20 pm
by riothamus
I’m having trouble adding and seeing lineups via the json api.

Via the headends I see:
Code: Select all
curl -H 'token: XXXX’ 'https://json.schedulesdirect.org/20131021/headends?country=USA&postalcode=19146' | jsonpp

  "19146": {
    "type": "Over-the-Air",
    "location": "19146",
    "lineups": [
      {
        "name": "Antenna",
        "uri": "\/20131021\/lineups\/USA-OTA-19146"
      }
    ]
  }


When trying to add that lineup via the api:
Code: Select all
curl -H 'token: XXXX’ -d '' 'https://json.schedulesdirect.org/20131021/lineups/USA-OTA-19146'

<html><head><title>404 Page Not Found</title><style>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{display:inline-block;width:65px;}</style></head><body><h1>404 Page Not Found</h1><p>The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.</p><a href="/">Visit the Home Page</a></body></html>


I tried adding different lineups (another OTA, and one cable), but got the same result.

Any assistance adding a lineup would be a big help…

Re: Consistent 404 When Adding a Lineup via Json API

PostPosted: Mon Jun 16, 2014 6:30 am
by rkulagow
If you send me a timestamp of when you made the attempt, I can see what's on the server.

Have you tried looking at the php grabber as a starting point?

Re: Consistent 404 When Adding a Lineup via Json API

PostPosted: Fri Nov 28, 2014 12:53 pm
by riothamus
Hi @rkulagow. Sorry for the entirely delayed reply; I've finally had time to revisit this project.

This was my error. My curl command was making a POST request, not a PUT request.

I just did this using the 20140530 version and was successful.

Re: Consistent 404 When Adding a Lineup via Json API

PostPosted: Fri Nov 28, 2014 1:00 pm
by rkulagow
Excellent.