{"id":218,"date":"2010-05-31T23:59:59","date_gmt":"2010-06-01T06:59:59","guid":{"rendered":"http:\/\/35.225.155.113\/blog\/index.php\/2010\/05\/31\/perl_module_webserviceviddler_on_cpan\/"},"modified":"2019-10-13T12:45:37","modified_gmt":"2019-10-13T19:45:37","slug":"perl-module-webserviceviddler-on-cpan","status":"publish","type":"post","link":"https:\/\/www.weinstein.org\/blog\/index.php\/2010\/05\/perl-module-webserviceviddler-on-cpan.html","title":{"rendered":"Perl Module WebService::Viddler on CPAN"},"content":{"rendered":"<p>Back in March I outlined <a href=\"http:\/\/pdw.weinstein.org\/2010\/03\/viddler-api-via-perl.html\">an idea<br \/>\nfor a Perl module for accessing the video service Viddler<\/a>. As I<br \/>\nnoted, at the time, while there was plenty of support for the <a href=\"http:\/\/developers.viddler.com\/documentation\/api\/\">Viddler<br \/>\nApplication Programming Interface<\/a> via PHP, the support for Perl was<br \/>\nquite anemic.<\/p>\n<p>To help rectify the situation, in my<br \/>\n&#8220;copious&#8221; free time I&#8217;ve been working on an Perl module that<br \/>\nwraps around Viddler&#8217;s API. The goal being to provide a quick method<br \/>\nfor integrating Perl-based applications with Viddler.<\/p>\n<p>Today, I&#8217;m happy to announce the first working release of my effort, <a href=\"http:\/\/search.cpan.org\/%7Epdw\/WebService-Viddler-0.10\/lib\/WebService\/Viddler.pm\">WebService::Viddler<\/a>, which can be found at<br \/>\n<a href=\"http:\/\/www.cpan.org\/\">CPAN<\/a> (Comprehensive Perl Archive Network).<\/p>\n<p>As I mentioned, at the heart of things,<br \/>\nWebService::Viddler is an object-oriented encapsulation of the<br \/>\nViddler video platform providing a Perl specific focus for access via their public API, which<br \/>\nitself is documented at:<br \/>\n<a href=\"http:\/\/developers.viddler.com\/documentation\/api\/\">http:\/\/developers.viddler.com\/documentation\/api\/<\/a><\/p>\n<p>Currently this module is, at best, beta quality code and only<br \/>\nsupports version 1 of the Viddler API. Moreover, while it handles most of the<br \/>\nv1 API methods, it currently lacks support for the two commenting<br \/>\nrelated methods, <a href=\"http:\/\/developers.viddler.com\/documentation\/api\/method-videos-comments-add\/\">videos-comments-add<\/a> and <a href=\"http:\/\/developers.viddler.com\/documentation\/api\/method-videos-comments-remove\/\">videos-comments-remove<\/a> (a<br \/>\nmore complete To Do list can be found in the provided <a href=\"http:\/\/cpansearch.perl.org\/src\/PDW\/WebService-Viddler-0.10\/README\">README<\/a> file.<\/p>\n<p>Of course the advantage of the module is that it makes including<br \/>\nViddler in a Perl-based application, dead simple:<\/p>\n<div style=\"padding: 10px; background-color: rgb(0, 0, 0); color: rgb(23, 240, 23);\">\n<pre>#!\/usr\/bin\/perl -T\nuse strict;\nuse warnings;\nuse WebService::Viddler;\nuse Data::Dumper;\n# Create our object and establish a session\nmy $videos = new WebService::Viddler(\napiKey =&gt; '123456ABCDEF',\nusername =&gt; $username,\npassword =&gt; $password,\n);\n# Get and print the API version is use\nprint \"API Version: \" .$videos-&gt;api_getInfo(). \"\\n\";\n# Upload a video providing required information such as the\n# title, tag and description\n$videos-&gt;videos_upload(\n\"Moon\",\n\"Moon\",\n\"A little video clip of...\",\n\"0\",\n\"\/home\/pdw\/temp\/Moon.mp4\",\n\"\"\n);\n# Get the details of the given video and\n# use Data::Dumper help print out the values in the list results\nprint Dumper( $videos-&gt;videos_getDetailsByUrl(\n\"http:\/\/www.viddler.com\/explore\/pdweinstein\/videos\/3\/\" ));\n# Get a list of videos by the given tag and\n# use Dumper to help print out the values in the list results\nprint Dumper( $videos-&gt;videos_getByTag( \"moon\" ));\n<\/pre>\n<\/div>\n<p>Questions, bugs and code suggestions are of course welcomed!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in March I outlined an idea for a Perl module for accessing the video service Viddler. As I noted, at the time, while there was plenty of support for the Viddler Application Programming Interface via PHP, the support for Perl was quite anemic. To help rectify the situation, in my &#8220;copious&#8221; free time I&#8217;ve [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83,3],"tags":[289,7,44,281,290,4],"_links":{"self":[{"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/218"}],"collection":[{"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":2,"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":698,"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/218\/revisions\/698"}],"wp:attachment":[{"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weinstein.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}