mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Added first real test
This commit is contained in:
parent
f7a6614748
commit
68850fd8b7
29 changed files with 461 additions and 22 deletions
83
PlexRequests.Api.Models/Movie/CouchPotatoAdd.cs
Normal file
83
PlexRequests.Api.Models/Movie/CouchPotatoAdd.cs
Normal file
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PlexRequests.Api.Models.Movie
|
||||
{
|
||||
|
||||
public class CouchPotatoAdd
|
||||
{
|
||||
public Movie movie { get; set; }
|
||||
public bool success { get; set; }
|
||||
}
|
||||
public class Rating
|
||||
{
|
||||
public List<double> imdb { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Images
|
||||
{
|
||||
public List<object> disc_art { get; set; }
|
||||
public List<string> poster { get; set; }
|
||||
public List<object> extra_thumbs { get; set; }
|
||||
public List<string> poster_original { get; set; }
|
||||
public List<object> landscape { get; set; }
|
||||
public string[] actors { get; set; }
|
||||
public List<string> backdrop_original { get; set; }
|
||||
public List<object> clear_art { get; set; }
|
||||
public List<object> logo { get; set; }
|
||||
public List<object> banner { get; set; }
|
||||
public List<string> backdrop { get; set; }
|
||||
public List<object> extra_fanart { get; set; }
|
||||
}
|
||||
|
||||
public class Info
|
||||
{
|
||||
public Rating rating { get; set; }
|
||||
public List<string> genres { get; set; }
|
||||
public int tmdb_id { get; set; }
|
||||
public string plot { get; set; }
|
||||
public string tagline { get; set; }
|
||||
public string original_title { get; set; }
|
||||
public string[] actor_roles { get; set; }
|
||||
public bool via_imdb { get; set; }
|
||||
public string mpaa { get; set; }
|
||||
public bool via_tmdb { get; set; }
|
||||
public List<string> directors { get; set; }
|
||||
public List<string> titles { get; set; }
|
||||
public string imdb { get; set; }
|
||||
public int year { get; set; }
|
||||
public Images images { get; set; }
|
||||
public List<string> actors { get; set; }
|
||||
public List<string> writers { get; set; }
|
||||
public int runtime { get; set; }
|
||||
public string type { get; set; }
|
||||
public string released { get; set; }
|
||||
}
|
||||
|
||||
public class Identifiers
|
||||
{
|
||||
public string imdb { get; set; }
|
||||
}
|
||||
|
||||
public class Movie
|
||||
{
|
||||
public string status { get; set; }
|
||||
public Info info { get; set; }
|
||||
public string _t { get; set; }
|
||||
public List<object> releases { get; set; }
|
||||
public string title { get; set; }
|
||||
public string _rev { get; set; }
|
||||
public string profile_id { get; set; }
|
||||
public string _id { get; set; }
|
||||
public object category_id { get; set; }
|
||||
public string type { get; set; }
|
||||
public Identifiers identifiers { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
62
PlexRequests.Api.Models/Plex/PlexAuthentication.cs
Normal file
62
PlexRequests.Api.Models/Plex/PlexAuthentication.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PlexAuthentication.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PlexRequests.Api.Models
|
||||
{
|
||||
public class PlexAuthentication
|
||||
{
|
||||
public User user { get; set; }
|
||||
}
|
||||
public class Subscription
|
||||
{
|
||||
public bool active { get; set; }
|
||||
public string status { get; set; }
|
||||
public object plan { get; set; }
|
||||
public object features { get; set; }
|
||||
}
|
||||
|
||||
public class Roles
|
||||
{
|
||||
public List<object> roles { get; set; }
|
||||
}
|
||||
|
||||
public class User
|
||||
{
|
||||
public string email { get; set; }
|
||||
public string joined_at { get; set; }
|
||||
public string username { get; set; }
|
||||
public string title { get; set; }
|
||||
public string authentication_token { get; set; }
|
||||
public Subscription subscription { get; set; }
|
||||
public Roles roles { get; set; }
|
||||
public List<string> entitlements { get; set; }
|
||||
public object confirmed_at { get; set; }
|
||||
public int forum_id { get; set; }
|
||||
}
|
||||
}
|
||||
|
38
PlexRequests.Api.Models/Plex/PlexError.cs
Normal file
38
PlexRequests.Api.Models/Plex/PlexError.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PlexError.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace PlexRequests.Api.Models
|
||||
{
|
||||
[XmlRoot(ElementName = "errors")]
|
||||
public class PlexError
|
||||
{
|
||||
[XmlElement(ElementName = "error")]
|
||||
public string Error { get; set; }
|
||||
|
||||
}
|
||||
}
|
87
PlexRequests.Api.Models/Plex/PlexFriends.cs
Normal file
87
PlexRequests.Api.Models/Plex/PlexFriends.cs
Normal file
|
@ -0,0 +1,87 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PlexFriends.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace PlexRequests.Api.Models
|
||||
{
|
||||
[XmlRoot(ElementName = "Server")]
|
||||
public class Server
|
||||
{
|
||||
[XmlAttribute(AttributeName = "id")]
|
||||
public string Id { get; set; }
|
||||
[XmlAttribute(AttributeName = "serverId")]
|
||||
public string ServerId { get; set; }
|
||||
[XmlAttribute(AttributeName = "machineIdentifier")]
|
||||
public string MachineIdentifier { get; set; }
|
||||
[XmlAttribute(AttributeName = "name")]
|
||||
public string Name { get; set; }
|
||||
[XmlAttribute(AttributeName = "lastSeenAt")]
|
||||
public string LastSeenAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "numLibraries")]
|
||||
public string NumLibraries { get; set; }
|
||||
[XmlAttribute(AttributeName = "owned")]
|
||||
public string Owned { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "User")]
|
||||
public class UserFriends
|
||||
{
|
||||
[XmlElement(ElementName = "Server")]
|
||||
public Server Server { get; set; }
|
||||
[XmlAttribute(AttributeName = "id")]
|
||||
public string Id { get; set; }
|
||||
[XmlAttribute(AttributeName = "title")]
|
||||
public string Title { get; set; }
|
||||
[XmlAttribute(AttributeName = "username")]
|
||||
public string Username { get; set; }
|
||||
[XmlAttribute(AttributeName = "email")]
|
||||
public string Email { get; set; }
|
||||
[XmlAttribute(AttributeName = "recommendationsPlaylistId")]
|
||||
public string RecommendationsPlaylistId { get; set; }
|
||||
[XmlAttribute(AttributeName = "thumb")]
|
||||
public string Thumb { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "MediaContainer")]
|
||||
public class PlexFriends
|
||||
{
|
||||
[XmlElement(ElementName = "User")]
|
||||
public UserFriends[] User { get; set; }
|
||||
[XmlAttribute(AttributeName = "friendlyName")]
|
||||
public string FriendlyName { get; set; }
|
||||
[XmlAttribute(AttributeName = "identifier")]
|
||||
public string Identifier { get; set; }
|
||||
[XmlAttribute(AttributeName = "machineIdentifier")]
|
||||
public string MachineIdentifier { get; set; }
|
||||
[XmlAttribute(AttributeName = "totalSize")]
|
||||
public string TotalSize { get; set; }
|
||||
[XmlAttribute(AttributeName = "size")]
|
||||
public string Size { get; set; }
|
||||
}
|
||||
|
||||
}
|
258
PlexRequests.Api.Models/Plex/PlexSearch.cs
Normal file
258
PlexRequests.Api.Models/Plex/PlexSearch.cs
Normal file
|
@ -0,0 +1,258 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PlexSearch.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace PlexRequests.Api.Models
|
||||
{
|
||||
[XmlRoot(ElementName = "Part")]
|
||||
public class Part
|
||||
{
|
||||
[XmlAttribute(AttributeName = "id")]
|
||||
public string Id { get; set; }
|
||||
[XmlAttribute(AttributeName = "key")]
|
||||
public string Key { get; set; }
|
||||
[XmlAttribute(AttributeName = "duration")]
|
||||
public string Duration { get; set; }
|
||||
[XmlAttribute(AttributeName = "file")]
|
||||
public string File { get; set; }
|
||||
[XmlAttribute(AttributeName = "size")]
|
||||
public string Size { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioProfile")]
|
||||
public string AudioProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "container")]
|
||||
public string Container { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoProfile")]
|
||||
public string VideoProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "has64bitOffsets")]
|
||||
public string Has64bitOffsets { get; set; }
|
||||
[XmlAttribute(AttributeName = "hasChapterTextStream")]
|
||||
public string HasChapterTextStream { get; set; }
|
||||
[XmlAttribute(AttributeName = "optimizedForStreaming")]
|
||||
public string OptimizedForStreaming { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Media")]
|
||||
public class Media
|
||||
{
|
||||
[XmlElement(ElementName = "Part")]
|
||||
public Part Part { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoResolution")]
|
||||
public string VideoResolution { get; set; }
|
||||
[XmlAttribute(AttributeName = "id")]
|
||||
public string Id { get; set; }
|
||||
[XmlAttribute(AttributeName = "duration")]
|
||||
public string Duration { get; set; }
|
||||
[XmlAttribute(AttributeName = "bitrate")]
|
||||
public string Bitrate { get; set; }
|
||||
[XmlAttribute(AttributeName = "width")]
|
||||
public string Width { get; set; }
|
||||
[XmlAttribute(AttributeName = "height")]
|
||||
public string Height { get; set; }
|
||||
[XmlAttribute(AttributeName = "aspectRatio")]
|
||||
public string AspectRatio { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioChannels")]
|
||||
public string AudioChannels { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
[XmlAttribute(AttributeName = "container")]
|
||||
public string Container { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoFrameRate")]
|
||||
public string VideoFrameRate { get; set; }
|
||||
[XmlAttribute(AttributeName = "audioProfile")]
|
||||
public string AudioProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "videoProfile")]
|
||||
public string VideoProfile { get; set; }
|
||||
[XmlAttribute(AttributeName = "optimizedForStreaming")]
|
||||
public string OptimizedForStreaming { get; set; }
|
||||
[XmlAttribute(AttributeName = "has64bitOffsets")]
|
||||
public string Has64bitOffsets { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Genre")]
|
||||
public class Genre
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Writer")]
|
||||
public class Writer
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Director")]
|
||||
public class Director
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Country")]
|
||||
public class Country
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Role")]
|
||||
public class Role
|
||||
{
|
||||
[XmlAttribute(AttributeName = "tag")]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Video")]
|
||||
public class Video
|
||||
{
|
||||
[XmlElement(ElementName = "Media")]
|
||||
public List<Media> Media { get; set; }
|
||||
[XmlElement(ElementName = "Genre")]
|
||||
public List<Genre> Genre { get; set; }
|
||||
[XmlElement(ElementName = "Writer")]
|
||||
public List<Writer> Writer { get; set; }
|
||||
[XmlElement(ElementName = "Director")]
|
||||
public Director Director { get; set; }
|
||||
[XmlElement(ElementName = "Country")]
|
||||
public Country Country { get; set; }
|
||||
[XmlElement(ElementName = "Role")]
|
||||
public List<Role> Role { get; set; }
|
||||
[XmlAttribute(AttributeName = "allowSync")]
|
||||
public string AllowSync { get; set; }
|
||||
[XmlAttribute(AttributeName = "librarySectionID")]
|
||||
public string LibrarySectionID { get; set; }
|
||||
[XmlAttribute(AttributeName = "librarySectionTitle")]
|
||||
public string LibrarySectionTitle { get; set; }
|
||||
[XmlAttribute(AttributeName = "librarySectionUUID")]
|
||||
public string LibrarySectionUUID { get; set; }
|
||||
[XmlAttribute(AttributeName = "personal")]
|
||||
public string Personal { get; set; }
|
||||
[XmlAttribute(AttributeName = "sourceTitle")]
|
||||
public string SourceTitle { get; set; }
|
||||
[XmlAttribute(AttributeName = "ratingKey")]
|
||||
public string RatingKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "key")]
|
||||
public string Key { get; set; }
|
||||
[XmlAttribute(AttributeName = "studio")]
|
||||
public string Studio { get; set; }
|
||||
[XmlAttribute(AttributeName = "type")]
|
||||
public string Type { get; set; }
|
||||
[XmlAttribute(AttributeName = "title")]
|
||||
public string Title { get; set; }
|
||||
[XmlAttribute(AttributeName = "contentRating")]
|
||||
public string ContentRating { get; set; }
|
||||
[XmlAttribute(AttributeName = "summary")]
|
||||
public string Summary { get; set; }
|
||||
[XmlAttribute(AttributeName = "rating")]
|
||||
public string Rating { get; set; }
|
||||
[XmlAttribute(AttributeName = "audienceRating")]
|
||||
public string AudienceRating { get; set; }
|
||||
[XmlAttribute(AttributeName = "year")]
|
||||
public string Year { get; set; }
|
||||
[XmlAttribute(AttributeName = "tagline")]
|
||||
public string Tagline { get; set; }
|
||||
[XmlAttribute(AttributeName = "thumb")]
|
||||
public string Thumb { get; set; }
|
||||
[XmlAttribute(AttributeName = "art")]
|
||||
public string Art { get; set; }
|
||||
[XmlAttribute(AttributeName = "duration")]
|
||||
public string Duration { get; set; }
|
||||
[XmlAttribute(AttributeName = "originallyAvailableAt")]
|
||||
public string OriginallyAvailableAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "addedAt")]
|
||||
public string AddedAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "updatedAt")]
|
||||
public string UpdatedAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "audienceRatingImage")]
|
||||
public string AudienceRatingImage { get; set; }
|
||||
[XmlAttribute(AttributeName = "chapterSource")]
|
||||
public string ChapterSource { get; set; }
|
||||
[XmlAttribute(AttributeName = "ratingImage")]
|
||||
public string RatingImage { get; set; }
|
||||
[XmlAttribute(AttributeName = "titleSort")]
|
||||
public string TitleSort { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentRatingKey")]
|
||||
public string ParentRatingKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentRatingKey")]
|
||||
public string GrandparentRatingKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentKey")]
|
||||
public string GrandparentKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentKey")]
|
||||
public string ParentKey { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentTitle")]
|
||||
public string GrandparentTitle { get; set; }
|
||||
[XmlAttribute(AttributeName = "index")]
|
||||
public string Index { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentIndex")]
|
||||
public string ParentIndex { get; set; }
|
||||
[XmlAttribute(AttributeName = "parentThumb")]
|
||||
public string ParentThumb { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentThumb")]
|
||||
public string GrandparentThumb { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentArt")]
|
||||
public string GrandparentArt { get; set; }
|
||||
[XmlAttribute(AttributeName = "viewCount")]
|
||||
public string ViewCount { get; set; }
|
||||
[XmlAttribute(AttributeName = "lastViewedAt")]
|
||||
public string LastViewedAt { get; set; }
|
||||
[XmlAttribute(AttributeName = "grandparentTheme")]
|
||||
public string GrandparentTheme { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "Provider")]
|
||||
public class Provider
|
||||
{
|
||||
[XmlAttribute(AttributeName = "key")]
|
||||
public string Key { get; set; }
|
||||
[XmlAttribute(AttributeName = "title")]
|
||||
public string Title { get; set; }
|
||||
[XmlAttribute(AttributeName = "type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
[XmlRoot(ElementName = "MediaContainer")]
|
||||
public class PlexSearch
|
||||
{
|
||||
[XmlElement(ElementName = "Video")]
|
||||
public List<Video> Video { get; set; }
|
||||
[XmlElement(ElementName = "Provider")]
|
||||
public List<Provider> Provider { get; set; }
|
||||
[XmlAttribute(AttributeName = "size")]
|
||||
public string Size { get; set; }
|
||||
[XmlAttribute(AttributeName = "identifier")]
|
||||
public string Identifier { get; set; }
|
||||
[XmlAttribute(AttributeName = "mediaTagPrefix")]
|
||||
public string MediaTagPrefix { get; set; }
|
||||
[XmlAttribute(AttributeName = "mediaTagVersion")]
|
||||
public string MediaTagVersion { get; set; }
|
||||
}
|
||||
}
|
40
PlexRequests.Api.Models/Plex/PlexUserRequest.cs
Normal file
40
PlexRequests.Api.Models/Plex/PlexUserRequest.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PlexUserRequest.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
namespace PlexRequests.Api.Models
|
||||
{
|
||||
public class PlexUserRequest
|
||||
{
|
||||
public UserRequest user { get; set; }
|
||||
}
|
||||
|
||||
public class UserRequest
|
||||
{
|
||||
public string login { get; set; }
|
||||
public string password { get; set; }
|
||||
}
|
||||
}
|
63
PlexRequests.Api.Models/PlexRequests.Api.Models.csproj
Normal file
63
PlexRequests.Api.Models/PlexRequests.Api.Models.csproj
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CB37A5F8-6DFC-4554-99D3-A42B502E4591}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PlexRequests.Api.Models</RootNamespace>
|
||||
<AssemblyName>PlexRequests.Api.Models</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Movie\CouchPotatoAdd.cs" />
|
||||
<Compile Include="Plex\PlexAuthentication.cs" />
|
||||
<Compile Include="Plex\PlexError.cs" />
|
||||
<Compile Include="Plex\PlexFriends.cs" />
|
||||
<Compile Include="Plex\PlexSearch.cs" />
|
||||
<Compile Include="Plex\PlexUserRequest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Tv\Authentication.cs" />
|
||||
<Compile Include="Tv\TvSearchResult.cs" />
|
||||
<Compile Include="Tv\TvShow.cs" />
|
||||
<Compile Include="Tv\TvShowImages.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
36
PlexRequests.Api.Models/Properties/AssemblyInfo.cs
Normal file
36
PlexRequests.Api.Models/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PlexRequests.Api.Models")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PlexRequests.Api.Models")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("cb37a5f8-6dfc-4554-99d3-a42b502e4591")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
33
PlexRequests.Api.Models/Tv/Authentication.cs
Normal file
33
PlexRequests.Api.Models/Tv/Authentication.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: Authentication.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace PlexRequests.Api.Models.Tv
|
||||
{
|
||||
public class Authentication
|
||||
{
|
||||
public string token { get; set; }
|
||||
}
|
||||
}
|
68
PlexRequests.Api.Models/Tv/TvSearchResult.cs
Normal file
68
PlexRequests.Api.Models/Tv/TvSearchResult.cs
Normal file
|
@ -0,0 +1,68 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: TvSearchResult.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PlexRequests.Api.Models.Tv
|
||||
{
|
||||
public class TvShowSearchResult
|
||||
{
|
||||
public int id { get; set; }
|
||||
public int airedSeason { get; set; }
|
||||
public int airedEpisodeNumber { get; set; }
|
||||
public string episodeName { get; set; }
|
||||
public string firstAired { get; set; }
|
||||
public string guestStars { get; set; }
|
||||
public string director { get; set; }
|
||||
public List<string> writers { get; set; }
|
||||
public string overview { get; set; }
|
||||
public string productionCode { get; set; }
|
||||
public string showUrl { get; set; }
|
||||
public int lastUpdated { get; set; }
|
||||
public string dvdDiscid { get; set; }
|
||||
public int dvdSeason { get; set; }
|
||||
public int dvdEpisodeNumber { get; set; }
|
||||
public int dvdChapter { get; set; }
|
||||
public int absoluteNumber { get; set; }
|
||||
public string filename { get; set; }
|
||||
public string seriesId { get; set; }
|
||||
public string lastUpdatedBy { get; set; }
|
||||
public int airsAfterSeason { get; set; }
|
||||
public int airsBeforeSeason { get; set; }
|
||||
public int airsBeforeEpisode { get; set; }
|
||||
public string thumbAuthor { get; set; }
|
||||
public string thumbAdded { get; set; }
|
||||
public string thumbWidth { get; set; }
|
||||
public string thumbHeight { get; set; }
|
||||
public string imdbId { get; set; }
|
||||
public int siteRating { get; set; }
|
||||
}
|
||||
|
||||
public class TvSearchResult
|
||||
{
|
||||
public List<TvShow> data { get; set; }
|
||||
}
|
||||
}
|
61
PlexRequests.Api.Models/Tv/TvShow.cs
Normal file
61
PlexRequests.Api.Models/Tv/TvShow.cs
Normal file
|
@ -0,0 +1,61 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: TvShow.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PlexRequests.Api.Models.Tv
|
||||
{
|
||||
public class TvShow
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string seriesName { get; set; }
|
||||
public List<string> aliases { get; set; }
|
||||
public string banner { get; set; }
|
||||
public string seriesId { get; set; }
|
||||
public string status { get; set; }
|
||||
public string firstAired { get; set; }
|
||||
public string network { get; set; }
|
||||
public string networkId { get; set; }
|
||||
public string runtime { get; set; }
|
||||
public List<string> genre { get; set; }
|
||||
public string overview { get; set; }
|
||||
public int lastUpdated { get; set; }
|
||||
public string airsDayOfWeek { get; set; }
|
||||
public string airsTime { get; set; }
|
||||
public string rating { get; set; }
|
||||
public string imdbId { get; set; }
|
||||
public string zap2itId { get; set; }
|
||||
public string added { get; set; }
|
||||
public int addedBy { get; set; }
|
||||
public int siteRating { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TvShowInformation
|
||||
{
|
||||
public TvShow data { get; set; }
|
||||
}
|
||||
}
|
54
PlexRequests.Api.Models/Tv/TvShowImages.cs
Normal file
54
PlexRequests.Api.Models/Tv/TvShowImages.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: TvShowImages.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PlexRequests.Api.Models.Tv
|
||||
{
|
||||
public class RatingsInfo
|
||||
{
|
||||
public double average { get; set; }
|
||||
}
|
||||
|
||||
public class Datum
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string keyType { get; set; }
|
||||
public string subKey { get; set; }
|
||||
public string fileName { get; set; }
|
||||
public string resolution { get; set; }
|
||||
public RatingsInfo ratingsInfo { get; set; }
|
||||
public string thumbnail { get; set; }
|
||||
}
|
||||
|
||||
public class TvShowImages
|
||||
{
|
||||
public List<Datum> data { get; set; }
|
||||
public object errors { get; set; }
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue