Documentation

Exporting XML Lists

Working with lists is very simple. This document provides programmatic access to read data from XML files created in the SocialTVHub platform.
If you need general information about the SocialTVHub platform visit the FAQ section.

The files lists.xml and list[list_id].xml is private for each user. You can the XML Path of your user visiting the User Menu section in the SocialTVHub platform.

File lists.xml

Location: [XML-PATH]/lists.xml

Field Type Description

lists

Array

Array that contains the current lists available for download

list

Array

Each of the current lists that are published

list_id

Integer

List ID, necessary to know the location of the XML file containing the list (for example list100.xml).

list_name

Text

Name of the list. This name is given by the user in the platform, before exporting the list.

last_modified

Datetime

Date of publication of the list. This field will show the date when the list has been sent for the last time.

Exemple

lists.xml

Link: Download the example file
<?xml version="1.0" encoding="ISO-8859-1"?>
<lists>
	<list>
		<list_id>182</list_id>
		<list_name>NEWS</list_name>
		<<last_modified>05/02/2016 12:25:49</last_modified>
	</list>
	<list>
		<list_id>181</list_id>
		<list_name>NEWS</list_name>
		<last_modified>05/02/2016 11:00:20</last_modified>
	</list>
	<list>
		<list_id>178</list_id>
		<list_name>New List 04/02/2016</list_name>
		<last_modified>04/02/2016 12:15:52</last_modified>
	</list>
</lists>

File list[list_id].xml

Location: [XML-PATH]/list[list_id].xml

Field Type Description

list

Array

Array of the current list.

list_id

(Attribute) Integer

Id of the list

list_name

(Attribute) Text

Name of the list

last_modified

(Attribute) Datetime

Date of publication of the list. This field will show the date when the list has been sent for the last time.

elem

Array

Array that contains each of the messages in the list

content_id

String

ID of the message

content_type

String

Type of message ("twitter", "facebook", "instagram", "customtext"...)

from_name

String

Username of the poster (for example @user1)

from_screen_name

String

Real name of the poster (for example "John Booth")

from_id

Integer

ID of the poster

message

Text

Body of the message

created_time

Timestamp

Publication date of the message, usually in UNIX Timestamp format (in seconds)

media_url

Text

URL of the media (picture, video, audio) attached to the message

profpic

Text

URL of the profile picture of the user, in high quality (usually 200x200px or better)

position

Integer

Position of the message in the list.

Example

list182.xml

Link: Download example file
<list list_id="182" list_name="NEWS" last_modified="05/02/2016 12:25:49">
	<elem>
		<content_id>695559492545683456</content_id>
		<content_type>twitter</content_type>
		<from_name>CNN</from_name>
		<from_screen_name>@CNN</from_screen_name>
		<from_id>759251</from_id>
		<message>
			Who won #DemDebate?Bernie vs. Hillary is "genuine philosophical contest" says one analyst
		</message>
		<created_time>Fri Feb 05 10:48:00 +0000 2016</created_time>
		<media_url>http://pbs.twimg.com/media/CacfrE_W0AA6Avl.jpg</media_url>
		<profpic>
			http://pbs.twimg.com/profile_images/508960761826131968/LnvhR8ED_200x200.png
		</profpic>
		<position>1</position>
	</elem>
	<elem>
		<content_id>695514561789759489</content_id>
		<content_type>twitter</content_type>
		<from_name>CNN</from_name>
		<from_screen_name>@CNN</from_screen_name>
		<from_id>759251</from_id>
		<message>
			Brazil and Jamaica have found some clever ways to focus attention on the #Zikavirus
		</message>
		<created_time>Fri Feb 05 07:49:28 +0000 2016</created_time>
		<media_url>http://pbs.twimg.com/media/Cab2zxLW8AQ-MO_.jpg</media_url>
		<profpic>
			http://pbs.twimg.com/profile_images/508960761826131968/LnvhR8ED_200x200.png
		</profpic>
		<position>2</position>
	</elem>
	<elem>
		<content_id>695524837867958276</content_id>
		<content_type>twitter</content_type>
		<from_name>CNN</from_name>
		<from_screen_name>@CNN</from_screen_name>
		<from_id>759251</from_id>
		<message>
			@cnnbrk: UN group: Julian Assange has been arbitrarily detained by being forced to stay in embassy in London to avoid arrest.
		</message>
		<created_time>Fri Feb 05 08:30:18 +0000 2016</created_time>
		<media_url/>
		<profpic>
			http://pbs.twimg.com/profile_images/508960761826131968/LnvhR8ED_200x200.png
		</profpic>
		<position>3</position>
	</elem>
</list>



How to create templates for the SocialTVHub CasparCG Client

The SocialTVHub CasparCG Client is a free software available for download from the SocialTVHub platform. This software will read the lists created in the platform in real time and will communicate with the CasparCG Server in order to show the social messages on screen using HTML or Flash templates.

Users can create their own HTML or Flash templates. Some Social Media template examples are available for download in the platform. However, if you want to create your own templates, follow this simple guidelines.

The Social Media templates (HTML or Flash) need to be read to process the dynamic data in regular XML TemplateData format from CasparCG, using the following fields:

Fields for TemplateData in CasparCG

Field Type Description

content_type

String

Type of message ("twitter", "facebook", "instagram", "customtext"...)

from_user

String

Username of the poster (for example @user1)

from_name

String

Real name of the poster (for example "John Booth")

message

Text

Body of the message.

profpic

String

URL of the profile picture of the user, in high quality (usually 200x200px or better)

media_url

String

URL of the media (picture, video, audio) attached to the message.

If you need more information about how to create social media templates for CasparCG visit www.casparcg.com and the CasparCG forum.