Skip to main content
replaced http://stackapps.com/ with https://stackapps.com/
Source Link

###Update I've implemented multi-threading safe response caching and request throttling, these are explained in this postin this post.

###Update I've implemented multi-threading safe response caching and request throttling, these are explained in this post.

###Update I've implemented multi-threading safe response caching and request throttling, these are explained in this post.

updated about section
Source Link
bevacqua
  • 213
  • 1
  • 8

This is a StackExchange API v2.0 consumer library written under C#. It is heavily documented and designed to make it as easy as humanly possible to interact with the API.

##Example Usage

To To get the name of each silver badge you've been awarded on Stack Overflow:

##About

You
You can read the wiki documentation on GitHub here.

I created BridgeStack as a way to give back to the StackOverflow community, which has helped me out and taught me on countless ocassions.
At

At all times I attempted to mantain the same philosophy in writting this library. I documented every method, reused as much code as possibly, mirrored the API as heavily as possible, and generally designed it with wrapping away complexity in mind.
I would appreciate if you let me know what you think of it. I'm sure there's a lot of room for improvement.

###DownloadAnother goal in BridgeStack is to keep the code as clean and it's public facing interfaces as simple as possible.

###Update I've implemented multi-threading safe response caching and request throttling, these are explained in this post.

##Download BridgeStack can be downloaded following this link on GitHub.

###License

I'm##License I'm going with GPL

###Platform

C###Platform C# .NET 4.0

##Contact

   Nicolas Bevacqua

##Code

   BridgeStack was written under C# .NET 4.0, though I assume it wouldn't be a problem to port it to other plaforms if enough people were interested in it. You can find the full source code on GitHub.

This is a StackExchange API v2.0 consumer library written under C#. It is heavily documented and designed to make it as easy as humanly possible to interact with the API.

##Example Usage

To get the name of each silver badge you've been awarded on Stack Overflow:

##About

You can read the wiki documentation on GitHub here.

I created BridgeStack as a way to give back to the StackOverflow community, which has helped me out and taught me on countless ocassions.
At all times I attempted to mantain the same philosophy in writting this library. I documented every method, reused as much code as possibly, mirrored the API as heavily as possible, and generally designed it with wrapping away complexity in mind.
I would appreciate if you let me know what you think of it. I'm sure there's a lot of room for improvement.

###Download

BridgeStack can be downloaded following this link on GitHub.

###License

I'm going with GPL

###Platform

C# .NET 4.0

##Contact

 Nicolas Bevacqua

##Code

 BridgeStack was written under C# .NET 4.0, though I assume it wouldn't be a problem to port it to other plaforms if enough people were interested in it. You can find the full source code on GitHub.

This is a StackExchange API v2.0 consumer library written under C#. It is heavily documented and designed to make it as easy as possible to interact with the API.

##Example Usage To get the name of each silver badge you've been awarded on Stack Overflow:

##About
You can read the wiki documentation on GitHub here.

I created BridgeStack as a way to give back to the StackOverflow community, which has helped me out and taught me on countless ocassions.

At all times I attempted to mantain the same philosophy in writting this library. I documented every method, reused as much code as possibly, mirrored the API as heavily as possible, and generally designed it with wrapping away complexity in mind.
I would appreciate if you let me know what you think of it. I'm sure there's a lot of room for improvement.

Another goal in BridgeStack is to keep the code as clean and it's public facing interfaces as simple as possible.

###Update I've implemented multi-threading safe response caching and request throttling, these are explained in this post.

##Download BridgeStack can be downloaded following this link on GitHub.

##License I'm going with GPL

##Platform C# .NET 4.0

##Contact  Nicolas Bevacqua

##Code  BridgeStack was written under C# .NET 4.0, though I assume it wouldn't be a problem to port it to other plaforms if enough people were interested in it. You can find the full source code on GitHub.

added 27 characters in body
Source Link
bevacqua
  • 213
  • 1
  • 8
var client = new StackClientFactory().Create(_appKey, _token);
client.Default.Site = NetworkSiteEnum.StackOverflow;
var parameters = new BadgesOnUserQuery
{
    Sort = QuerySortEnum.BadgeRank,
    Min = BadgeRankEnum.Silver,
    Max = BadgeRankEnum.Silver
};
var badges = client.GetMyBadges(parameters);

foreach (var badge in badges.Unsafe)
{
    Console.WriteLine(badge.Name);
}
foreach (var badge in badges.Unsafe)
{
    Console.WriteLine(badge.Name);
}

The badges are then iterated, and their names are output to the console. Note that Unsafebadges only means that if a problem arises, Unsafe can throwwhile an Exception. If we were using SafeIEnumerable<T>, it would justcontains valuable data other than the actual list items, like paging info, the actual response, exceptions that might have been thrown null. This has to do with coding style(and be the reason the enumeration is empty), mostlyetc.

var client = new StackClientFactory().Create(_appKey, _token);
client.Default.Site = NetworkSiteEnum.StackOverflow;
var parameters = new BadgesOnUserQuery
{
    Sort = QuerySortEnum.BadgeRank,
    Min = BadgeRankEnum.Silver,
    Max = BadgeRankEnum.Silver
};
var badges = client.GetMyBadges(parameters);

foreach (var badge in badges.Unsafe)
{
    Console.WriteLine(badge.Name);
}
foreach (var badge in badges.Unsafe)
{
    Console.WriteLine(badge.Name);
}

The badges are then iterated, and their names are output to the console. Note that Unsafe only means that if a problem arises, Unsafe can throw an Exception. If we were using Safe, it would just have been null. This has to do with coding style, mostly.

var client = new StackClientFactory().Create(_appKey, _token);
client.Default.Site = NetworkSiteEnum.StackOverflow;
var parameters = new BadgesOnUserQuery
{
    Sort = QuerySortEnum.BadgeRank,
    Min = BadgeRankEnum.Silver,
    Max = BadgeRankEnum.Silver
};
var badges = client.GetMyBadges(parameters);

foreach (var badge in badges)
{
    Console.WriteLine(badge.Name);
}
foreach (var badge in badges)
{
    Console.WriteLine(badge.Name);
}

The badges are then iterated, and their names are output to the console. Note that badges, while an IEnumerable<T>, contains valuable data other than the actual list items, like paging info, the actual response, exceptions that might have been thrown (and be the reason the enumeration is empty), etc.

added 36 characters in body
Source Link
bevacqua
  • 213
  • 1
  • 8
Loading
edited tags
Link
bevacqua
  • 213
  • 1
  • 8
Loading
added 125 characters in body
Source Link
bevacqua
  • 213
  • 1
  • 8
Loading
Source Link
bevacqua
  • 213
  • 1
  • 8
Loading