Exemple #1
0
        private void ReviewButton_Click(object sender, RoutedEventArgs e)
        {
            var mi      = (MovieItem)this.DefaultViewModel["Item"];
            var apiCall = mi.Reviews + "?" + Globals.ROTTEN_TOMATOES_API_KEY;

            apiInvokeReviews.Invoke <MovieReviews>(apiCall);
        }
        ////////////////////////////////////////////////////////////////////////////////////
        // Update this routine to build the URI to invoke the API
        // determine how you want to build the API call:
        //     a) using user input
        //     b) hard coded values
        //     c) all of the above
        ///////////////////////////////////////////////////////////////////////////////////
        private void Invoke()
        {
            apiInvoke.OnResponse += apiInvoke_OnResponse;
            string apiCall = @"http://api.icndb.com/jokes/" + id + "?exclude=[explicit]" + name;

            apiInvoke.Invoke <CNorrisJoke>(apiCall);
        }
        private void InvokePhotoById(string styleId)
        {
            Sleep(1000);

            var apiCall = Globals.EDMUNDS_API_PHOTOS + styleId;

            _apiInvokePhotoByStyleId.Invoke <PhotoCollection>(apiCall);
        }
        private void InvokeYearMakeModel(string year)
        {
            Sleep(1000);
            var apiCall = Globals.EDMUNDS_API_FINDBYYEAR + year;

            //var apiCall = Globals.EDMUNDS_API_FINDALL;
            _apiInvokeYearMakeModel.Invoke <MakeCollection>(apiCall);
        }
        private void Invoke()
        {
            // STEP 2. Change the API here to see different movie listings
            var apiCall = Globals.ROTTEN_TOMATOES_API_MOVIES_INTHEATERS;

            //var apiCall = Globals.ROTTEN_TOMATOES_API_DVD_TOPRENTALS;
            _apiInvokeInTheaters.Invoke <RottenTomatoesMovies>(apiCall);
        }
Exemple #6
0
        public HomeViewModel(INavigationService navigationService)
        {
            this.navigationService = navigationService;    DisplayName = "Home";
            var api = new APIMASHInvoke();

            api.OnResponse += api_OnResponse;
            api.Invoke <APIMASH_StackExchangeLib.StackExchangeQuestions>(Constants.QuestionsApi);
        }
        private void InvokePhotoById(string styleId)
        {
            // sleeping to avoid calling the API's too often (throttle is 2 times a second)
            Thread.Sleep(500);
            var apiCall = Globals.EDMUNDS_API_PHOTOS + styleId;

            _apiInvokePhotoByStyleId.Invoke <PhotoCollection>(apiCall);
        }
        public void InvokeModelSpecsByMakeModelYear(string make, string model, string year)
        {
            var apiCall =
                Globals.EDMUNDS_API_MODELSPECS_MAKE + make +
                Globals.EDMUNDS_API_MODELSPECS_MODEL + model +
                Globals.EDMUNDS_API_MODELSPECS_YEAR + year +
                Globals.EDMUNDS_API_DEVKEY;

            _apiInvokeModelSpecs.Invoke <ModelSpecCollection>(apiCall);
        }
Exemple #9
0
        private void Invoke(string term, string location)
        {
            Progress.IsActive = true;

            apiInvoke.OnResponse += apiInvoke_OnResponse;

            // NOTE: This sample uses v1.0 of Yelp's API.  There is
            //   also a v2.0 API, supporting OAUTH and additional functionality

            // Yelp 1.0 DEV KEY
            string YELP_API_KEY = @"ywsid=[YOUR-DEV-KEY-HERE]";

            // By default, call Business Review Search and limit to open businesses
            // The API offers many other services/options
            string apiCall = @"http://api.yelp.com/business_review_search?is_closed=false&term=" + term + "&location=" + location + "&" + YELP_API_KEY;

            apiInvoke.Invoke <Yelp_Response>(apiCall);
        }
        async public void LoadArtistAsync(string name)
        {
            string apiCall = @"http://developer.echonest.com/api/v4/artist/search?api_key=" + APIKEY + @"&format=json&results=1&name=" + name;

            apiInvoke.Invoke <ArtistRootobject>(apiCall);
        }
        ////////////////////////////////////////////////////////////////////////////////////
        // Update this routine to build the URI to invoke the API
        // determine how you want to build the API call:
        //     a) using user input
        //     b) hard coded values
        //     c) all of the above
        ///////////////////////////////////////////////////////////////////////////////////
        private void Invoke()
        {
            const string apiCall = @"http://api.icndb.com/jokes/random?exclude=[explicit]";

            apiInvoke.Invoke <CNorrisJoke>(apiCall);
        }
        public void InvokeYearMakeModel(string year)
        {
            var apiCall = Globals.EDMUNDS_API_FINDBYYEAR + year;

            _apiInvokeYearMakeModel.Invoke <MakeCollection>(apiCall);
        }