-
-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1025 from tidusjar/EAP
Release 2.1
- Loading branch information
Showing
122 changed files
with
4,106 additions
and
550 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#region Copyright | ||
// /************************************************************************ | ||
// Copyright (c) 2017 Jamie Rees | ||
// File: IDiscordApi.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.Threading.Tasks; | ||
using Ombi.Api.Models.Notifications; | ||
|
||
namespace Ombi.Api.Interfaces | ||
{ | ||
public interface IDiscordApi | ||
{ | ||
void SendMessage(string message, string webhookId, string webhookToken, string username = null); | ||
Task SendMessageAsync(string message, string webhookId, string webhookToken, string username = null); | ||
} | ||
} |
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,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Ombi.Api.Models.Radarr; | ||
using Ombi.Api.Models.Sonarr; | ||
|
||
namespace Ombi.Api.Interfaces | ||
{ | ||
public interface IRadarrApi | ||
{ | ||
RadarrAddMovie AddMovie(int tmdbId, string title, int year, int qualityId, string rootPath, string apiKey, Uri baseUrl, bool searchNow = false); | ||
List<RadarrMovieResponse> GetMovies(string apiKey, Uri baseUrl); | ||
List<SonarrProfile> GetProfiles(string apiKey, Uri baseUrl); | ||
SystemStatus SystemStatus(string apiKey, Uri baseUrl); | ||
} | ||
} |
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 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using TraktApiSharp.Enums; | ||
using TraktApiSharp.Objects.Get.Shows; | ||
using TraktApiSharp.Objects.Get.Shows.Common; | ||
|
||
namespace Ombi.Api.Interfaces | ||
{ | ||
public interface ITraktApi | ||
{ | ||
Task<IEnumerable<TraktMostAnticipatedShow>> GetAnticipatedShows(int? page = default(int?), int? limitPerPage = default(int?)); | ||
Task<IEnumerable<TraktMostWatchedShow>> GetMostWatchesShows(TraktTimePeriod period = null, int? page = default(int?), int? limitPerPage = default(int?)); | ||
Task<IEnumerable<TraktShow>> GetPopularShows(int? page = default(int?), int? limitPerPage = default(int?)); | ||
Task<IEnumerable<TraktTrendingShow>> GetTrendingShows(int? page = default(int?), int? limitPerPage = default(int?)); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> | ||
<package id="RestSharp" version="105.2.3" targetFramework="net45" /> | ||
<package id="TraktApiSharp" version="0.8.0" targetFramework="net45" /> | ||
</packages> |
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,104 @@ | ||
#region Copyright | ||
// /************************************************************************ | ||
// Copyright (c) 2017 Jamie Rees | ||
// File: TmdbMovieDetails.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 Ombi.Api.Models.Movie | ||
{ | ||
|
||
public class Genre | ||
{ | ||
public int id { get; set; } | ||
public string name { get; set; } | ||
} | ||
|
||
public class ProductionCompany | ||
{ | ||
public string name { get; set; } | ||
public int id { get; set; } | ||
} | ||
|
||
public class ProductionCountry | ||
{ | ||
public string iso_3166_1 { get; set; } | ||
public string name { get; set; } | ||
} | ||
|
||
public class SpokenLanguage | ||
{ | ||
public string iso_639_1 { get; set; } | ||
public string name { get; set; } | ||
} | ||
|
||
public class Result | ||
{ | ||
public string id { get; set; } | ||
public string iso_639_1 { get; set; } | ||
public string iso_3166_1 { get; set; } | ||
public string key { get; set; } | ||
public string name { get; set; } | ||
public string site { get; set; } | ||
public int size { get; set; } | ||
public string type { get; set; } | ||
} | ||
|
||
public class Videos | ||
{ | ||
public List<Result> results { get; set; } | ||
} | ||
|
||
public class TmdbMovieDetails | ||
{ | ||
public bool adult { get; set; } | ||
public string backdrop_path { get; set; } | ||
public object belongs_to_collection { get; set; } | ||
public int budget { get; set; } | ||
public List<Genre> genres { get; set; } | ||
public string homepage { get; set; } | ||
public int id { get; set; } | ||
public string imdb_id { get; set; } | ||
public string original_language { get; set; } | ||
public string original_title { get; set; } | ||
public string overview { get; set; } | ||
public double popularity { get; set; } | ||
public string poster_path { get; set; } | ||
public List<ProductionCompany> production_companies { get; set; } | ||
public List<ProductionCountry> production_countries { get; set; } | ||
public string release_date { get; set; } | ||
public int revenue { get; set; } | ||
public int runtime { get; set; } | ||
public List<SpokenLanguage> spoken_languages { get; set; } | ||
public string status { get; set; } | ||
public string tagline { get; set; } | ||
public string title { get; set; } | ||
public bool video { get; set; } | ||
public double vote_average { get; set; } | ||
public int vote_count { get; set; } | ||
public Videos videos { get; set; } | ||
} | ||
|
||
} |
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,34 @@ | ||
#region Copyright | ||
// /************************************************************************ | ||
// Copyright (c) 2017 Jamie Rees | ||
// File: DiscordWebhookRequest.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 Ombi.Api.Models.Notifications | ||
{ | ||
public class DiscordWebhookRequest | ||
{ | ||
public string content { get; set; } | ||
public string username { get; set; } | ||
} | ||
} |
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,47 @@ | ||
#region Copyright | ||
// /************************************************************************ | ||
// Copyright (c) 2017 Jamie Rees | ||
// File: DiscordWebhookResponse.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 Newtonsoft.Json; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace Ombi.Api.Models.Notifications | ||
{ | ||
public class DiscordWebhookResponse | ||
{ | ||
public string name { get; set; } | ||
[JsonProperty(PropertyName = "channel_id")] | ||
public string channelid { get; set; } | ||
|
||
public string token { get; set; } | ||
public string avatar { get; set; } | ||
[JsonProperty(PropertyName = "guild_id")] | ||
public string guildid { get; set; } | ||
|
||
public string id { get; set; } | ||
|
||
} | ||
} |
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.