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.
You can use the same project we have used in the last section, or you can create your own.
Edit the
build.sbt
file by adding the following dependencies:"com.google.gdata" % "core" % "1.47.1-custom"
Carry out the following steps to fetch a user's Gmail data:
Append the following code into the
div
tag with thedata-lift
attribute:<hr/> <h4>Gmail Contacts</h4> <ul> <li> <span class="bold">Full Name: </span><span class="fullName"></span> </li> </ul>
Add the following
case
class into theGoogleDispatcher.scala
file:case class User(email: String, accessToken: AccessToken)
Modify the
googleSession SessionVar
object fromBox[String]
toBox[User]
:object googleSession extends SessionVar[Box[User...