refactor: Common components are moved to the Common library.

This commit is contained in:
real-zony
2022-10-06 13:02:20 +08:00
parent ecab0e0f5c
commit 740e8f4c63
64 changed files with 84 additions and 150 deletions

View File

@@ -0,0 +1,36 @@
using System.Text;
using System.Web;
using Newtonsoft.Json;
namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel
{
public class SongSearchRequest
{
[JsonProperty("format")]
public string Format { get; protected set; }
[JsonProperty("inCharset")]
public string InCharset { get; protected set; }
[JsonProperty("outCharset")]
public string OutCharset { get; protected set; }
[JsonProperty("platform")]
public string Platform { get; protected set; }
[JsonProperty("key")]
public string Keyword { get; protected set; }
protected SongSearchRequest()
{
Format = "json";
InCharset = OutCharset = "utf-8";
Platform = "yqq.json";
}
public SongSearchRequest(string musicName, string artistName) : this()
{
Keyword = HttpUtility.UrlEncode($"{musicName}+{artistName}", Encoding.UTF8);
}
}
}