Skip to content

Commit 19e14e8

Browse files
committed
feat(): UserList API added
1 parent 3d1c51c commit 19e14e8

16 files changed

+209
-9
lines changed

src/discogsharp/ConnectionExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ public static class ConnectionExtensions
1010

1111
public static IImageService CreateImageService(this Connection connection) => new ImageService(connection);
1212

13+
public static IListService CreateListService(this Connection connection) => new ListService(connection);
14+
1315
public static IWantService CreateWantService(this Connection connection) => new WantService(connection);
1416
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace discogsharp.Domain
2+
{
3+
public class ArtistDiscogsListEntity : DiscogsListEntity
4+
{
5+
}
6+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Newtonsoft.Json;
2+
3+
namespace discogsharp.Domain
4+
{
5+
public class DiscogsList : Resource
6+
{
7+
public DateTime DateAdded { get; set; }
8+
public DateTime? DateChanged { get; set; }
9+
10+
[JsonProperty("description")]
11+
public string? Description { get; set; }
12+
13+
public string? ImageUrl { get; set; }
14+
15+
[JsonProperty("public")]
16+
public bool IsPublic { get; set; }
17+
18+
[JsonProperty("items")]
19+
public List<DiscogsListEntity>? Items { get; set; }
20+
21+
[JsonProperty("name")]
22+
public string Name { get; set; } = null!;
23+
24+
[JsonProperty("uri")]
25+
public string Uri { get; set; } = null!;
26+
27+
[JsonProperty("user")]
28+
public DiscogsUserForList User { get; set; } = null!;
29+
}
30+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace discogsharp.Domain
2+
{
3+
public abstract class DiscogsListEntity : Resource
4+
{
5+
public string? Comment { get; set; }
6+
public string? DisplayTitle { get; set; }
7+
public string? ImageUrl { get; set; }
8+
public ResourceType Type { get; set; }
9+
public string? Uri { get; set; }
10+
}
11+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Newtonsoft.Json;
2+
3+
namespace discogsharp.Domain
4+
{
5+
public class DiscogsListForUser : Resource
6+
{
7+
public DateTime DateAdded { get; set; }
8+
public DateTime? DateChanged { get; set; }
9+
10+
[JsonProperty("description")]
11+
public string? Description { get; set; }
12+
13+
public string? ImageUrl { get; set; }
14+
15+
[JsonProperty("public")]
16+
public bool IsPublic { get; set; }
17+
18+
[JsonProperty("name")]
19+
public string Name { get; set; } = null!;
20+
21+
[JsonProperty("uri")]
22+
public string Uri { get; set; } = null!;
23+
24+
[JsonProperty("user")]
25+
public DiscogsUserForList User { get; set; } = null!;
26+
}
27+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace discogsharp.Domain
2+
{
3+
public class LabelDiscogsListEntity : DiscogsListEntity
4+
{
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace discogsharp.Domain
2+
{
3+
public class MasterDiscogsListEntity : DiscogsListEntity
4+
{
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace discogsharp.Domain
2+
{
3+
public class ReleaseDiscogsListEntity : DiscogsListEntity
4+
{
5+
}
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Newtonsoft.Json;
2+
3+
namespace discogsharp.Domain
4+
{
5+
public class DiscogsUserForList : Resource
6+
{
7+
public string? AvatarUrl { get; set; }
8+
9+
[JsonProperty("username")]
10+
public string Username { get; set; } = null!;
11+
}
12+
}

0 commit comments

Comments
 (0)