-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow plex friends to be fetched and populated via plex token (#43)
- Loading branch information
Showing
13 changed files
with
300 additions
and
14 deletions.
There are no files selected for viewing
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
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,5 @@ | ||
package model | ||
|
||
import io.circe.Json | ||
|
||
case class GraphQLQuery(query: String, variables: Option[Json] = None) |
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,3 +1,3 @@ | ||
package plex | ||
|
||
private[plex] case class MediaContainer(Metadata: List[TokenWatchlistItems]) | ||
private[plex] case class MediaContainer(Metadata: List[TokenWatchlistItem]) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package plex | ||
|
||
private[plex] case class TokenWatchlistFriend(data: WatchlistData) | ||
|
||
private[plex] case class WatchlistData(user: WatchlistUserData) | ||
|
||
private[plex] case class WatchlistUserData(watchlist: WatchlistNodes) | ||
|
||
private[plex] case class WatchlistNodes(nodes: List[WatchlistNode], pageInfo: PageInfo) | ||
|
||
private[plex] case class PageInfo(hasNextPage: Boolean, endCursor: String) | ||
|
||
private[plex] case class WatchlistNode(id: String, title: String, `type`: String) { | ||
def toTokenWatchlistItem: TokenWatchlistItem = | ||
TokenWatchlistItem(title = title, guid = id, key = s"/library/metadata/$id", `type` = `type`.toLowerCase) | ||
} |
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,5 @@ | ||
package plex | ||
|
||
private[plex] case class TokenWatchlistItem(title: String, guid: String, `type`: String, key: String, Guid: List[Guid] = List.empty) | ||
|
||
private[plex] case class Guid(id: String) |
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
package plex | ||
|
||
private[plex] case class Users(data: Data) | ||
|
||
private[plex] case class Data(allFriendsV2: List[FriendV2]) | ||
|
||
private[plex] case class FriendV2(user: User) | ||
|
||
private[plex] case class User(id: String, username: String) |
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,18 @@ | ||
{ | ||
"data": { | ||
"allFriendsV2": [ | ||
{ | ||
"user": { | ||
"id": "ecdb6as0230e2115", | ||
"username": "friend-1" | ||
} | ||
}, | ||
{ | ||
"user": { | ||
"id": "a31281fd8s413643", | ||
"username": "friend-2" | ||
} | ||
} | ||
] | ||
} | ||
} |
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,26 @@ | ||
{ | ||
"data": { | ||
"user": { | ||
"watchlist": { | ||
"nodes": [ | ||
{ | ||
"id": "5d77688b9ab54400214e789b", | ||
"title": "The Twilight Saga: Breaking Dawn - Part 2", | ||
"publicPagesURL": "https://watch.plex.tv/movie/the-twilight-saga-breaking-dawn-part-2", | ||
"type": "MOVIE" | ||
}, | ||
{ | ||
"id": "5d77688b594b2b001e68f2f0", | ||
"title": "The Twilight Saga: Breaking Dawn - Part 1", | ||
"publicPagesURL": "https://watch.plex.tv/movie/the-twilight-saga-breaking-dawn-part-1", | ||
"type": "MOVIE" | ||
} | ||
], | ||
"pageInfo": { | ||
"hasNextPage": false, | ||
"endCursor": "MTY1NjE4NDgyMzEzMA==" | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.