NOEO for developers

Integrate NOEO into your existing infrastructure

 

Our API includes following: 

Content-API

 

  • output of all content like blog postings, press releases, images, videos or downloads 
  • generation or upload of new content 

User-API 

 

  • show user profiles 
  • list user generated content 
  • session based login procedure for your mobile app 
  • oAuth based login procedure for your web applications

// use the PHP-SDK

 

require_once ( 'noeo-php56-sdk.php' );

 


// initializing the connection object
API-URL https://noeo.com/api

 

To use the function toolkit, you need to setup the connection, first.

Please use the url of your server and access the api folder. https://noeo.com/api. With the php-sdk you simply have to setup your domain.

 

$noeo= new NOEO (
'https://noeo.com',
'xxx',
'xxx'
);

 


// generate an app access token
method: 'auth', api_key, api_secret

 

You require an apo access token for all following requests. This token will be created with the API_KEY and API_SECRET and is valid for 24 hours.

 

if( empty( $_SESSION['app_access_token'] ) )
$_SESSION['app_access_token'] = $radio -> get_access_token();

 


// user authentication
method: 'login', usr, pwd: md5( password ), access_token

 

For user-specific content, an authentication is required. The user's access token is valid for one hour. For each query with the users access_token the validity period will be extendet to one hour.

 

if( !empty( $username ) && !empty( $password ) )
$_SESSION['user_access_token'] =
$noeo->user_login( $username, $password, $_SESSION['app_access_token'] );

 


// OAuth authentication (alternative to user login)
method: 'auth', api_key, api_secret, oauth: '1', returnurl

 

The oautch method redirects the user to loginpage of the current noeo instace. After the login the user will be redirectet to the 'returnurl' and get  the 'access_token' and 'usr_access_token' as GET-variables.

 

$returnurl = 'https://yourdomain.com';
if( !empty( $_SESSION['app_access_token'] ) )
$oauth_url = $noeo-> get_oauth_url($returnurl);

 


// read own user data
method: 'get', object: 'usr', access_token, usr_access_token

 

After the login a user has access to not public content and the own profile.

 

$noeo->get( 'usr', '', $_SESSION['app_access_token'], $_SESSION['user_access_token'] );

 


// read data of other users
method: 'get', object: 'usr', access_token, usr_access_token

 

The user access token is optional in this case. If the user has a special relation, additional content will be displayed.

 

$options = array( id=>6 );
$noeo->get( 'usr', $options, $_SESSION['app_access_token'], $_SESSION['user_access_token'] );

 


Content API

 

The content of the platform can be obtained from the API to the ID of the content must be passed in the options of the query. With 'start' and 'count' the number of attachments can be controlled.

// read lists
method: 'get', object: 'list', id, start, count, access_token, usr_access_token

 

The user access token ist optional.

 

$options = array( id=>133, start=>0, count=>2 );
$noeo->get( 'list', $options, $_SESSION['app_access_token'], $_SESSION['user_access_token'] /* optional für zugriffsbeschränkte Inhalte */ );

 


// read content
method: 'get', object: 'content', id, start, count, access_token, usr_access_token

 

 

$options = array( id=>753 );
$radio->get( 'content', $options, $_SESSION['app_access_token'], $_SESSION['user_access_token'] /* optional für zugriffsbeschränkte Inhalte */ );