diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-09-12 07:03:28 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-09-12 07:03:28 +0000 |
commit | ced7e68b6f080cc9634fd1dafe44acf56dd3c861 (patch) | |
tree | 51a84ee3346363452ce2aafd765286cc7e6321d4 | |
parent | c2721a1f5a097cdda76bf7c77144eea5f2a61c06 (diff) |
Start on script to request slot in the time table.
-rw-r--r-- | frikanalen/bin/gettimeslot | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/frikanalen/bin/gettimeslot b/frikanalen/bin/gettimeslot new file mode 100644 index 0000000..c71c83e --- /dev/null +++ b/frikanalen/bin/gettimeslot @@ -0,0 +1,37 @@ +#!/usr/bin/perl +# +# Author: Petter Reinholdtsen +# Date: 2010-09-12 +# License: GNU General Public license v2 or later +# +# http://wiki.nuug.no/grupper/video/pubfrikanalen +# +# API description is at +# https://admin.frikanalen.tv/ScheduleSite/ScheduleProxyWebService.asmx + +use strict; +use warnings; + +use Getopt::Std; + +# SOAP:Lite må modifiseres til å gjøre ting på MS måten :-/ +use SOAP::Lite on_action => sub {sprintf '%s/%s', @_}, 'trace', 'debug'; + +# First one need to log in with a valid user + +# Then one can ask for the schedule +my $soap = new SOAP::Lite + -> uri('http://never.no') + -> proxy('https://admin.frikanalen.tv/ScheduleSite/ScheduleProxyWebService.asmx'); +$soap->readable(1); +my $res; +my $obj = $soap->GetItems( + SOAP::Data->name('startTimeUtc' => '2010-09-12T12:00:00'), + SOAP::Data->name('endTimeUtc' => '2010-09-12T15:00:00')); +unless ($obj->fault) { + return $obj->result->{string}; +} else { +# print Dumper($obj); + print $obj->fault->{faultstring}, "\n"; + return undef; +} |