Using Bing API and Homework 1


Using Bing APIs + Homework
http://datamarket.azure.com/dataset/bing/search
Bing API  links you ll need to open
https://datamarket.azure.com/dataset/8818F55E-2FE5-4CE3-A617-0B8BA8419F65
http://go.microsoft.com/fwlink/?LinkID=272626&clcid=0x409
http://go.microsoft.com/fwlink/?LinkID=272626
1. Get a Microsoft account (hotmail.com, live.com)
2. https://datamarket.azure.com/ -- register there
3. http://go.microsoft.com/fwlink/?LinkID=272626 -- read
4. https://datamarket.azure.com/dataset/bing/searchweb check it out
5.  Go to the Account Keys https://datamarket.azure.com/account/keys page and add a
new account key for your application.  quote from the above document
6. Now you have the : String bingAPIKey
7. Make a list of queries and execute them. Display the results.
Step by step instructions
Step 1
Visit https://datamarket.azure.com/
Register for a Microsoft account if you do not already have one, otherwise
login with existing credentials
Step 2
Once logged in, visit http://datamarket.azure.com/dataset/bing/search
and sign up for 5,000 transactions/month (free)
Step 3
Once signed up, select My Data from the left menu. You should see the
Bing Search API on the list. Click Use on the right side.
Step 4
At the top, you will see Primary Account Key. Click Show next to that to
display your Bing API key.
Step 5
Open the BingSearch in Eclipse, and replace the accountkey variable with
your personal key (from previous step)
String accountKey = 89y76hgft/+ & & Qs ;
String searchText =  tallest building in the world ;
searchText=searchText.replaceAll(  , %20 );
Step 6
You will now have 5,000 searches /month available to use with the Bing
API
Using Bing  hints for Java
Remember to put your Bing credentials in the appropriate file; these are snippets of code and won t run
without changes
import org.apache.http.client.fluent.*;
query = query.replaceAll(" ", "%20");
String url =
"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/We
b?Query=%27" + query + "%27&$top=10&$format=Atom";
String results = Executor .newInstance()
.auth(yourBingAPIKey,yourBingAPIKey)
.execute(Request.Get(url))
.returnContent().asString();
Group Homework: Write a program to execute
20 Bing queries and record the responses:
" You can all work together
" But everyone has to have a program running with their own credentials and their own 15 queries
" Everyone has to submit the homework. Show queries and answers.
" The deadline for submitting this homework is Sun Nov 9 midnight (PL time)
" You submit the homework by sharing a Dropbox link with me (wlodzgm@gmail.com)
" The name of your submission must have the format LAST_NAME_FirstNAME_StudentNo_HomeworkDueDa
E.G. Polonski_Edward_wwsi4571_November_9_2014


Wyszukiwarka

Podobne podstrony:
Knife Making Stabilizing Wood Using Polyurethane And Vacuum
Computational Finance Using C and C# by Georege Levy
USING A PITOT STATIC TUBE FOR VELOCITY AND FLOW RATE MEASURE
Analysis of ADN, Its Precursor and Possible By Products Using Ion Chromatography
Using Entropy Analysis to Find Encrypted and Packed Malware
Using Predators to Combat Worms and Viruses A Simulation Based Study
Using LabVIEW with TCP IP and UDP
Analysis of soil fertility and its anomalies using an objective model
Internet Security Using Namecoin and MinimaLT
Using Verification Technology to Specify and Detect Malware
Real time processing with the Philips LPC ARM mcu using GCC and uCOS II RTOS (D W Hawkins, 2006)
2002 03 Using and Setting Up Java
2006 07 in and Out Using Rcs Version Control to Manage Simple Scripts
Control Systems Simulation using Matlab and Simulink
2001 02 Bootdisk Creating and Using Emergency Recovery Disks
Penguin Readers Teacher s Guide to using Film and TV

więcej podobnych podstron