New SPAcash API
We´re introducing the SPAcash API,. The first content API for an adult sponsor completely developed by our team of programmers for the free use of all our contents. From now on, there are no limits for you to implement and use SPAcash contents in whatever way you want. Your creativity is the only limit. .
http://www.spacash.com/members/apiHelp/
What is SPAcash API?
It is a WesService REST that provides you with all the necessary information for you to develop a website just like our own, using any scripting language that supports handling of any of the formats supported by our API.
REST architecture is nothing but a simple web interface that uses XML and HTTP to dump resources, therefore, a WebService REST is a web service that has the great advantage of not requiring any type of program download to access the resources (unlike the SOAP protocol). These API resources are accessed by simple HTTP invocations.
You can find more information on this architecture by going to:
http://es.wikipedia.org/wiki/Representational_State_Transfer
How is it used?
Using SPAcash API is as simple as making an HTTP invocation to the WebService and parsing the reply for the invocation.
Implementing the API is really easy. Just by looking at the code used by our White Brand 2.0 will give you a clearer understanding of how it works, but if you still have doubts, we can provide you with some libraries we have already implemented, so you can get the arrays directly and worry about nothing but the logic of the scrip you´ll use on your sites .
What is it for?
The new Content API allows for experienced, and not so experienced webmasters, to do without our sites, and set-up their own content sites with fully-customized designs and logic, right from their own hosting servers. .
We base all our new tools and developments in the premise that webmasters must have complete control over what they want to offer and sell. Therefore, our API is the best alternative to reach those goals, which are the foundation of the new concepts SPAcash has introduced this year.
How do I access the API?
The first version of this WebService is available at:
http://api.spacash.com/content/v1/
Functionality and Stability:
SPAcash API is fully optimized as far as code and functioning is concerned, to obtain much better response speeds than any other tool or resource we´ve launched previously. To assure this level of performance, we´ve designed several rules which protect the system from ill-intentioned users. For your own peace of mind, you must make sure your sites comply with these rules, so you don´t have problems or errors in the future.
How to update to future versions?
The current implementation of the API has been thought out to allow future new versions of the protocol with more features and/or information. That´s why we´ve placed this first version within the /content/v1/ directory, which will allow the v1 to coexist with future versions of the same API . As soon as a new version of this API is announced, webmasters will be able, if they wish to do so, to make the transition by adapting the URL of your invocations, and making the necessary changes on a path level.
Which are the reply formats?
Our Content API has been designed according to the latest data transfer technologies for web platforms. The objective is that any webmaster can access them programming-wise, without having to implement new technologies and without having to learn new programming languages.
SPAcash´ philosophy has always been to adapt our resources to the webmaster´s needs, and not for the webmasters to adapt to our resources. That´s why SPAcash API has been developed to support 3 different ways of encoding the information, which are also the most used by our affiliates: (XML, JSON, and serialized PHP) .
Following this line of thought, the API foresees the possibility of easily adding new formats without compatibility issues.
Basic API structure: :
Sticking with the REST philosophy, we´ve designed a scheme of URI´s in order to easily access all the information for SPAcash´s contents.
This scheme, which we´ve named Namespaces, provides an organized information structure which allows for the easy understanding of its behavior .
Namespaces:
The generic URL to invoke the resource has the following structure:
http://domain/apitype/apiversion/type/subtype/[id.....]?paramlist
URL components:
domain: It is the domain we use to access the API. In our case, it will be the fixed domain api.spacash.com.
apitype: It is the type of information returned by the API. We are planning to launch future versions of the API with other types of information, but right now, we´re focusing on content so its value will be content.
apiversion: As we explained earlier, there will be successive versions of the API and the version is specified in the invocation URL as v#.
Right now, the only available version is the first version so this parameter will be v1.
The three parameters we just explained make up the fixed part of the URL. The rest of the parameters will take variable values according to the need and the type of content to be accessed.
The API delivers two types of resources: item type or list type.
item type resources provide information that´s specific and related to each item (dvd, scene, model, etc).
List type resources are just a collection or list of items.
type: indicated the type of content to be accessed. Its possible values are: movies, cams and dating. .
subtype: indicates the sub-type of content to be accessed. Depending on the type selected, there will be different corresponding subtypes.
For example, if the selected type is movies, the following subtypes will be available: dvds, scenes, models, tags.
id: It identifies the requested item. Generally used from a list of items.
paramlist: It specifies a list of parameters and values used to modify the results returned from the API.
You may see further information and details for each parameter and its possible values in the Content API section of SPAcash.
http://www.spacash.com/members/apiHelp/
Examples of use:
-Get a list of 10 DVDs in HTML format.
http://api.spacash.com/content/v1/movies/dvds
Example of the array obtained
-Get a list of 10 DVDs in JSON format
http://api.spacash.com/content/v1/movies/dvds?fmt=jsonv
Data may be recovered in Javascript or PHP.
-Get a list of 10 DVDs in PHP format
http://api.spacash.com/content/v1/movies/dvds?fmt=php
Data may be recovered in PHP.
-Get a list of 10 DVDs in XML format
http://api.spacash.com/content/v1/movies/dvds?fmt=xml
Data may be recovered in some PHP type with XML handling.
- Get a list of 15 webcams online
http://api.spacash.com/content/v1/cams?status=online&qty=15
- Get a list of users, for the French market, of ages between 18 and 20 years old.
http://api.spacash.com/content/v1/dating/people?lang=fr&depth=1&status=online&age=18-20
Use your wit along with the powerful SPAcash API to create content sites in your own hosting servers, with the logic and styles you want.






