Beispiel #1
0
        public async Task <Result <Groups> > ListAll(FullQuery query)
        {
            string route    = $"{GetUrl("listAll")}{query.ToQueryString()}";
            var    response = await _restClientService.Get <Groups>(route);

            return(ServiceHelper.MapResponse(response));
        }
Beispiel #2
0
        public async Task <Result <Messages> > AnonymousRead(FullQuery query)
        {
            string route    = $"{GetUrl("anonymousread")}{query.ToQueryString()}";
            var    response = await _restClientService.Get <Messages>(route);

            return(ServiceHelper.MapResponse(response));
        }
            public QueryData(string query)
            {
                Artist    = null;
                Mapper    = null;
                FullQuery = query.ToLowerInvariant();

                string modifiedQuery = FullQuery + "-endQuery";

                if (FullQuery.Contains("-artist"))
                {
                    // match everything from -artist to the next occurrence of -mapper or -endQuery
                    Match m = Regex.Match(modifiedQuery, "-artist.*?(?=-mapper|-endQuery)");
                    FullQuery = FullQuery.Replace(m.Value, ""); // remove artist part from song title
                    Artist    = m.Value.Replace("-artist", "").Trim();
                    Artist    = Artist.Replace(" ", "");
                }
                if (FullQuery.Contains("-mapper"))
                {
                    // match everything from -mapper to the next occurrence of -artist or -endQuery
                    Match m = Regex.Match(modifiedQuery, "-mapper.*?(?=-artist|-endQuery)");
                    FullQuery = FullQuery.Replace(m.Value, ""); // remove mapper part from song title
                    Mapper    = m.Value.Replace("-mapper", "").Trim();
                    Mapper    = Mapper.Replace(" ", "");
                }
                Title = FullQuery.Trim();
            }