I’m looking for a website that offers API for retrieving the words from English WordNet database.
I do not want to download the WordNet database and implement it in my server.
Simply I want to call API and get back some results in XML format from that web site.
I have a web application in ASP.net that is written in C#.
Here there is a sample from WordNet, I want to do something like that in my web application.
WordNet Online
It seems that is no such API publicly available.
According to Related Projects site part of WordNet data is avaible as API via abbreviations.com:
Abbreviations.com has created free APIs based on REST calls which return a well-formatted XML result, providing both synonyms and definitions APIs based on the WordNet database.
However on the same page in .NET/C# section you can find some publicly available local APIs, so you don't have to implement it by yourself, but have to download data files.
WordNet does not seem to expose a REST or similar API that can be used. That said, you might be able to derive the URL pattern by searching online and using that in your application and parsing the response html.
You might want to check there website to make sure this is legal.
Related
Could somebody help me find an example of getting data from SalesForce using its api with c#? E.g. getting a Contact information by its email address?
There are ready-built libraries for .NET integration such as https://github.com/wadewegner/Force.com-Toolkit-for-NET, I'd suggest starting with one of these. (old but official). Another one could be https://github.com/anthonyreilly/NetCoreForce
Old, stable, battle-tested or you want to craft the SOAP / REST messages yourself, read up about security tokens, oauth scopes, error handling, bulk API options? I'd offload at least the login part to existing library but your call :) There are many ways to connect, there's even (paid) SQL server plugin or azure data factory solution...
".NET toolkit" seems to use old SOAP API. It's... simple. You provide username, password and you get total impersonation. The app will be able to do everything the connecting user can do. The other one seems to use client id and secret, this sounds like newer REST-based API implementation (OAuth2 keys). This is slightly better, you get extra security layer of the connected app and for example if "scope" is only set to Chatter - even admin's session connecting via this app can't be abused.
There are slight differences between the APIs and the way they handle certain features (for example downloading a Document/Attachment/File via SOAP API will give you base64-encoded payload while REST API will give you a link to download the binary separately). And of course how much of the API does the library actually implement, how well it's maintained...
But generally I'd say explore the libraries first. At least steal some ideas around login logic. If nothing off-the-shelf works for you - consume the WSDL and hand-craft something in SOAP API. Worst case - craft the XML messages manually, worry about escaping special characters etc.
Get an account and api key and then use the official programming interface:
https://developer.salesforce.com/docs/apis
i'd choose: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest_resources.htm
So You have to read and understand this: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/using_resources_working_with_searches_and_queries.htm
:)
Hey I'm looking for some tutorials on how to consume an external Web API in ASP.NET MVC or if someone could explain briefly on how to go about it,specifically the https://platform.fatsecret.com/api/
You should check out RestSharp . It makes it very easy to consume an external API in your .NET application, since you can control how the API-response (JSON or XML) is deserialized to your model classes.
You can refer to the websites REST API Documentation on everything you need to include in your requests to their server. Here is an example of a method https://platform.fatsecret.com/api/Default.aspx?screen=rapiref&method=food.get
It breaks it down into what is required to be in your request and what you are to expect to see returned.
As for actual code, you have a few options. You can refer to Microsoft Docs in order to learn how to actually craft, send and receive requests to a REST API. The example shown uses the asp.net client Nuget package. It provides an object which allows you to easily create and receive requests.
Personaly, I like to practice with Postman for Chrome first. It allows you to easily create and receive REST data and even has an option to create template code from your request into multiple languages!
I want to know the method of pulling the data from website and parsing it into our own code to present it to the user.
For example: Consider an app in which a user types a movie name and all the poster gets fetched from various websites, like IMDb, etc. Or a user enters a movie name and all the data from IMDb is fetched. I know about certain third party API services for fetching data from IMDb, like omdbapi and imdbapi, but I want to know the method of doing so from any sort of website, not just IMDb.
I am a complete newbie in this context so please guide me through this from the very beginning. I want to do this in a Windows 8 Store app using C# and XAML in Visual Studio.
Simple way is you use the website's RSS feed. You can find the rss feed for any website. All you have to do is pass the parameters as a query string using a web request object. the response stream will them have all the details that you want that can be parsed through in c# and worked upon.
There is no standard way to do it for any website
you must write your algorithm for each of the websites you want to get the content from
HttpClient
is you tool in getting web content in your app
Check out YQL:
The Yahoo Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web.
You should use Html Agility Pack.
For better performance, host your scraping service on Azure.
I need to create a website in C# and need to use alfresco web service for process. In my site I need to create all the process that alfresco does through web service. I have seen the web services links in alfresco site. Its not documented as expected. I googled and found this one http://forge.alfresco.com/gf/project/dotnet/frs/
But this open source is in VB.NET. I need the same in C#. Can you please help me out?
Regards
Dipen
I suggest to consider other APIs before starting the developement of your application.
The Alfresco Web Services API is based on the SOAP protocol and it was the first API exposed by Alfresco. It was mainly created to work on Enterprise Services Bus (ESB) contexts and it could be useful only if you need to execute a vector of operations against the repository exchanging messages.
This API is based on a different model/schema called Content Manipulation Language (CML) that was created by Alfresco for managing remote calls. Personally I think that this is not easy to understand because it is quite different from the core model of Alfresco.
So I suggest to avoid the use of the Alfresco Web Services API.
Now the best approach that I suggest is to use CMIS (REST binding) or Spring WebScripts.
CMIS is a new standard supported by many ECM systems now and it stands for Content Management Interoperability Services. It contains some CRUDs methods to manipulate contents in the repository.
You could have some issues using CMIS only if you are using some specific Alfresco features that are not mapped in the CMIS specification.
The good point is that your client application based on CMIS can talk with any CMIS-compliant repository (Alfresco, OpenText, SharePoint, FileNet, Hippo, etc...)
Another good approach is to use the Alfresco REST API (WebScripts) that you can extend for your needs to expose REST methods that can be configured atomically.
This means that you can expose an HTTP method from Alfresco with your custom URL that can execute many operations in the repo but atomically. This means that if some errors are returned, the framework will rollback for you :)
I am building a web site in ASP.net and C# that one of its components involves log-in to a website that the user has an account (for example cellular phone company) on behalf of the user, take information from this site and store it in our database.
I think this action called "scraping".
Are there any products that already does so that I can use to integrate with my software ?
I don't need a software that does it, I need some sort of SDK that I can integrate with my C# code.
Thanks,
Koby
Use the HtmlAgilityPack to parse the HTML that you get from a web request once you've logged in.
See here for logging in: Login to website, via C#
I haven't found any product, that would do it right so far.
One way to handle this is to
- do requests by your self
- use http://htmlagilitypack.codeplex.com/ to extract important information from downloaded html
- save extracted information by your self
Thing is, that depending on context, there are so many things to tune/configure, that you need very large product and still it won't reach custom solution performance/accuracy:
a) multithreading control
b) extraction rules
c) persistance control
d) web spidering (or how next link to parse is chosen)
Check the Web Scraping Wikipedia Entry.
However I would say since what we need to acquire via web-scraping is application specific, most of the time, it may be more efficient to scrape whatever you need from a web response stream.