예제 #1
0
파일: RestServices.cs 프로젝트: jmn319/mmb
        public object Get(Search request)
        {
            if (request.MediaType == "show")
            {
                if (request.Local == "true")
                {
                    Console.WriteLine("Local show search request: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
                    return JsonSerializer.SerializeToString(RestUtils.GetLocalSearch(true, request.Query));
                }

                else
                {
                    Console.WriteLine("External show search request: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
                    //TODO: Implement this funationality
                    return JsonSerializer.SerializeToString(new ReturnClass() { Key = "response", Value = "I don't understand your request... yet" });
                }
            }
            else
            {
                if (request.Local == "true")
                {
                    Console.WriteLine("Local movie search request: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
                    return JsonSerializer.SerializeToString(RestUtils.GetLocalSearch(false, request.Query));
                }

                else
                {
                    Console.WriteLine("IMDB search request: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
                    return JsonSerializer.SerializeToString(RestUtils.GetSearchImdbMovies(request.Query));
                }
            }
        }
예제 #2
0
파일: RestServices.cs 프로젝트: jmn319/mmb
 public object Post(Search request)
 {
     Console.WriteLine("Search post: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
     return Get(request);
 }
예제 #3
0
파일: RestServices.cs 프로젝트: jmn319/mmb
 public object Post(Search request)
 {
     Console.WriteLine("Search post: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
     return(Get(request));
 }