O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Fetching a user's Gmail data

In this recipe, we will go a step further and learn how to get a user's Gmail contact list using the Google Data API.

Getting ready

  1. You can use the same project we have used in the last section, or you can create your own.
  2. Edit the build.sbt file by adding the following dependencies:
    "com.google.gdata" % "core" % "1.47.1-custom"

How to do it...

Carry out the following steps to fetch a user's Gmail data:

  1. Append the following code into the div tag with the data-lift attribute:
            <hr/>
    
            <h4>Gmail Contacts</h4>
            <ul>
                <li>
                    <span class="bold">Full Name: </span><span class="fullName"></span>
                </li>
            </ul>
  2. Add the following case class into the GoogleDispatcher.scala file:
    case class User(email: String, accessToken: AccessToken)
  3. Modify the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required