Software API?

joelw
Posts: 2
Joined: Thu Aug 16, 2007 10:38 pm

Software API?

Post by joelw »

When will a software API be available for review?
Thanks for picking up where Zap2It left off!


Joel Winarske

rmeden
SD Board Member
Posts: 1530
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: Software API?

Post by rmeden »

probably not until after 9/1. It's exactly the same as Z2L, just with a different URL.

joelw
Posts: 2
Joined: Thu Aug 16, 2007 10:38 pm

Re: Software API?

Post by joelw »

great, thanks!

djb61230
Posts: 8
Joined: Fri Aug 17, 2007 10:29 am

Re: Software API?

Post by djb61230 »

rmeden wrote:probably not until after 9/1. It's exactly the same as Z2L, just with a different URL.
So will the URL change other than the hostname?

Thought I would take a gander at the mythTV source. Not sure if I found the right place but I see the hard-wired URL in datadirect.cpp is "http://datadirect.webservices.zap2it.co ... tvdService". Someone suggested that a simple /etc/hosts entry aliasing datadirect.webservices.zap2it.com to you guys would "fix" the URL.

Seems like that hack won't work if the rest of the URL is different. My myth backend wasn't built from source so I was hoping for a simple fix until the day comes I want to do a re-install/update, well which isn't right now!

Thanks in advance.

rmeden
SD Board Member
Posts: 1530
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: Software API?

Post by rmeden »

Yes, there is a change to the URL other than hostname. Heck, *that* didn't change. I don't see a problem posting it, it's already been committed to XMLTV and MythTV.

"http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl"

Robert

Dachannien
Posts: 14
Joined: Fri Aug 17, 2007 2:42 am

Re: Software API?

Post by Dachannien »

You could write a proxy that would contact the new host/URL for you, run it on the local machine, and then put the old machine's hostname in /etc/hosts as 127.0.0.1.

wepprop
Posts: 4
Joined: Sun Aug 19, 2007 3:40 pm

Re: Software API?

Post by wepprop »

You could write a proxy that would contact the new host/URL for you, run it on the local machine, and then put the old machine's hostname in /etc/hosts as 127.0.0.1.
Hmm, many people already have a working Apache installation on the same host, to support MythWeb or other. A little bit of mod_rewrite combined with mod_proxy might do the trick...

wepprop
Posts: 4
Joined: Sun Aug 19, 2007 3:40 pm

Re: Software API?

Post by wepprop »

Ok, it wasn't hard to reroute from datadirect.webservices.zap2it.com to webservices.schedulesdirect.tmsdatadirect.com. I just put '127.0.0.1 datadirect.webservices.zap2it.com' in /etc/hosts. Then I added the following to /etc/httpd/conf/httpd.conf in the appropriate virtual host:

Code: Select all

RewriteEngine on
RewriteRule ^/tvlistings/xtvdService$ http://webservices.schedulesdirect.tmsdatadirect.com/schedulesdirect/tvlistings/xtvdService [R]
That redirected mythfilldatabase to the proper URL. Now I'll have to sign up, since I guess registrations are open again, and verify it works. Plus make the source and database changes to deal with the increased programid size.

mfarley
Posts: 2
Joined: Sat Aug 25, 2007 10:57 pm

Re: Software API?

Post by mfarley »

wepprop wrote:Ok, it wasn't hard to reroute from datadirect.webservices.zap2it.com to webservices.schedulesdirect.tmsdatadirect.com. I just put '127.0.0.1 datadirect.webservices.zap2it.com' in /etc/hosts. Then I added the following to /etc/httpd/conf/httpd.conf in the appropriate virtual host:

Code: Select all

RewriteEngine on
RewriteRule ^/tvlistings/xtvdService$ http://webservices.schedulesdirect.tmsdatadirect.com/schedulesdirect/tvlistings/xtvdService [R]
That redirected mythfilldatabase to the proper URL. Now I'll have to sign up, since I guess registrations are open again, and verify it works. Plus make the source and database changes to deal with the increased programid size.
Anyone know if the above works?

wepprop
Posts: 4
Joined: Sun Aug 19, 2007 3:40 pm

Re: Software API?

Post by wepprop »

No, it doesn't work. With my shiny new Schedules DIrect userid and password in-hand, I ran mythtv-setup and tried to retrieve my new lineups. However, that query went to "http://webservices.technovera.tmsdatadi ... tvdService". SInce I hadn't redirected that host/URL, no doubt it went to the original z2l servers and, naturally, my new id/password doesn't work there.

Looking at the source, DataDirectURLs are always listed in pairs. The first of the pairs is the one I already knew about. The second one in the older version is the one I encountered above. So, I guessed all I had to do was redirect the second URL the same way. According to MythTV trunk 14304, the new second URL is "http://schedulesdirect.org/login/index.php" So, I redirected to that as well.

But no joy. Every query ends up with an "Error 400 HTTP method GET is not supported by the URL." So, I guess if I really don't want to upgrade MythTV I'll have to use the xmltv file method.

Post Reply