Created
February 15, 2015 18:25
-
-
Save frbayart/b2cd9ac733e666c48c47 to your computer and use it in GitHub Desktop.
FacebookApiMusic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class FacebookData(category: String, name: String, created_time: String, id: String) | |
case class FacebookPaging(next: String) | |
case class FacebookApiMusic(data: Seq[FacebookData], paging: FacebookPaging) | |
implicit val facebookDataReads: Reads[FacebookData] = ( | |
(JsPath \ "category").read[String] and | |
(JsPath \ "name").read[String] and | |
(JsPath \ "created_time").read[String] and | |
(JsPath \ "id").read[String] | |
)(FacebookData.apply _) | |
implicit val facebookPagingReads: Reads[FacebookPaging] = ( | |
(JsPath \ "next").read[String] | |
)(FacebookPaging.apply _) | |
implicit val facebookApiMusicReads: Reads[FacebookApiMusic] = ( | |
(JsPath \ "data").read[Seq[FacebookData]] and | |
(JsPath \ "paging").read[FacebookPaging] | |
)(FacebookApiMusic.apply _) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment