Our API includes following:
require_once ( 'noeo-php56-sdk.php' );
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'
);
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();
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'] );
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);
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'] );
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'] );
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.
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 */ );
$options = array( id=>753 );
$radio->get( 'content', $options, $_SESSION['app_access_token'], $_SESSION['user_access_token'] /* optional für zugriffsbeschränkte Inhalte */ );