Exemplo n.º 1
0
        public PartialFindResult <SongListForApiContract> GetSongLists(
            int id,
            string query = "",
            NameMatchMode nameMatchMode = NameMatchMode.Auto,
            int start                     = 0, int maxResults = defaultMax, bool getTotalCount = false,
            SongListSortRule sort         = SongListSortRule.Name,
            SongListOptionalFields?fields = null)
        {
            var textQuery = SearchTextQuery.Create(query, nameMatchMode);

            return(queries.GetCustomSongLists(id, textQuery, sort,
                                              new PagingProperties(start, maxResults, getTotalCount), fields ?? SongListOptionalFields.None));
        }
Exemplo n.º 2
0
        public PartialFindResult <SongListForApiContract> GetSongLists(
            int id,
            string query                = "",
            [FromUri] int[] tagId       = null,
            bool childTags              = false,
            NameMatchMode nameMatchMode = NameMatchMode.Auto,
            int start                     = 0, int maxResults = defaultMax, bool getTotalCount = false,
            SongListSortRule sort         = SongListSortRule.Name,
            SongListOptionalFields?fields = null)
        {
            var textQuery   = SearchTextQuery.Create(query, nameMatchMode);
            var queryParams = new SongListQueryParams {
                TextQuery = textQuery,
                SortRule  = sort,
                Paging    = new PagingProperties(start, maxResults, getTotalCount),
                TagIds    = tagId,
                ChildTags = childTags
            };

            return(queries.GetCustomSongLists(id, queryParams, fields ?? SongListOptionalFields.None));
        }
Exemplo n.º 3
0
 public SongListBaseContract[] GetSongLists(int userId)
 {
     return(queries.GetCustomSongLists(userId));
 }