-
-
Notifications
You must be signed in to change notification settings - Fork 395
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 #3049 from tidusjar/develop
Develop
- Loading branch information
Showing
163 changed files
with
2,640 additions
and
803 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
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,36 @@ | ||
using System.Net.Http; | ||
using System.Threading.Tasks; | ||
|
||
namespace Ombi.Api.Gotify | ||
{ | ||
public class GotifyApi : IGotifyApi | ||
{ | ||
public GotifyApi(IApi api) | ||
{ | ||
_api = api; | ||
} | ||
|
||
private readonly IApi _api; | ||
|
||
public async Task PushAsync(string baseUrl, string accessToken, string subject, string body, sbyte priority) | ||
{ | ||
var request = new Request("/message", baseUrl, HttpMethod.Post); | ||
request.AddQueryString("token", accessToken); | ||
|
||
request.AddHeader("Access-Token", accessToken); | ||
request.ApplicationJsonContentType(); | ||
|
||
|
||
var jsonBody = new | ||
{ | ||
message = body, | ||
title = subject, | ||
priority = priority | ||
}; | ||
|
||
request.AddJsonBody(jsonBody); | ||
|
||
await _api.Request(request); | ||
} | ||
} | ||
} |
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 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace Ombi.Api.Gotify | ||
{ | ||
public interface IGotifyApi | ||
{ | ||
Task PushAsync(string endpoint, string accessToken, string subject, string body, sbyte priority); | ||
} | ||
} |
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 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<AssemblyVersion>3.0.0.0</AssemblyVersion> | ||
<FileVersion>3.0.0.0</FileVersion> | ||
<Version></Version> | ||
<PackageVersion></PackageVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Ombi.Api\Ombi.Api.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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,31 @@ | ||
using System; | ||
using System.Net.Mime; | ||
|
||
namespace Ombi.Api.Lidarr.Models | ||
{ | ||
public class AlbumByForeignId | ||
{ | ||
public string title { get; set; } | ||
public string disambiguation { get; set; } | ||
public string overview { get; set; } | ||
public int artistId { get; set; } | ||
public string foreignAlbumId { get; set; } | ||
public bool monitored { get; set; } | ||
public bool anyReleaseOk { get; set; } | ||
public int profileId { get; set; } | ||
public int duration { get; set; } | ||
public string albumType { get; set; } | ||
public object[] secondaryTypes { get; set; } | ||
public int mediumCount { get; set; } | ||
public Ratings ratings { get; set; } | ||
public DateTime releaseDate { get; set; } | ||
public Release[] releases { get; set; } | ||
public object[] genres { get; set; } | ||
public Medium[] media { get; set; } | ||
public Artist artist { get; set; } | ||
public Image[] images { get; set; } | ||
public Link[] links { get; set; } | ||
public Statistics statistics { get; set; } | ||
public int 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
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,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Ombi.Api.Lidarr.Models | ||
{ | ||
public class LidarrLinks | ||
{ | ||
public string url { get; set; } | ||
public string name { 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,8 @@ | ||
namespace Ombi.Api.Lidarr.Models | ||
{ | ||
public class LidarrRatings | ||
{ | ||
public int votes { get; set; } | ||
public decimal value { 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,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Ombi.Api.Lidarr.Models | ||
{ | ||
public class LidarrTrack | ||
{ | ||
public int artistId { get; set; } | ||
public int trackFileId { get; set; } | ||
public int albumId { get; set; } | ||
public bool _explicit { get; set; } | ||
public int absoluteTrackNumber { get; set; } | ||
public string trackNumber { get; set; } | ||
public string title { get; set; } | ||
public int duration { get; set; } | ||
public int mediumNumber { get; set; } | ||
public bool hasFile { get; set; } | ||
public bool monitored { get; set; } | ||
public int 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
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
File renamed without changes.
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
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.