mardi 27 octobre 2015

New Imgur .NET SDK on Github, can be used Universal App, WinRT app, Windows Phone, any .net project

Github Repo:

How to use this sdk:

You first need to get your API key and secret id which you can find on the imgur website and/or here if you already have a done this:
To start you need to initialize the api:
    ApiRoot.Instance.Init("XXXXXXXX", "XXXXXX");
All of the methods are async, so just remember that you need to wait for the response.
I have mapped all of the imgur api endpoint which can be found here: to classes.

Here is example of how the API works with the GetEndPointEntityAsync method:
You will tell the method the type of data you plan on receiving and then tell it where to get this data:
                      new Data_to_get()
                                    //Data parameters
Here is a real example for how you can make a call:
    var result = await ApiRoot.Instance.GetEndPointEntityAsync<RootElement<GalleryImage>>(
            new GetGalleryImage ()
                page = 0,
                section =, <- cloud be improved
                showViral = true,
                sort =,
                window =,
Here is another example of how to do a Get Random Gallery Image
                 new GetRandomGalleryImages()
                            page = 1

This API sdk is used in my personal windows phone imgur app 8gur which can be found here:
if you wish to help be my guest!
Here is the Github Repo: