Skip to content

Instantly share code, notes, and snippets.

@tenebrousedge
Created December 5, 2012 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenebrousedge/4218065 to your computer and use it in GitHub Desktop.
Save tenebrousedge/4218065 to your computer and use it in GitHub Desktop.
Apis Configure information
//database.php
var $apis = array(
'datasource' => 'Apis.ApisSource',
'login' => '',
'password' =>'',
'authMethod' => 'OAuthV2'
);
//some other config file
$config['Apis']['Cloudprint']['oauth'] = array(
'version' => '2.0',
'scheme' => 'https',
'authorize' => 'auth',
'access' => 'token',
'host' => 'accounts.google.com/oauth2',
'scope' => 'https://www.googleapis.com/auth/cloudprint',
'callback' => 'https://splat.dnsd.me/oauth2callback'
);
<?php
$config['Apis']['Cloudprint']['path']['host'] = 'www.google.com/cloudprint';
$config['Apis']['Cloudprint']['path']['create'] = array(
'job' => array('submit' => array(
'printerid',
'title',
'capabilities',
'content',
'contentType',
'optional' => array('tag')
)),
'printer' => array()
);
$config['Apis']['Cloudprint']['path']['read'] = array(
'job' => array('job' => array()),
'printer' => array(
'printer' => array(
'printerid',
'optional' => array('printer_connection_status')
),
'capabilities' => array(
'printerCapabilities' => array('printerid')
),
'search' => array()
)
);
$config['Apis']['Cloudprint']['path']['delete'] = array(
'job' => array(
'deletejob' => array('jobid'))
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment