Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for carousel formats (#5)
- Loading branch information
1 parent
5e93025
commit d43afe2
Showing
6 changed files
with
78 additions
and
21 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/main/scala/com/yukihirai0505/sInstagram/responses/common/CarouselMedia.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.yukihirai0505.sInstagram.responses.common | ||
|
||
/** | ||
* author Yuki Hirai on 2017/09/12. | ||
*/ | ||
case class CarouselMedia( | ||
images: Images, | ||
usersInPhoto: Seq[UsersInPhoto], | ||
`type`: String | ||
) | ||
|
||
import com.github.tototoshi.play.json.JsonNaming | ||
import play.api.libs.json.Json | ||
|
||
object CarouselMedia { | ||
implicit val CarouselMediaFormat = JsonNaming.snakecase(Json.format[CarouselMedia]) | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/scala/com/yukihirai0505/sInstagram/responses/common/Position.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.yukihirai0505.sInstagram.responses.common | ||
|
||
/** | ||
* author Yuki Hirai on 2017/09/12. | ||
*/ | ||
case class Position( | ||
x: Double, | ||
y: Double | ||
) | ||
|
||
import com.github.tototoshi.play.json.JsonNaming | ||
import play.api.libs.json.Json | ||
|
||
object Position { | ||
implicit val PositionFormat = JsonNaming.snakecase(Json.format[Position]) | ||
} |
11 changes: 6 additions & 5 deletions
11
src/main/scala/com/yukihirai0505/sInstagram/responses/common/User.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
package com.yukihirai0505.sInstagram.responses.common | ||
|
||
case class User( | ||
id: String, | ||
username: String, | ||
fullName: String, | ||
profilePicture: String | ||
) | ||
fullName: String, | ||
id: String, | ||
profilePicture: String, | ||
username: String | ||
) | ||
|
||
import com.github.tototoshi.play.json.JsonNaming | ||
import play.api.libs.json.Json | ||
|
||
object User { | ||
implicit val UserFormat = JsonNaming.snakecase(Json.format[User]) | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/scala/com/yukihirai0505/sInstagram/responses/common/UsersInPhoto.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.yukihirai0505.sInstagram.responses.common | ||
|
||
/** | ||
* author Yuki Hirai on 2017/09/12. | ||
*/ | ||
case class UsersInPhoto( | ||
user: User, | ||
position: Position | ||
) | ||
|
||
import com.github.tototoshi.play.json.JsonNaming | ||
import play.api.libs.json.Json | ||
|
||
object UsersInPhoto { | ||
implicit val UsersInPhotoFormat = JsonNaming.snakecase(Json.format[UsersInPhoto]) | ||
} | ||
|
This file contains 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
This file contains 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