Sign up Login

mPUSH / Can I get an XML feed to Your Content

Follow

Q: Can I get an XML feed to your content?

A: Yes. You will need to purchase the relevant package via your account manager then ask support for your assigned username and password for the feed. Each piece of content you request is chargeable if you don't have this, speak to your account manager for pricing.

 

txtNation Content API 

 

This is the integration document for the content gateway accessed through http://content.txtnation.com/content.php.


URL

 
Parameters are set through to the file through the request string. For example to gain access to the first one hundred truetones within the content gateway the URL that you request would be:


http://content.txtnation.com/content.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&type=truetones

Note that the first parameter sent over has to have a ‘?’ symbol after the filename, then any sequential parameters have to be added with the ‘&’ symbol.

For example the below URL will return the top 5 truetones from the gateway.

http://content.txtnation.com/content.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&type=truetones&top=5

 


Required Parameters

 
These are the parameters that have to be sent over to be able to access the feed data, without them an error will be returned.

account - The account name that you wish to use
password - Please request your unique password from support (note this is not your normal password to access http://cp.txtnation.com)
type - The type of content you wish to select (valid inputs are: ringtones, truetones, images, games, applications)

 


Additional Parameters

 

These parameters handle the functionality of the feed; they will allow you to perform tasks with the data before receiving it so that you get the data in the format you wish.

top - Returns the top downloaded content from the gateway, the argument supplied will limit the results for example top=5 will return the top 5 results
search - Pass a field to be searched (valid inputs are: artist, title, category, default: artist)
 for - The string you wish to use to search the field
limit - Limit the results returned to a certain number (default: 100)
offset - Offset the results given by a certain number (default: 0)


Examples of URL's

 

Top
To return the top 10 for truetones from the gateway

http://content.txtnation.com/content.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&type=truetones&top=10

 

Search

To return a search of artists with the string beatles within ringtones 

http://content.txtnation.com/content.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&type=ringtones&for=beatles

To return a search of title with string love within truetones

http://content.txtnation.com/content.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&type=truetones&search=title&for=love

 

Limit
To return the first 50 results for truetones from the gateway

http://content.txtnation.com/content.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&type=truetones&limit=50

 

Offset

To return 50 results that come after the 50 in the example above from the truetones gateway


http://content.txtnation.com/content.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&type=truetones&limit=50&offset=50

 

 

Content Preview

Getting a content preview requires a call to the preview script with the ID of the piece of content you wish to preview. Please be advised that you hid this link behind PHP at all times, this will keep your system secure.

http://content.txtnation.com/preview.php?content=24523&type=truetones&output=true

 


Content Details

 
Get the details of a piece of any particular single piece of content.

http://content.txtnation.com/details.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&content=24523&type=truetones

 

 

Supported Phones for Games


For games only you will need to provide a dropdown list of the supported phones for each individual game. Below is a feed to produce the list. Just pass the game parameter to retrieve the list for the required game.


http://content.txtnation.com/phones.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&game=57

 

 

Content Download

 
Serving the full piece of content to the user, this is almost the same as the preview link apart from returning the full peace of content. Please be advised that you hid this link behind PHP at all times, this will keep your system secure.


http://content.txtnation.com/download.php?account=demo&password=fe01ce2a7fbac8fafaed7c982a04e229&content=24523&type=truetones


If requesting a game you will need to provide the parameter ‘phone_id’ selected from the above feed for the game in question.


Notice: Any time you send your account password and username you are advised to make sure that the links are processed in the background by PHP or any other server side scripting language for security purposes.


Example PHP Parser

 
If you would like to use our example PHP parser for this feed to aid you in your integration then you can find it on the below link:
http://content.txtnation.com/scripts/parser.zip


Feed

 
The feed is in the RSS 2.0 standard and at the time of writing was validated by W3C.
For more information about this format visit: http://cyber.law.harvard.edu/rss/rss.html

Was this article helpful?
0 out of 0 found this helpful

Comments

Powered by Zendesk