Page 1 of 2

Software API?

Posted: Thu Aug 16, 2007 10:46 pm
by joelw
When will a software API be available for review?
Thanks for picking up where Zap2It left off!


Joel Winarske

Re: Software API?

Posted: Thu Aug 16, 2007 11:06 pm
by rmeden
probably not until after 9/1. It's exactly the same as Z2L, just with a different URL.

Re: Software API?

Posted: Thu Aug 16, 2007 11:16 pm
by joelw
great, thanks!

Re: Software API?

Posted: Fri Aug 17, 2007 10:42 am
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.

Re: Software API?

Posted: Fri Aug 17, 2007 10:48 am
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

Re: Software API?

Posted: Fri Aug 17, 2007 10:54 am
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.

Re: Software API?

Posted: Sun Aug 19, 2007 3:46 pm
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...

Re: Software API?

Posted: Sat Aug 25, 2007 2:22 pm
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.

Re: Software API?

Posted: Sat Aug 25, 2007 10:59 pm
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?

Re: Software API?

Posted: Sun Aug 26, 2007 12:14 pm
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.