DVBLink Remote API Python library

DVBLink Remote API clients and tools

DVBLink Remote API Python library

Postby Oberon » Wed Apr 11, 2012 8:10 pm

The attachment of this topic contains a set of Python classes that we use in our products to work with DVBLink Connect! Server using its Remote API.
With this library we would like to provide kick-start experience for our users who would like to write their own client for DVBLink Connect! Server.

At the moment there is not much documentation or sample code for this library. We will add them at a later stage. In the meanwhile I will provide a very short introduction to the code, hoping that it is largely self-explaining. As a precondition you need Python version at least 2.4 or greater.

Module data_provider.py contains DataProvider class. This class has a function for each Remote API command.

The data_provider.py module has to be imported using usual import command:
Code: Select all
from data_provider import data_provider

As a result of import operation object named data_provider will be created.

Next step is to initialize this object:
Code: Select all
data_provider.init(app_id, address, port, user_name, password)

where
app_id - is a unique id of the client
address, port, user_name and password are server address, base streaming port and user login credentials

And the last step in initaialization sequence is to start data_provider:
Code: Select all
data_provider.start()


Once started data_provider will connect to the DVBLink server and start grabbing epg information for caching purposes and all functions for Remote API commands can be called.

To stop data_provider its term function has to be called:
Code: Select all
data_provider.term()


The code published "as is" without any guarantees, warranties or obligations. You may use this code in modified or unmodified form in any kind of application.
Attachments
dvblink_remote_api_python_lib.zip
(13.31 KiB) Downloaded 682 times
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am


Re: DVBLink Remote API Python library

Postby DSD » Thu May 03, 2012 5:13 pm

I've been using your Python classes for my XBMC add-on.
Unfortunately some users are experiencing problems running the add-on.
The problem seems to be when retrieving channels and if the channel name contains a non English character, for instance "?".

The function get_channels throws an exception.
I get Dvblink error 2000 which tells me that it is network related but if I remove non English characters from my channels, then everything works just fine...

Is this something that you are familiar with or have experienced when developing e.g. the Boxee app?
DSD
 
Posts: 188
Joined: Sun Jul 19, 2009 7:29 am

Re: DVBLink Remote API Python library

Postby dirk.msc » Sun Mar 22, 2015 1:34 pm

Hi,
I just tried out the API but when I call the get_channel_epg function the server replies with 1003 (not implemented). Why is that and can it be fixed?

Best
Dirk
dirk.msc
 
Posts: 46
Joined: Thu Dec 12, 2013 2:00 am


Return to Development corner

Who is online

Users browsing this forum: No registered users and 4 guests