Coder Social home page Coder Social logo

cardcastsharp's Introduction

CardcastSharp

CardcastSharp is a C# api wrapper for the Cardcastgame.com API.

Releases

If you're lazy and don't want to bother reading the docs, head over to the releases page. UPDATE: this is a single file library. Modify it to work with the language version you're using and just shove it into your project. I won't be uploading builds for this anymore.

The stuff below is out of date but I'm tired can't fix figure it out

Getting Started

The Cardcast API is simple by nature. This wrapper is equally simple.

Don't forget to

using CardcastSharp;

To get a deck:

Deck d = await Cardcast.GetDeck("4KU68", OnGetDeckError);
if(d != null)
{
	// Do stuff
}

private void OnGetDeckError(Exception error)
{
	// Handle error here
}

Passing a callback to the GetDeck() function allows some shit to be done if something fucks up internally.

Getting the cards in the deck:

Deck d = await Cardcast.GetDeck("4KU68", OnGetDeckError);
if(d != null)
{
	foreach(Card c in d.Calls)
	{
		// Do something with all the calls (black cards) in the deck
	}

	foreach(Card c in d.Responses)
	{
		// Do something with all the responses (white cards) in the deck
	}
}

Getting information for a deck:

Deck d = await Cardcast.GetDeck("4KU68", OnGetDeckError);
if(d != null)
{
	d.Info // Contains lots of information about the deck
}


// Alternate method

DeckInfo di = await Cardcast.GetDeckInfo("4KU68", OnGetDeckError);
if(di != null)
{
	di.Author // Lots of properties in here
}

License

Just don't be a dick.

Neither FEAR Labs or myself owns Cardcast. This is simply a wrapper for their cool thing.

cardcastsharp's People

Contributors

brosilio avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.