.Net (c#) Oodle API wrapper

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!

Advertisements

About ricardocovo

Senior Software Architect/Developer with extensive experience in web related technologies.

5 Responses to “.Net (c#) Oodle API wrapper”

  1. 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

  2. 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…

  3. 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.

  4. If you are interested in REST API you might want to also check http://blog.love2trade.com/2010/09/13/oodleapi/

Trackbacks/Pingbacks

  1. Oodle Blog » Blog Archive » Props to Oodle API Developers - May 28, 2008

    […] sample code and/or .NET client libraries for the Oodle API. Ricardo has done just that, writing a C# .NET wrapper for the API and publishing the source code for others to use. Awesome […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: