authenticate_with_app() public static method

public static authenticate_with_app ( $app_id, $app_token )
コード例 #1
0
 public function test()
 {
     try {
         \Podio::setup(Config::get('podio.client_id'), Config::get('podio.client_secret'));
         \Podio::authenticate_with_app(Config::get('podio.post_app_id'), Config::get('podio.post_app_token'));
     } catch (\PodioError $pe) {
         return $pe->getMessage();
     }
 }
コード例 #2
0
ファイル: index.php プロジェクト: jneumann/home-page
    if (isset($v->entities->urls['0']->url)) {
        echo "</a>";
    }
    echo "</div>";
    echo "</div>";
}
?>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-6">
					<h1>Podio</h1>
					<?php 
Podio::setup($config['podio']['client-id'], $config['podio']['client-secret']);
Podio::authenticate_with_app($config['podio']['ww-app-id'], $config['podio']['ww-app-secret']);
$ww = PodioItem::filter($config['podio']['ww-app-id']);
foreach ($ww as $week) {
    if ($week->title == 'Jake Neumann') {
        $week_start = $week->fields['1']->values['start'];
        if (time() - 60 * 60 * 24 * 7 < strtotime($week_start->format('Y-m-d H:i:s'))) {
            // var_dump( $week->fields );
            foreach ((array) $week->fields as $week) {
                foreach ((array) $week as $day) {
                    if (is_object($day) && $day->type == 'app') {
                        echo '<h4>' . $day->label . '</h4>';
                        foreach ($day->values as $proj) {
                            echo '<a href="' . $proj->link . '" target="_blank">';
                            echo $proj->title;
                            echo '</a>';
                            echo '<br />';
コード例 #3
0
ファイル: web_hook.php プロジェクト: arsen-sargsyan/podio_app
 * User: Arsen
 * Date: 2015-08-28
 * Time: 6:14 PM
 */
//composer autoloader
require_once 'vendor/autoload.php';
//load controller
require_once 'controller.php';
// load config file
$config = (require_once 'config.php');
$controller = new Controller();
$controller->init_podio($config);
// Log file
$file = __DIR__ . "/webhook.log";
//  authenticate
Podio::authenticate_with_app($config['app_id'], $config['app_token']);
// Big switch statement to handle the different events
switch ($_POST['type']) {
    // Validate the webhook. This is a special case where we verify newly created webhooks.
    case 'hook.verify':
        PodioHook::validate($_POST['hook_id'], array('code' => $_POST['code']));
        // An item was created
    // An item was created
    case 'item.create':
        $string = gmdate('Y-m-d H:i:s') . " item.create webhook received. ";
        $string .= "Post params: " . print_r($_POST, true) . "\n";
        $item_id = (int) $_POST['item_id'];
        // get item
        $item = PodioItem::get($item_id);
        $item_file = $item->files[0];
        $file = PodioFile::get($item_file->file_id);