Skip to content

Instantly share code, notes, and snippets.

@mimeoconnect
mimeoconnect / GCP - Control JSON
Created February 8, 2011 05:00
This is an example JSON response for a control of a cloud print job using the Google Cloud Print (GCP) /control interface and the Zend PHP Framework
{
"success": true,
"message": "Job updated successfully."
}
@mimeoconnect
mimeoconnect / GC - Fetch
Created February 8, 2011 06:03
This fetches a list of cloud print jobs using the Google Cloud Print (GCP) /fetch interface and the Zend PHP Framework.
<?php
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Http_Client');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
// ID of the Printer
$Printer_ID = "";
// Gmail User Email
@mimeoconnect
mimeoconnect / GCP - Fetch
Created February 8, 2011 06:08
This is an example JSON response for a fetch of a cloud print job using the Google Cloud Print (GCP) /fetch interface and the Zend PHP Framework.
{
"success": true,
"jobs": [
{
"id": "3432682791683548017",
"title": "CloudPrint_Architecture.pdf",
"status": "QUEUED",
"fileUrl": "http://docs.google.com/printing/download?id\u003d3432682791683548017",
"ticketUrl": "http://docs.google.com/printing/fetch?output\u003dxml\u0026jobid\u003d3432682791683548017"
}
@mimeoconnect
mimeoconnect / CSS Polaroid Photo Layout
Created February 12, 2011 01:01
This provides a CSS template for layout out photos on a page and using for a print photo book.
<style type="text/css">
body{
background-color: #000;
}
#container{
width: 600px; margin: 40px auto;
}
ul.gallery {
@mimeoconnect
mimeoconnect / Pull Flickr with Zend
Created February 12, 2011 04:10
This pulls photos from Flickr using the PHP and the Zend framework.
<?php
require_once 'Zend/Loader/Autoloader.php';
// API Key
$API_Key = '[api key]';
// Register the Zend Auto Loader
$loader = Zend_Loader_Autoloader::getInstance();
// Create New Instance using the Zend REST Client
@mimeoconnect
mimeoconnect / Instgram Tag Filter
Created February 12, 2011 04:14
This is an instagram tag filter applied to a Flickr search using PHP and the Zend framework.
$client->tags("instagram app");
<?php
// include auto-loader class
require_once 'Zend/Loader/Autoloader.php';
// define API key
$API_Key = '[Flickr API Key]';
// register auto-loader
$loader = Zend_Loader_Autoloader::getInstance();
@mimeoconnect
mimeoconnect / Address Book Service - Get User Main Address - GET
Created April 3, 2011 20:03
Pulls the main address associated with authenticated users account.
<?php
require_once "rest_client.php";
//Sandbox
//$root_url = "connect.sandbox.mimeo.com/2010/09/";
$user_name = "[user name]";
$password = "[user password]";
//Live
@mimeoconnect
mimeoconnect / Address Book Service - Create Address - POST
Created April 3, 2011 20:05
This creates a new address for a user.
<?php
require_once "rest_client.php";
//Sandbox
//$root_url = "connect.sandbox.mimeo.com/2010/09/";
$user_name = "[user name]";
$password = "[user password]";
//Live
@mimeoconnect
mimeoconnect / Account Service - User - POST
Created April 3, 2011 20:06
This is a sample PHP code for adding a new user.
<?php
require_once "rest_client.php";
//Sandbox
//$root_url = "connect.sandbox.mimeo.com/2010/09/";
$user_name = "[user name]";
$password = "[user password]";
//Live