Options

newbie req C#, VB.NET examples (or any other)

edonohoedonoho Registered Users Posts: 1 Beginner grinner
Just want to see an example (any language, really, not the just the M$ stuff)...
login
post a pic
get a cat/dir listing

Also, I don't know much about ssl. SSL is probably out of scope, but an example would be nice, too.

So, thanks in advance for helping me burn fewer calories.

Comments

  • Options
    luke_churchluke_church Registered Users Posts: 507 Major grins
    edited April 16, 2006
    How long have you got? :):

    I have a library under development that will mean that this can be achieved as:

    Api api = new SmugmugApi(apiKey, username, password);
    api.UploadImage(path, ID);
    Category[] cats = api.GetCategories();

    The library will not be ready for release before summer. Producing a robust version of such a library is a significant task.

    The current core is ~5000 lines of C# workaround/error/retry management code and another ~6000 of test cases. Several hundred hours of work.

    About 10% of the codebase serves to workaround known issues in Smugmug's API.

    But if you want it now, you'll either have to do it by hand using an XML-RPC library, or use the 'Send To Smugmug' codebase.

    It's not too hard to get something working, but then turning it from a hack into a serious robust application is a significant task. There are many many hidden gotchas.

    If you want serious transatlantic performance, then you're going to have do multi-threading, connection-pooling code, which involves modifying the HTTP core configuration.

    Do you have an API key?

    Do you have a favoured XML-RPC parsing library?
    Also, I don't know much about ssl. SSL is probably out of scope, but an example would be nice, too.

    Not if you're using .NET. Just talk to an 'https' address and let the underlying HTTP runtime management handle the encryption and decryption at the ends. With SmugTools, there won't even me a question, it will tunnel everything except image uploads over HTTPS. This bit is suprisingly easy.

    I'm not sure whether this helps or not. If you want example code .NET I'd recomend you look at Send To Smugmug.

    If you have any questions about that, or about talking .NET to Smugmug, feel free to post back here, and I'll do my best to help.

    Luke
Sign In or Register to comment.