Subscribe to Sergio Tapia - Lost in the GC.        RSS Feed
-----

C# DreamInCode API - NuGet Package Released

Icon 3 Comments
Hey there. Today I took a gander at my DreamInCode library I released for .NET and decided to merge it over to Github.

https://github.com/s...DreamInCode.Net

The source code is very easy to follow and hopefully I managed to clean out a lot of the crap and over engineering I managed to cram in the previous version.

This time it's simple, clean and barebones.

There's a NuGet Package!

http://nuget.org/Lis...DreamInCode.Net

Posted Image

Using it in Visual Studio 2010.

You just have to right click and select Manage NuGet Packages. Then search for DreamInCode and you'll find it.

Posted Image

Usage of the library is very straightforward.

/* The UserRepository class is what you'll use to fetch information from the API. */
UserRepository userRepository = new UserRepository();

/* You can search for users by giving the repository a numerical ID. */
var user = userRepository.FindUserById(335389);

/* Accessing the information is very easy and intuitive. */
Console.WriteLine(user.UserProfileId);
Console.WriteLine(user.Name);
Console.WriteLine(user.Rating);
Console.WriteLine(user.Reputation);
Console.WriteLine(user.JoinDate);
Console.WriteLine(user.PostCount);

/* Their friends are already loaded into the User object! */
foreach (var friend in user.Friends)
{
    Console.WriteLine("{0} - {1}", friend.FriendId, friend.Name);
}

/* So are their visitors! */
foreach (var visitor in user.Visitors)
{
    Console.WriteLine("{0} visited on: {1}", visitor.Name, visitor.TimeOfLastVisit);
}
            
Console.ReadKey(true);


Hopefully you guys use it and some more .NET applications for us Windows users. I smell a DIC messenger maybe? :)

Let me know what you think and if you want to contribute feel free to pull request me on Github.

3 Comments On This Entry

Page 1 of 1

sithius92 Icon

07 September 2011 - 12:55 PM
Nice job! Thanks for the release!
0

Gavisann Icon

11 September 2011 - 04:32 PM
Nice job! I have playing with it for a few minutes and I like it.
1

Sergio Tapia Icon

12 September 2011 - 06:07 AM
Please be sure to share any projects you create with it. :)
0
Page 1 of 1

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

1 user(s) viewing

1 Guests
0 member(s)
0 anonymous member(s)

Google

About Me

Posted Image


Bienvenidos! I'm a USA ex-pat living in Bolivia for the past 10 years. Web development is my forte with a heavy lean for usability and optimization. I'm fluent in both English and Spanish. I guest write for the popular Python website Python Central. Visit my website.

Categories