I recently had the need to interact with Oodle as a way to feed a classified site.
I was suprise to see that while they had php and java libraries/samples already available, but they did not have a .Net one. I searched on their forums and on the web and did not find a library I could use.
Since I had to interact with the api, I decided to make a library, and publish it as an open source component so other developers can use it.
You can find the library at: http://www.codeplex.com/oodlenet; all the references, source code & samples are included in the workspace.
I hope this helps!
Hello,
I have downloaded your oodle api .NET wrapper but I just don’t know how to make use of it.
I have visual web developer 2005 express edition So I cannot use the source code provided by you.
I have the binaries but don’t know how to use them. Can you please provide a sample?
I am really in need of it.
Thanks,
Manish
Manish,
The solution provided contains a Windows application which uses a Class Library that is also included..
With the express edition, I believe you can not reference other projects (like class libraries), so you will have to reference the dlls (CookComputing.XmlRpcV2.dll and WebNodes.OodleNet.dll).
After you reference the dlls, you can use them with code like the following:
string OodleApiKey = "YourKeyHere"; //NOTE: this should be in a configuration file.
ItemSearchParameters parameters = new ItemSearchParameters(OodleApiKey, txtRegion.Text.Trim().ToLower());
parameters.Category = txtCategory.Text.Trim().ToLower();
parameters.From = Convert.ToInt32(txtFrom.Text);
parameters.To = Convert.ToInt32(txtTo.Text);
parameters.Dimensions.AddSellerType("private");
OodleApiWrapper oodleApi = new OodleApiWrapper();
ItemSearchResults results = oodleApi.Get(parameters);
if (results.Total == 0)
{
MessageBox.Show("No records found");
}
else
{
MessageBox.Show(string.Format("item 1: {0}", results.ItemList[0].Title));
}
If you need to change the WebNodes.OodleNet library, or want to see the implementation, you will need the C# Express Edition (http://www.microsoft.com/express/vcsharp/)
Hope this helps…
With their REST API, I’ve had success generating an XSD file from several XML responses using xsd.exe. I then tweaked some of the types in the XSD and generated a group of classes that I can read responses into the classes using the System.Xml.Serialization.XmlSerializer.Deserialize method. After a bit of tweaking, it works great and provides a cool typed C# solution.
If you are interested in REST API you might want to also check http://blog.love2trade.com/2010/09/13/oodleapi/