Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Genius/Genius/Clients/ArtistClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task<ArtistResponse> GetArtist(ulong artistId)
if (artistResponse.Meta.Status >= 400)
{
throw new HttpRequestException(artistResponse.Meta.Status +
artistResponse.Meta.Message);
artistResponse.Meta.Message);
}

return artistResponse;
Expand Down Expand Up @@ -57,7 +57,7 @@ public async Task<ArtistsSongsResponse> GetArtistsSongs(ulong artistId, string s
if (artistsSongsResponse.Meta.Status >= 400)
{
throw new HttpRequestException(artistsSongsResponse.Meta.Status +
artistsSongsResponse.Meta.Message);
artistsSongsResponse.Meta.Message);
}

return artistsSongsResponse;
Expand Down
6 changes: 2 additions & 4 deletions Genius/Genius/Core/IGeniusClient.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Genius.Clients.Interfaces;

namespace Genius.Core
namespace Genius.Core
{
public interface IGeniusClient
public interface IGeniusClient
{

}
Expand Down
11 changes: 5 additions & 6 deletions Genius/Genius/Http/IGeniusRestClient.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using System.Net.Http;
using System.Threading.Tasks;
using System.Threading.Tasks;

namespace Genius.Http
{
/// <summary>
/// Also see: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests
/// </summary>
public interface IGeniusRestClient
/// <summary>
/// Also see: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests
/// </summary>
public interface IGeniusRestClient
{
/// <summary>
/// Sends GET request to endpoint.
Expand Down
2 changes: 1 addition & 1 deletion Genius/Genius/Models/Annotation/Annotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Annotation

[JilDirective(Name = "verified")] public bool Verified { get; set; }

[JilDirective(Name = "votes_total")] public ulong VotesTotal { get; set; }
[JilDirective(Name = "votes_total")] public long VotesTotal { get; set; }

[JilDirective(Name = "current_user_metadata")]
public UserMetadata CurrentUserMetadata { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions Genius/Genius/Models/Artist/Artist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public class Artist

[JilDirective(Name = "facebook_name")] public string FacebookName { get; set; }

[JilDirective(Name = "followers_count")] public ulong FollowersCount { get; set; }
[JilDirective(Name = "followers_count")] public ulong? FollowersCount { get; set; }

[JilDirective(Name = "header_image_url")] public string HeaderImageUrl { get; set; }

[JilDirective(Name = "id")] public ulong Id { get; set; }
[JilDirective(Name = "id")] public ulong? Id { get; set; }

[JilDirective(Name = "image_url")] public string ImageUrl { get; set; }

Expand All @@ -40,7 +40,7 @@ public class Artist

[JilDirective(Name = "current_user_metadata")] public UserMetadata CurrentUserMetadata { get; set; }

[JilDirective(Name = "iq")] public ulong Iq { get; set; }
[JilDirective(Name = "iq")] public ulong? Iq { get; set; }

[JilDirective(Name = "description_annotation")] public Referent.Referent DescriptionAnnotation { get; set; }

Expand Down
34 changes: 34 additions & 0 deletions Genius/Genius/Models/Song/Annotatable.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Jil;

namespace Genius.Models.Song
{
public class Annotatable
{
[JilDirective("api_path")]
public string ApiPath { get; set; }

[JilDirective("client_timestamps")]
public ClientTimestamps ClientTimestamps { get; set; }

[JilDirective("context")]
public string Context { get; set; }

[JilDirective("id")]
public ulong Id { get; set; }

[JilDirective("image_url")]
public string ImageUrl { get; set; }

[JilDirective("link_title")]
public string LinkTitle { get; set; }

[JilDirective("title")]
public string Title { get; set; }

[JilDirective("type")]
public string Type { get; set; }

[JilDirective("url")]
public string Url { get; set; }
}
}
65 changes: 65 additions & 0 deletions Genius/Genius/Models/Song/Annotation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using Jil;
using System.Collections.Generic;

namespace Genius.Models.Song
{
public class Annotation
{
[JilDirective("api_path")]
public string ApiPath { get; set; }

[JilDirective("body")]
public Description Body { get; set; }

[JilDirective("comment_count")]
public ulong? CommentCount { get; set; }

[JilDirective("community")]
public bool Community { get; set; }

[JilDirective("custom_preview")]
public object CustomPreview { get; set; }

[JilDirective("has_voters")]
public bool HasVoters { get; set; }

[JilDirective("id")]
public ulong? Id { get; set; }

[JilDirective("pinned")]
public bool Pinned { get; set; }

[JilDirective("share_url")]
public string ShareUrl { get; set; }

[JilDirective("source")]
public object Source { get; set; }

[JilDirective("state")]
public string State { get; set; }

[JilDirective("url")]
public string Url { get; set; }

[JilDirective("verified")]
public bool Verified { get; set; }

[JilDirective("votes_total")]
public long? VotesTotal { get; set; }

[JilDirective("current_user_metadata")]
public AnnotationCurrentUserMetadata CurrentUserMetadata { get; set; }

[JilDirective("authors")]
public List<Author> Authors { get; set; }

[JilDirective("cosigned_by")]
public List<VerifiedAnnotationsBy> CosignedBy { get; set; }

[JilDirective("rejection_comment")]
public object RejectionComment { get; set; }

[JilDirective("verified_by")]
public object VerifiedBy { get; set; }
}
}
20 changes: 20 additions & 0 deletions Genius/Genius/Models/Song/AnnotationCurrentUserMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Jil;
using System.Collections.Generic;

namespace Genius.Models.Song
{
public class AnnotationCurrentUserMetadata
{
[JilDirective("permissions")]
public List<string> Permissions { get; set; }

[JilDirective("excluded_permissions")]
public List<string> ExcludedPermissions { get; set; }

[JilDirective("interactions")]
public Interactions Interactions { get; set; }

[JilDirective("iq_by_action")]
public IqByAction IqByAction { get; set; }
}
}
13 changes: 13 additions & 0 deletions Genius/Genius/Models/Song/ClientTimestamps.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Jil;

namespace Genius.Models.Song
{
public class ClientTimestamps
{
[JilDirective("updated_by_human_at")]
public ulong? UpdatedByHumanAt { get; set; }

[JilDirective("lyrics_updated_at")]
public ulong? LyricsUpdatedAt { get; set; }
}
}
14 changes: 14 additions & 0 deletions Genius/Genius/Models/Song/CustomerPerformance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Jil;
using System.Collections.Generic;

namespace Genius.Models.Song
{
public class CustomPerformance
{
[JilDirective("label")]
public string Label { get; set; }

[JilDirective("artists")]
public List<Artist.Artist> Artists { get; set; }
}
}
10 changes: 10 additions & 0 deletions Genius/Genius/Models/Song/Description.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Jil;

namespace Genius.Models.Song
{
public class Description
{
[JilDirective("html")]
public string Html { get; set; }
}
}
53 changes: 53 additions & 0 deletions Genius/Genius/Models/Song/DescriptionAnnotation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using Jil;
using System.Collections.Generic;

namespace Genius.Models.Song
{
public class DescriptionAnnotation
{
[JilDirective("_type")]
public string Type { get; set; }

[JilDirective("annotator_id")]
public ulong? AnnotatorId { get; set; }

[JilDirective("annotator_login")]
public string AnnotatorLogin { get; set; }

[JilDirective("api_path")]
public string ApiPath { get; set; }

[JilDirective("classification")]
public string Classification { get; set; }

[JilDirective("fragment")]
public string Fragment { get; set; }

[JilDirective("id")]
public ulong? Id { get; set; }

[JilDirective("is_description")]
public bool IsDescription { get; set; }

[JilDirective("path")]
public string Path { get; set; }

[JilDirective("range")]
public Range Range { get; set; }

[JilDirective("song_id")]
public ulong? SongId { get; set; }

[JilDirective("url")]
public string Url { get; set; }

[JilDirective("verified_annotator_ids")]
public List<object> VerifiedAnnotatorIds { get; set; }

[JilDirective("annotatable")]
public Annotatable Annotatable { get; set; }

[JilDirective("annotations")]
public List<Annotation> Annotations { get; set; }
}
}
19 changes: 19 additions & 0 deletions Genius/Genius/Models/Song/Interactions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Jil;

namespace Genius.Models.Song
{
public class Interactions
{
[JilDirective("cosign")]
public bool Cosign { get; set; }

[JilDirective("pyong")]
public bool Pyong { get; set; }

[JilDirective("vote")]
public object Vote { get; set; }

[JilDirective("following")]
public bool Following { get; set; }
}
}
6 changes: 6 additions & 0 deletions Genius/Genius/Models/Song/IqByAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Genius.Models.Song
{
public class IqByAction
{
}
}
10 changes: 10 additions & 0 deletions Genius/Genius/Models/Song/Range.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Jil;

namespace Genius.Models.Song
{
public class Range
{
[JilDirective("content")]
public string Content { get; set; }
}
}
Loading