Thursday, March 12, 2015
Enhanced object properties in the PHP and Ruby libraries
While creating and modifying hashes is straightforward, sometimes you want a true object and the benefits that come with using one, such as type checking or introspection. To enable this, the PHP and Ruby client libraries can now provide objects as the results of API calls, in addition to supporting hash responses.
Ruby gets this for free with the latest version of the gem. For PHP, you have to enable support in the client instance:
$apiClient = new apiClient();The following examples for PHP and Ruby retrieve an event via the Calendar API, and use data from the new resulting object:
$apiClient->setUseObjects(true);
PHP:
$event = $service->events->get("primary", "eventId");
echo $event->getSummary();Ruby:result = client.execute(If you have general questions about the client libraries, be sure to check out the client library forums (PHP and Ruby). For questions on specific Apps APIs come find us in the respective Apps API forum.
:api_method => service.events.get,
:parameters => {calendarId => primary,
eventId => eventId})
print result.data.summary
| Dan Holevoet profile Dan joined the Google Developer Relations team in 2007. When not playing Starcraft, he works on Google Apps, with a focus on the Calendar and Contacts APIs. Hes previously worked on iGoogle, OpenSocial, Gmail contextual gadgets, and the Google Apps Marketplace. |
5 things you didnt know you could do with the Google Drive API
Have you tried using the Google Drive API? If so, you’re aware that it allows you to programmatically manage a user’s Google Drive and build applications to manipulate files stored in the user’s account. However, the API might still be capable of doing a few things you didn’t know about. Here is a list of five specific use cases and how each of them can be addressed with the API.
1) Sharing a file with the world
When a file in Google Drive is shared publicly, it can be downloaded without authentication at the URL provided by the API in the webContentLink field of the Files resource. To retrieve that value, send a GET request to retrieve the file metadata and look for the webContentLink element in the JSON response, as in the following example:
{
"kind": "drive#file",
"id": "0B8E...",
"etag": "WtRjAP...",
"selfLink": "https://www.googleapis.com/drive/v2/files/0B8E...",
"webContentLink": "https://docs.google.com/a/google.com/uc?id=0B8E...",
...
}
2) Granting comment-only access to a user
When setting permissions for a file with the Drive API, you can choose one of owner, writer and reader as the value for the role parameter. The Drive UI also lists another role, commenter, which is not allowed for that parameter.
In order to grant comment-only access to a user with the Drive API, you have to set the role parameter to reader and include the value commenter in the list of additionalRoles, as in the following example:
{
"kind": "drive#permission",
...
"role": "reader",
"additionalRoles": [
"commenter"
],
...
}
3) Listing all files in the root folder
It is possible to restrict the list of files (and folders) returned by the Drive API by specifying some search criteria in the q query parameter. Each file has a parents collection listing all folders containing it, and the root folder in Google Drive can be conveniently addressed with the alias ‘root’. All you need to do to retrieve all files in that folder is add a search query for element with ‘root’ in their parents collection, as in the following example:
GET https://www.googleapis.com/drive/v2/files?q=root in parents
Remember to URL-encode the search query for transmission unless you are using one of the available client libraries.
4) Finding how much quota is available in the user’s account
Your application might need to know if users have enough available quota to save a file, in order to handle the case when they don’t. Quota information is available in the About feed of the Drive API:
{
"kind": "drive#about",
...
"quotaBytesTotal": "59055800320",
"quotaBytesUsed": "14547272",
"quotaBytesUsedInTrash": "511494",
...
}
The feed includes three values related to quota management: quotaBytesTotal, quotaBytesUsed and quotaBytesUsedInTrash. The first value indicates the total amount of bytes available to the user (new accounts currently get 5GB for free) while the second one tells how many of those bytes are in use. In case you need to get more free space, you can use the last value to know how many bytes are used by files that have been trashed. An application might use this value to recommend emptying the trash bin before suggesting to get additional storage.
5) Discovering if one of the user’s apps can open a file
Google Drive allows users to store any kind of file and to install applications to open file types that are not directly supported by the native Google applications. In case you need to know what applications are installed and what file types each of them can open, you can retrieve the Apps feed and look for the primaryMimeTypes and secondaryMimeTypes elements for supported MIME types or primaryFileExtensions and secondaryFileExtensions for file extensions:
{
"kind": "drive#app",
"name": "Pixlr Editor",
...
"primaryMimeTypes": [
"image/psd",
"image/pxd",
"application/vnd.google-apps.drive-sdk.419782477519"
],
"secondaryMimeTypes": [
"image/png",
"image/jpeg",
"image/gif",
"image/bmp"
],
"primaryFileExtensions": [
"pxd",
"psd"
],
"secondaryFileExtensions": [
"jpg",
"png",
"jpeg",
"bmp",
"gif"
],
…
}
Note: to access the Apps feed you have to request access to the https://www.googleapis.com/auth/drive.apps.readonly OAuth scope.
![]() | Claudio Cherubino profile | twitter | blog Claudio is an engineer in the Google Drive Developer Relations team. Prior to Google, he worked as software developer, technology evangelist, community manager, consultant, technical translator and has contributed to many open-source projects. His current interests include Google APIs, new technologies and coffee. |
Monday, March 9, 2015
The next Marketing Test Kitchen celebrating customer success
Congratulations to the 6 winners, who will get additional exposure on the featured and notable section of the Marketplace front page:
Outright, Producteev, Insync, Mavenlink, Zoho and Manymoon
Established vendors such as Manymoon and Zoho improved performance of existing buttons and newer folks like Outright and Producteev added buttons to capture new business. If you didn’t get your button up for last week’s contest, that doesnt mean you shouldn’t do it now! Adding a button helps improve your overall performance in the Marketplace and will prepare you for future initiatives.
Now let’s take a look at the next Marketing Test Kitchen...
The Next Challenge:
Publish your most compelling customer success stories by Thursday, Dec 2nd on your own blog and share it with us at marketing-test-kitchen@google.com. We will feature a few of the top stories on the Google Enterprise Blog (see examples here and here) and also rotate the winning vendors into the featured and notable sections on the Marketplace front page. Note we will feature every submission in the Marketplace Success Stories blog, so just by submitting a story you will end up on the front page of the Marketplace.
It’s easy to participate: Find a compelling customer, tell their story, publish it on your blog, share it with us, and track your performance.
What makes a compelling customer?
It is important to find a customer that demonstrates the value of your integrated features with Google Apps. Make sure that your customer gives explicit approval for using their story. Here are some qualities of a compelling customer.
- Highlights the value of your app: For example, their use of your app in conjunction with various other web apps, such as other Marketplace apps.
- Hard data to support success: Numbers that justify strong gains are important, ie: 50% productivity gains, 10% increase in revenue, 20% reduction in IT costs.
- Passionate about Google Apps and the cloud: A genuinely passionate customer can explain the advantages of a cloud-based business and more easily help prospects understand and transition.
You can use the standard template from the developer site or find a more creative way to deliver it. You can create your own format that tells the story of the customer’s success. Here are some ideas to go beyond a typical blog post:
- Be visual: Use tools such as Picnik and Aviary to tell your story with compelling visuals (or choose another creative tool).
- Organize your presentation: You can use Google Presentations or SlideRocket to succinctly tell your story.
- Use video: Shoot or animate a video of your customer telling their Apps Marketplace story.
- Be creative: Combine the above ideas, write a story, or come up with something totally different.
It’s easy to be a part of this new Marketing Test Kitchen. Just find a compelling customer, use a clever way to tell their story, publish it to your blog and share it by email. If you need more time, email us with your ideas as well! Make sure to track the performance of your blog post (and all other marketing efforts) through Google Analytics, learn how to code links and track traffic on the developer site.
Come up with the next Marketing Test Kitchen: Submit your idea via Buzz or email. We’ll evaluate the ideas and use the best ones for future initiatives. If we choose your initiative, we’ll give you a special prize.
Posted by Harrison Shih, Associate Product Marketing Manager, Google Apps Marketplace
Using OAuth 1 0 Long Lived Tokens from OAuth Playground with the Python Client Library
The OAuth Playground is a great tool to learn how the OAuth flow works. But at the same time it can be used to generate a "long-lived" access token that can be stored, and used later by applications to access data through calls to APIs. These tokens can be used to make command line tools or to run batch jobs.
In this example, I will be using this token and making calls to the Google Provisioning API using the Python client library for Google Data APIs. But the following method can be used for any of the Google Data APIs. This method requires the token is pushed on the token_store, which is list of all the tokens that get generated in the process of using Python client libraries. In general, the library takes care of it. But in cases where it’s easier to request a token out of band, it can be a useful technique.
Step 1: Generate an Access token using the OAuth Playground.
Go through the following process on the OAuth Playground interface:
- Choose scope(s) of every API you want to use in your application (https://apps-apis.google.com/a/feeds/user/ for the Provisioning API) . Here you can also add scopes which are not visible in the list.
- Choose an encryption method that is the signature method to encode your consumer credentials. (“HMAC-SHA1” is the most common)
- Enter your
consumer_keyandconsumer_secretin the respective text fields. The consumer_key identifies your domain and is unique to each domain.
After entering all the required details you need to press these buttons on the OAuth Playground in sequence:
- Request token: This will call Google’s OAuth server to issue you a request token.
- Authorize: This will then redirect you to the authorization URL where you can authorize or deny access. At this point if you deny the access you will not be able to generate the Access token. Accepting this will convert the Request token generated in the last step into an Authorized Request token.
- Access token: Finally, this step will exchange the authorized Request token for an Access token.
After the last step the text field captioned auth_token in the OAuth Playground has the required Access token and that captioned access_token_secret has the corresponding token secret to be used later.
Step 2: Use the above token when making calls to the API using a Python Client Library.
Here is an example in Python which uses the OAuth access token that was generated from OAuth Playground to retrieve data for a user.
CONSUMER_KEY = “CONSUMER_KEY”
CONSUMER_SECRET = “CONSUMER_SECRET”
SIG_METHOD = gdata.auth.OAuthSignatureMethod.HMAC_SHA1
TOKEN = “GENERATED_TOKEN_FROM_PLAYGROUND”
TOKEN_SECRET = “GENERATED_TOKEN_SECRET_FROM_PLAYGROUND”
DOMAIN = “your_domain”
client = gdata.apps.service.AppsService(source=”app”, domain=DOMAIN)
client.SetOAuthInputParameters(SIG_METHOD, CONSUMER_KEY, consumer_secret=CONSUMER_SECRET)
temp_token = gdata.auth.OAuthToken(key=TOKEN, secret=TOKEN_SECRET);
temp_token.oauth_input_params = client.GetOAuthInputParameters()
client.SetOAuthToken(temp_token)
#Make the API calls
user_info = client.RetrieveUser(“username”)
It is important to explicitly set the input parameters as shown above. Whenever you call SetOuthToken it creates a new token and pushes it into the token_store. That becomes the current token. Even if you call SetOauthToken and SetOAuthInputParameters back to back, it won’t set the input params for the token you set.
Other Practices:
You can use the long-lived token to make command line requests, for example using cURL. It can be useful when you need to counter-check bugs in the client library and to test new features or try to reproduce issues. In most cases, developers should use the client libraries as they are designed, as in this example.
![]() | Gunjan Sharma Profile | Twitter Gunjan is a Developer Programs Engineer working on Google Apps APIs. Before joining Google, he completed his degree in Computer Science & Engineering from Indian Institute of Technology, Roorkee. |
Tuesday, March 3, 2015
Change the Colors Features of items on Different Slides in PowerPoint!

This one won the poll by a landslide!
Please note, this doesnt work in all versions of PowerPoint. Please let me know if it works/doesnt work in your PowerPoint version!



If you want to know how to change the formatting in the first place, try these tutorials:






For next weeks poll, Ill be adding an option based on the request of one of my lovely coworkers... how to make a photo mosaic! I love making these as gifts! I cant take credit for having created this one, but it was easier to take it from the internet than to text all of my friends to see if theyd mind me posting their photos online!
Sunday, March 1, 2015
The Horizon Report 2005 Edition Just Read It!
"...The technologies chosen for the 2005 Horizon Report are framed within three adoption horizons that presume three different assumptions about when the targeted technologies will begin to see significant adoptions on university campuses...
Time-to-Adoption Horizon: One Year or Less
- Extended Learning - On some campuses, traditional instruction is augmented with technology tools that are familiar to students and used by them in daily life. Extended learning courses can be conceptualized as hybrid courses with an extended set of communication tools and strategies. The classroom serves as a home base for exploration, and integrates online instruction, traditional instruction, and study groups, all supported by a variety of communication tools.
- Ubiquitous Wireless - With new developments in wireless technology both in terms of transmission and of devices that can connect to wireless networks, connectivity is increasingly available and desired. Campuses and even communities are beginning to regard universal wireless access as a necessity for all.
Time-to-Adoption Horizon: Two to Three Years
- Intelligent Searching - To support people?s growing need to locate, organize, and retrieve information, sophisticated technologies for searching and finding are becoming available. These agents range from personal desktop search ?bots,? to custom tools that catalog and search collections at an individual campus, to specialized search interfaces like Google Scholar.
- Educational Gaming - Taking a broad view of educational gaming, one finds that games are not new to education. Technology and gaming combine in interesting ways, not all of which are about immersive environments or virtual reality. What is evolving is the way technology is applied to gaming in education, with new combinations of concepts and games appearing on the horizon.
Time-to-Adoption Horizon: Four to Five Years
- Social Networks & Knowledge Webs - Supplying people?s need to connect with each other in meaningful ways, social networks and knowledge webs offer a means of facilitating teamwork and constructing knowledge. The underlying technologies fade into the background while collaboration and communication are paramount.
- Context-Aware Computing/Augmented Reality - These related technologies deal with computers that can interact with people in richer ways. Context-aware computing uses environmental conditions to customize the user?s experience or options. Augmented reality provides additional contextual information that appears as part of the user?s world. Goals of both approaches are increased access and ease-of-use..."
Saturday, February 28, 2015
OpenDOAR The Directory of Open Access Repositories
What?- Survey the growing field of academic open access research repositories and categorise them in terms of locale, content and other measures.
- Produce a descriptive list of open access repositories of relevance to academic research.
- Provide a comprehensive & authoritative list for end users wishing to find particular types of, or specific repositories.
- Deliver a comprehensive, structured and maintained list with clear update and self-regulation protocols to enable development of the list.
- Play a prominent international role in the organisation of and access to open access repository services.
- Support Open Access outreach and advocacy endeavours within institutions and globally.
Friday, February 27, 2015
Creating and Testing T L Strategies for the Virtual Classroom
Full Title: Creating and Testing Teaching/Learning Strategies for the Virtual Classroom "...the purpose of this study is to define and describe teaching/learning strategies for use in distance education, use those strategies in designing distance education instruction, and test their effectiveness. Three theoretical frames were used in the creation of the strategies: adult educational theory; brain-based educational theory; and the Effective Distance Education Model."
Findings:
- Teaching/learning strategies developed within a theoretical frame of adult education, brain-based education and the Effective Distance Education Model can be effective when used in the virtual, graduate classroom.
- Inexperienced instructors need additional help to succeed, and therefore should go through induction programs, which consists of training, support, and sustained feedback in a collaborative environment.
- Training sessions should be designed to acquaint the teacher with distance education teaching strategies.
- It is recommended to pair the new teacher with an experienced teacher to provide the new teacher with a role model, friend, advisor, and confidante (mentor).
- Encourage the role of reflection in the development of teaching skills as teachers learn to know themselves and view themselves through the eyes of their students, their colleagues, and the professional literature (e.g. video tape the instructor and review, periodic assessments of the teacher by students, participation in informal professional-development groups, and study professional literature.)

Thursday, February 12, 2015
The Next iPhone Dissected
http://www.gizmodo.com
There are a number of interesting facts gained from the dissection, the most important of which is more concrete confirmation (as if we needed any more) that this phone is from Apple. There are three separate places, inside the case, where APPLE is written prominently.
I wanted to make sure I didnt damage the components beyond repair, so I didnt take the metal off. So this is as much as I could learn without actually breaking the phone. And this is why I couldnt find out if there was an A4 processor—like the iPads—in this iPhone. I also couldnt really identify many parts, because they were hidden under the metal sheath.
Once the guts are out, all you have left is the screen. The back of the screen (on the inside) is a shiny mirror, and if youre not careful when taking it apart, you can scratch the face of the phone from the back, like a CD.
If it wasnt obvious by the micro-SIM card, this particular phone most likely wasnt for Verizon. Thats not to say that there isnt a Verizon phone in the works, but Im pretty sure what I held in my hand was not it.
No, the battery is not user-removable. You have to open the case to get at it.
Second, Apple really, really shrunk down their parts to make this phone thinner. It might weigh 3 grams more than the 3GS, but remember, the battery is 19% larger than before. Everything else is way reduced to fit the smaller case.
After subsequently putting the phone back together, I really feel sorry for the factory workers in China who do this all day.
Wednesday, January 14, 2015
Optimize the Performance Settings of Photoshop

- Intel Core i3 Processor (3.3 GHz, 3 MB Cache)
- 4GB DDR3 RAM (1600 Bus)
- 1 TB HDD
- Run Adobe Photoshop.
- Go to Edit Menu and Choose Preferenes > Performance.
- Now you will get 4 sections: Memory Usage, History & Cache, Scratch Disks and GPU settings.
This is the most important part of this topic. I mean the usage of RAM.
- Rotate View Tool
- Birdseye Zooming
- Pixel Grid
- Flick Panning Preferences, Scrubby Zoom
- HUD Color Picker, Sampling Ring etc.
- Smooth Pan and Zoom
- Drop Shadow for Canvas Border
- 3D Interaction Acceleration etc.

