-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
268 additions
and
2 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,181 @@ | ||
schema { | ||
query: Query | ||
# mutation: Mutation | ||
} | ||
|
||
# type Mutation | ||
# type Query { | ||
# popularTitles( | ||
# country: String | ||
# after: String | ||
# offset: Boolean | ||
# after: String | ||
# # filter: $popularTitlesFilter | ||
# sortBy: String # actuall an enum? | ||
# ): # sortRandomSeed: $sortRandomSeed | ||
# PopularTitlesConnection! | ||
# } | ||
|
||
# type PopularTitlesConnection { | ||
# "A list of edges." | ||
# edges: [PopularTitlesEdge] | ||
|
||
# "A list of nodes." | ||
# nodes: [UserContentEdit] | ||
|
||
# "Information to aid in pagination." | ||
# pageInfo: PageInfo! | ||
|
||
# "Identifies the total count of items in the connection." | ||
# totalCount: Int! | ||
# } | ||
|
||
type PageInfo { | ||
startCursor: String | ||
endCursor: String | ||
hasPreviousPage: Boolean | ||
hasNextPage: Boolean | ||
# __typename: String | ||
} | ||
|
||
type User { | ||
id: String | ||
username: String | ||
} | ||
|
||
# type WatchNowOffer { | ||
# id: String | ||
# standardWebURL: String | ||
# retailPrice: String | ||
# retailPriceValue: Float | ||
# lastChangeRetailPriceValue: String | ||
# currency: String | ||
# presentationType: String | ||
# monetizationType: String | ||
# availableTo: String | ||
# # __typename: String | ||
# package: Package | ||
# } | ||
|
||
# type Offers { | ||
# id: String | ||
# standardWebURL: String | ||
# deeplinkURL(platform: Platform): String | ||
# retailPrice: String | ||
# retailPriceValue: Float | ||
# lastChangeRetailPriceValue: Float | ||
# currency: String | ||
# presentationType: String | ||
# monetizationType: String | ||
# availableTo: String | ||
# # __typename: String | ||
# package: Package | ||
# } | ||
|
||
# type Genres { | ||
# translation: String | ||
# # __typename: String | ||
# } | ||
|
||
# type Credits { | ||
# name: String | ||
# personId: Int | ||
# # __typename: String | ||
# } | ||
|
||
# type Scoring { | ||
# imdbVotes: Int | ||
# imdbScore: Float | ||
# tmdbPopularity: Float | ||
# tmdbScore: Float | ||
# # __typename: String | ||
# } | ||
|
||
# type Content { | ||
# title: String | ||
# fullPath: String | ||
# posterUrl: String | ||
# # __typename: String | ||
# isReleased: Boolean | ||
# runtime: Int | ||
# genres: [Genres] | ||
# credits: [Credits] | ||
# backdrops: [String] | ||
# dailymotionClips: [String] | ||
# scoring: Scoring | ||
# externalIds: externalIds | ||
# } | ||
|
||
# type Node { | ||
# id: String | ||
# objectId: Int | ||
# objectType: String | ||
# likelistEntry: String | ||
# dislikelistEntry: String | ||
# watchlistEntry: String | ||
# seenlistEntry: String | ||
# # __typename: String | ||
# # watchNowOffer: WatchNowOffer | ||
# # offers: [Offers] | ||
# offers(country: String, platform: Platform!): [Offers] | ||
# content(country: String, language: Language!): Content! | ||
# } | ||
|
||
# type externalIds { | ||
# tmdbId: String | ||
# imdbId: String | ||
# } | ||
|
||
# interface PopularTitlesEdge { | ||
# cursor: String | ||
# # __typename: String | ||
# node: Node | ||
# } | ||
|
||
# type PopularTitles { | ||
# # sponsoredAd: String | ||
# totalCount: Int | ||
# # __typename: String | ||
# pageInfo: PageInfo | ||
# edges: [PopularTitlesEdge] | ||
# } | ||
|
||
# type Query { | ||
# popularTitles( | ||
# country: Country! | ||
# sortBy: PopularTitlesSorting! | ||
# # language: Language | ||
# after: String! | ||
# first: Int! | ||
# offset: Int | ||
# # filter: $popularTitlesFilter | ||
# ): PopularTitles! | ||
# } | ||
|
||
# enum PopularTitlesSorting { | ||
# ALPHABETICAL | ||
# POPULAR | ||
# } | ||
|
||
# enum Country { | ||
# NL | ||
# BE | ||
# } | ||
|
||
# enum Language { | ||
# nl | ||
# be | ||
# en | ||
# } | ||
|
||
# enum Platform { | ||
# IOS | ||
# TVOS | ||
# ANDROID | ||
# WEB | ||
# } | ||
|
||
|
||
# type AutogeneratedMainType { | ||
# data: Data | ||
# } |
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,78 @@ | ||
// use serde_derive::Deserialize; | ||
// use serde_derive::Serialize; | ||
use serde::{Deserialize, Deserializer, Serialize}; | ||
|
||
pub fn watchlist(payload: Payload) { | ||
|
||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Payload { | ||
pub event: String, | ||
pub user: bool, | ||
pub owner: bool, | ||
#[serde(rename = "Account")] | ||
pub account: Account, | ||
#[serde(rename = "Server")] | ||
pub server: Server, | ||
#[serde(rename = "Player")] | ||
pub player: Player, | ||
#[serde(rename = "Metadata")] | ||
pub metadata: Metadata, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Account { | ||
pub id: i64, | ||
pub thumb: String, | ||
pub title: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Server { | ||
pub title: String, | ||
pub uuid: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Player { | ||
pub local: bool, | ||
pub public_address: String, | ||
pub title: String, | ||
pub uuid: String, | ||
} | ||
|
||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Metadata { | ||
pub library_section_type: String, | ||
pub rating_key: String, | ||
pub key: String, | ||
pub parent_rating_key: String, | ||
pub grandparent_rating_key: String, | ||
pub guid: String, | ||
#[serde(rename = "librarySectionID")] | ||
pub library_section_id: i64, | ||
#[serde(rename = "type")] | ||
pub type_field: String, | ||
pub title: String, | ||
pub grandparent_key: String, | ||
pub parent_key: String, | ||
pub grandparent_title: Option<String>, | ||
pub parent_title: Option<String>, | ||
pub summary: String, | ||
pub index: i64, | ||
pub parent_index: i64, | ||
pub rating_count: i64, | ||
pub thumb: String, | ||
pub art: String, | ||
pub parent_thumb: String, | ||
pub grandparent_thumb: String, | ||
pub grandparent_art: String, | ||
pub added_at: i64, | ||
pub updated_at: i64, | ||
} |