public SearchProgressArg(ISearchArg searchArg, SearchResult searchResult, int pageIndex, MetadataKeywordLists metadataKeywordLists, GallerySortType sortType, SortOrder sortOrder) { SearchArg = searchArg; SearchResult = searchResult; PageIndex = pageIndex; MetadataKeywordLists = metadataKeywordLists; SortType = sortType; SortOrder = sortOrder; }
public string Format(string text, ISearchArg searchArg) { return(new Formatter(new ITokenReplacer[] { new PathTokenReplacer(PathFormatter), new MetadataKeywordListTokenReplacer(MetadataKeywordLists.Whitelist, MetadataKeywordLists.Blacklist, MetadataKeywordLists.Ignorelist, MetadataKeywordLists.Hidelist), new SearchTokenReplacer(searchArg, TagsModel) }, TokenModifiers).Format(text)); }
/// <summary> /// /// </summary> /// <param name="body"></param> /// <returns></returns> /// <exception cref="QQMusicAPIException"></exception> public async Task <SearchResult> SearchAsync(ISearchArg body) { var url = $"http://c.y.qq.com/soso/fcgi-bin/client_search_cp?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=txt.yqq.center&t=0&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p={body.Page}&n={body.PageSize}&w={body.Keywords}&jsonpCallback=searchCallbacksong2020&format=json&inCharset=utf8&outCharset=utf-8¬ice=0&platform=yqq&needNewCode=0"; return(await GetHttpAsync <SearchResult>(url)); }
public SearchTokenReplacer(ISearchArg searchArg, TagsModel tagsModel) { SearchArg = searchArg; TagsModel = tagsModel; }