コード例 #1
0
ファイル: CPFeedService.cs プロジェクト: Akihiko06/TestTech
        public async Task <MovieBase> GetMovies(string MovieType, string ApyKey)
        {
            MovieBase oMovieBase = new MovieBase();

            try
            {
                wsConexion ws = new wsConexion();
                //Settings.sError = "";

                string sResponse = await ws.GetDataRestAsync(MovieType);

                oMovieBase = JsonConvert.DeserializeObject <MovieBase>(sResponse);
            }
            catch (Exception e)
            {
                oMovieBase.sError = e.Message;
            }
            return(oMovieBase);
        }
コード例 #2
0
ファイル: CPFeedService.cs プロジェクト: Akihiko06/TestTech
        public async Task <MovieDetail> GetMoviesDetail(int iMovie)
        {
            MovieDetail oMovieDetail = new MovieDetail();

            try
            {
                wsConexion ws = new wsConexion();
                //Settings.sError = "";

                string sResponse = await ws.GetDataRestAsync(iMovie.ToString());

                oMovieDetail = JsonConvert.DeserializeObject <MovieDetail>(sResponse);
            }
            catch (Exception e)
            {
                //oMovieDetail.sError = e.Message;
            }
            return(oMovieDetail);
        }
コード例 #3
0
ファイル: CPFeedService.cs プロジェクト: Akihiko06/TestTech
        public async Task <MovieCredits> GetCredits(int iMovie)
        {
            MovieCredits oMovieCredits = new MovieCredits();

            try
            {
                wsConexion ws = new wsConexion();
                //Settings.sError = "";

                string sResponse = await ws.GetDataRestAsyncCredits(iMovie);

                oMovieCredits = JsonConvert.DeserializeObject <MovieCredits>(sResponse);
            }
            catch (Exception e)
            {
                //oMovieBase.sError = e.Message;
            }
            return(oMovieCredits);
        }