Get URL from search task - task

I have seen many examples where a search task was launched from application but no examples where application could get some info back from that task.
For example, is it possible to get a list of found sites or URL that user have chosen in task (instead of navigating user to that URL)?

There is no built-in API in WP8 that would allow getting the results of a web search into your app. You should use a 3rd party framework for that.
Bing has an official Web API you can use for that but it starts costing money after 10,000 API calls per month. You can read more about it # https://datamarket.azure.com/dataset/5BA839F1-12CE-4CCE-BF57-A49D98D29A44
Note that Bing did use to have a proper C# API with API keys and what not, but V2.0 of that API has been depercated in favour of the new Azure Data Marketplace service.
Google doesn't have an API for search results. But for the past few years developers have used Google's AJAX webservice to get those. See a C# code sample # http://answers.oreilly.com/topic/2165-how-to-search-google-and-bing-in-c/

Related

how can we retrieve the publicly stored statements from Tin Can API?

what Tin Can API can do other than storing the state of the agent and how can we retrieve the publicly stored statements from Tin Can API
Thanks in advance
You can do a lot with the Tin Can API (Experience API). The point of the xAPI is to store user experiences, anything from I completed a course to I started watching a video. I've seen or worked on things as simple as using the xAPI to send SCORM tracking to an LRS, to support mobile, tracking sensor data from field exercises, to storing information collected in games and simulations. And the Experience API gives you the ability, like you said, to get data back out in a standard way, to support reporting and evaluation of data.
There are groups working with the Experience API to do interesting things. https://groups.google.com/a/adlnet.gov/forum/#!forum/xapi-design
There is also a spec working group forum where you can get more resources and answers: https://groups.google.com/a/adlnet.gov/forum/#!forum/xapi-spec
There are also resources and articles talking about what you can do with the Experience API. http://www.adlnet.gov/tla/experience-api/
and http://en.wikipedia.org/wiki/Tin_Can_API
There are some open source projects on ADL's GitHub page that also show how you can use the Experience API. https://github.com/adlnet
For sending and retrieving info from an LRS in web browsers there's a JavaScript library: https://github.com/adlnet/xAPIWrapper .. it's been built and minified..you can just include the xapiwrapper.min.js in your page and use the readme examples to get started.
For reporting and querying data you can look at the new project: https://github.com/adlnet/xAPI-Dashboard
There's a starting Java library to make talking to an LRS easier in Java, which could be used for regular Java apps or for Android apps: https://github.com/adlnet/jxapi
They're also starting a JQuery Mobile Plugin: https://github.com/adlnet/xapi-jqm
And even an example of using the Experience API with MedBiquitous and Common Core competencies to identify learner's progress toward becoming competent in some aspect: https://github.com/adlnet/xci
As for your question about getting statements from an LRS, you would just do a GET request to the statements endpoint. The spec currently says that requests must include the Experience API version header: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#62-api-versioning . And you will probably need to authenticate as a client using the LRS. This is generally done by registering on the LRS and getting some sort of credentials. This will vary based on the LRS you use, but they all have instructions on how to use and send the credentials. https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#64-security
ADL's hosted example LRS opened up the GET statements endpoint so that people new to the Experience API could hit it and see statements without needing to figure out the request rules: https://lrs.adlnet.gov/xapi/statements

Accessing third part website-ruby

I did some web search and found nothing for the question i have with me, so I'm posting it here. I wants to build a simple Ruby On rails web application which will be used to display the search result from a third party ebsite without any API avilable. (ex: For example when a user type a keyword and click search i need to get the response from google.com and display that to user in my application).
How can i achieve this?
I hope scrapping is not an advised solution.Is there any advisable techniques(like SOAP 0r REST API).
NOTE: The website is a public government website.i need to access the search from my application(It has no built in API for this purpose).
Google has a search api that you can use https://developers.google.com/custom-search/json-api/v1/overview
and there is a gem available.
https://github.com/google/google-api-ruby-client

doubts about foursquare API

My question is not about FourSquare API and its functions, but about more simpler details that are not well explained on Foursquare API explanations. Thank you very much in advance if someone wants to help me with this doubts:
Foursquare API is a framework you can use to build applications for mobile devices, above of IOS and Android, so i can imagine that they have API for IOS (Objective-C) and Android (Java), right?
From API Doc: "Be sure to note that although API requests are against api.foursquare.com, OAuth token and authorization requests are against foursquare.com.". Does it mean that if i want to use FourSquare app, the users has to have an account on FourSquare?
From API Doc: "For example, if you write an iPhone application, every user who logs in with their foursquare account will be able to make up to 500 users/* requests and up to 500 venues/* requests, etc." I dont understand this sentence. Does it mean that for example, if you use an API method request like "checkins.add()", this method create two methods? one against api.foursquare.com to monitor the API limit requests, and another to your Web Application Server?
So as a question related to the third one, where do you have to store your database? is it stored on Foursquare cloud database because you are loggin there, or you have to create your own Web Service application with its own SQL database?
From API Doc: "All requests are simple GET or POST requests that return JSON or JSONP respones", so i can imagine that the Web Application Service should understand JSON. Well, my main question is, can i use Ruby on Rails to build the Web Application Service and Web Page frontend? I am seeing that there are some wrapps for RoR designed from third companies, but are not official and doesnt cover all the 2.0 API, just the ones they needed for their services.
If i want to create an app using FourSquare API, what do you advice me to use as a programming language/framework for the Web Service Application? the WSA that has to process the JSON requests and later store them on the database, interaction with users on the WebPage, etc.
i am so sorry if my questions are so simple, but i dont have any other place of this level of expertise.
thank you very very much in advance.
The API is REST/JSON based, which means that any language that can do an HTTP request and parse a string can be used. There are Java and iOS libraries available. But you could use just about anything - curl with bash would be a bit extreme but if that floats your boat...
For some of the APIs (search a venue, for example) you do not necessarily need a FourSquar OAuth user token. For others (like checkin) a FourSquare token is required. For any API calls that require a userid, your users will have to be FourSquare users and "trust" your application with their FourSquare data.
Only requests to FourSquare is counted. So if you do a single call to checkins.add() it counts as one call for the user that is doing the checkin. I wouldn't worry about the limits. As long as you're usage of the API is sensible they will not be a problem. And if they do become a problem and you're doing something extraordinarily cool, the folks at FourSquare might be sympathetic.
You have to create your own web server with your own database to store some information. The OAuth token is one. You probably want to cache venue information here for short periods as well.
Yes, your webapp will need to be able to understand JSON. Ruby has excellent JSON support - look for the json gem.
It is really difficult to suggest a language or framework without knowing what it is that you're trying to do. I wouldn't choose a framework based on the fact that you want to use FourSquare (anything will do) but rather on your experience and the unique features of your application. You mentioned RoR before - that would definitely work.

How should I use Twitter API?

I want to develop a web application that uses the Twitter API. Before going any further there are some questions that require answer:
Should I store on my server the list of followers/following or should I query the API each time?
Same as 1 but for tweets instead of people.
If I store messages in my application, search should be performed on the local database or using the API?
Mostly sure unimportant details: ASP.NET (MVC?) and MSSQL will be used.
i would use the api, and if you find the app is pulling data slowly or you're running into limits, cache some of the results in the session (like the followers list could be cached and refreshed if it's more than 10 minutes old). you could also put the cache in mssql if you need even greater persistence.
System.Web.Caching.Cache is useful for that...
the twitter search api has a lot of options and can search through wider time ranges, so i would use that.
TweetSharp is an easy-to-use twitter api for .net that simplifies a lot of the operations:
http://tweetsharp.com/
Roughly, this can help you to make a decision:
Can your application run even if that API server is down or do you have any API call count limit?
If you answer "Yes" to any of this questions, cache that information.

Get google and yandex search results

I want to parse google and yandex search results for my little website analyzer utility.
so i should send hundreds requests per minute. What is good practice for this issue?
Is google search api a good way?
The Google Search API may not be used for bots. Google will block your utility if you request too much searches.
http://code.google.com/apis/ajaxsearch/terms.html
You agree that when using the Service, You will not, and will not permit users or other third parties to:
Use any robot, spider, site search/retrieval application, or other device to retrieve or index any portion of Google Search Results or to collect information about users for any unauthorized purpose;

Resources