Esempio n. 1
0
        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));
                }
            }
        }
Esempio n. 2
0
 public object Post(Search request)
 {
     Console.WriteLine("Search post: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
     return Get(request);
 }
Esempio n. 3
0
 public object Post(Search request)
 {
     Console.WriteLine("Search post: " + DateTime.Now.ToString("M/d/yyyy H:mm:ss:ff"));
     return(Get(request));
 }