Added MusicBrainz API project

This commit is contained in:
Matthew Despain
2017-03-30 20:37:24 -06:00
parent 7208d4c887
commit a37add2f7a
41 changed files with 2546 additions and 2 deletions
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("artist-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class ArtistList : BaseList
{
/// <summary>
/// Gets or sets the list of artists.
/// </summary>
[XmlElement("artist")]
public List<Artist> Items { get; set; }
}
}
@@ -0,0 +1,25 @@
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
public class BaseList
{
/// <summary>
/// Gets or sets the total list items count.
/// </summary>
/// <remarks>
/// This might be different form the actual list items count. If the list was
/// generated from a search request, this property will return the total number
/// of available items (on the server), while the number of returned items is
/// limited by the requests 'limit' parameter (default = 25).
/// </remarks>
[XmlAttribute("count")]
public int QueryCount { get; set; }
/// <summary>
/// Gets or sets the list offset (only available in search requests).
/// </summary>
[XmlAttribute("offset")]
public int QueryOffset { get; set; }
}
}
@@ -0,0 +1,24 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("medium-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class MediumList : BaseList
{
/// <summary>
/// Gets or sets the medium track count.
/// </summary>
/// <remarks>
/// Only available in the result of a release search (???).
/// </remarks>
[XmlElement(ElementName = "track-count")]
public int TrackCount { get; set; }
/// <summary>
/// Gets or sets the list of mediums.
/// </summary>
[XmlElement("medium")]
public List<Medium> Items { get; set; }
}
}
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("recording-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class RecordingList : BaseList
{
/// <summary>
/// Gets or sets the list of recordings.
/// </summary>
[XmlElement("recording")]
public List<Recording> Items { get; set; }
}
}
@@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("relation-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class RelationList : BaseList
{
/// <summary>
/// Gets or sets the relation target type.
/// </summary>
[XmlAttribute("target-type")]
public string TargetType { get; set; }
/// <summary>
/// Gets or sets the list of relations.
/// </summary>
[XmlElement("relation")]
public List<Relation> Items { get; set; }
}
}
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("recording-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class ReleaseGroupList : BaseList
{
/// <summary>
/// Gets or sets the list of release-groups.
/// </summary>
[XmlElement("release-group")]
public List<ReleaseGroup> Items { get; set; }
}
}
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("release-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class ReleaseList : BaseList
{
/// <summary>
/// Gets or sets the list of releases.
/// </summary>
[XmlElement("release")]
public List<Release> Items { get; set; }
}
}
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("tag-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class TagList : BaseList
{
/// <summary>
/// Gets or sets the list of tags.
/// </summary>
[XmlElement("tag")]
public List<Tag> Items { get; set; }
}
}
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("track-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class TrackList : BaseList
{
/// <summary>
/// Gets or sets the list of tracks.
/// </summary>
[XmlElement("track")]
public List<Track> Items { get; set; }
}
}
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Hqub.MusicBrainz.API.Entities.Collections
{
[XmlRoot("work-list", Namespace = "http://musicbrainz.org/ns/mmd-2.0#")]
public class WorkList : BaseList
{
/// <summary>
/// Gets or sets the list of works.
/// </summary>
[XmlElement("work")]
public List<Work> Items { get; set; }
}
}