All content and services are licenced under a Attribution-NonCommercial-ShareAlike Creative Commons Licence (see our Terms of Service).
> Using NewsIsFree's API
|
For using NewsIsFree's API you need to be a registered user and have a personal application key. For getting your personal application key, please, contact us. For using clipPost and unclipPost functions you need to have a Premium Account. All the API functions may return API response structure with corresponding response code and response message. This structure is always returned on errors. Some of the functions return this structure with successfull code (it is mentioned in function description).
<?
Status response code definitions:
|
<?
//php5 client
$client = new SoapClient("http://newsisfree.com/nifapi.wsdl",array("trace" => 1, "exceptions" => 0));
$result = $client->some_API_func($param1, $param2,....,$paramn);
//pear soap client
require_once('SOAP/Client.php');
$client = new SOAP_Client('http://newsisfree.com/nifapi.wsdl');
$param = array();
$param = array('param1'=>'param1','param2'=>'param2',.....,'paramn'=>'paramn');
$result = $client->call('some_API_func', $param);
// nusoap client
require_once('nusoap.php');
$client = new nusoapclient('http://newsisfree.com/nifapi.wsdl', true);
$param = array();
$param = array('param1'=>'param1','param2'=>'param2',.....,'paramn'=>'paramn');
$data = $client->call('some_API_func', $param);
?>
> createUser(login, password, email, deflang, username, createdby)
Function "createUser" creates a new user with basic service on this site which is free. You need to be a registered user to create new users. New account also entitles you to 30 days free evaluation of our Premium Portal Service and Premium Export Services. After that period, if you don't want to sign up for the Premium Services (separate registration), the premium features will be simply disabled.\n";
- application_key (string) - application key;
- login (string) - user login;
- password (string) - user password;
- createdLogin (string) - new user password;
- createdPassword (string) - new user password;
- email (string) - new user email;
- deflang (string) - user default language code (e.g. en, fr, it);
- username (string) - user name;
- "response_code": result response code
- "response_message": result response message.
