.NET API kit

posted by Galad
Posted on Sunday March 15, 2009 at 15:50. 203 visits. ( permalink )
Hello,
I made an API kit for MS.NET. Available here

Here is an example to begin :

Ipernity ipernity = new Ipernity("apiKey", "apiSecret");
ipernity.AlwaysSign = true; // All requests will be signed
ipernity.AlwaysAuthenticate = true; // All requests will be authenticated
Account acc;
try
{
// Here is the authentication process.
Console.WriteLine("Récupération du frob.");
string frob = ipernity.AuthGetFrob();
string url = ipernity.AuthGetUrl(frob, Permission.Delete);
System.Diagnostics.Process.Start(url);
Console.WriteLine("Récupération du jeton. Appuyez sur ENTREE...", url);
Console.ReadLine();
acc = ipernity.AuthGetToken(frob);

// if there a token already exists you can use that method
acc = ipernity.AuthGetAccount("a token");

acc.GetQuota();
catch (IpernityException ex)
{
// All methods sending a request to Ipernity API can throw an IpernityException
// if en error has been returned
Console.WriteLine("Error {0} : {1}", ex.Error.ErrorCode, ex.Message);
}

There is also a (little) documentation here. I will add some example later.

Enjoy :)

This topic has been edited by Galad 7 months ago.

2 Replies

A Christophe Ruelle pro says:
Great! Looks a *huge* work you've done...!
is it stable and can we link it from the /apps homepage? Cheers!
Posted 7 months ago. ( permalink )
Galad says:
Hello :)
Thanks for the answer :)
Yes it is stable with the .NET framework. There is still a bug with Mono and accented characters with the POST method (except for upload), but I didn't take the time to fix it.
As I needed something to made my WLPG plugin and as I had some time, I took the opportunity to wrap the whole API. And I enjoyed it ^^
Concerning the link, yes you can of course. As the app is under the GPL so you don't need to ask me :)

Have a good evening :)
Posted 7 months ago. ( permalink )

You must be logged on to post a reply. Sign in now?


rss Latest comments – Subscribe to the comment feed for this topic.

 

Català | Čeština nové | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | More...