Project maintained by JoshLmao Hosted on GitHub Pages — Theme by mattgraham

Quick Navigate:

Artifact Client

Below lists all methods. Please note, only the synchronous methods are listed below. Async methods will do exactly the same (but asynchronous)

GetAllCards()

Used to get all cards currently available in Artifact

Returns: List<Card> cards
A list of cards

//Get all cards from the API
List<Card> allCards = client.GetAllCards();

GetCardSet(string cardSetId)

Gets a specific set of cards from the API. Currently only supports the codes “00” & “01”

Returns: CardSet cardSet
The card set object which contains all cards of the set, version & set info
Can return null

//Get the 1st set of cards from the API
CardSet cardSet = client.GetCardSet("00");

GetCard(int cardId)

Gets a specific card by it’s Id

Returns: Card card
The required card with stats, art work urls, etc
Can return null

//Get the Ventriloquy card from it's id
CardSet cardSet = client.GetCard(10418);

GetCard(string cardName)

Gets a specific card by it’s name. Casing is ignored by this method, just in case

Returns: Card cardSet
The card set object which contains all cards of the set, version & set info
Can return null

//Get the Ventriloquy card from it's name
CardSet cardSet = client.GetCard("venTRIiloquy");

GetCardsFromDecodedDeck(DecodedDeck decodedDeck)

Converts the DecodedDeck object to a Deck object with all card details

Returns: Deck deck
The Deck object with all card details and info
Can return null

//Decodes the deck code and get's the deck with info, card art and stats
DecodedDeck decodedDeck = client.DecodeDeck("ADCJQUQI30zuwEYg2ABeF1Bu94BmWIBTEkLtAKlAZakAYmHh0JsdWUvUmVkIEV4YW1wbGU_");
Deck deck = client.GetCard(decodedDeck);

GetCardArtUrl(int cardId, ArtType artType, Language language = Language.English)

Gets the wanted url of the type of card art from the card id, including the correct language

Returns: string url
The url of the card art
Can return null or the English version of the card it hasn’t been translated

// Gets the Simplified Chinese card art for Ventriloquy card from it's id
string artUrl = client.GetCardArtUrl(10418, ArtType.Large, Language.ChineseSimplified);

GetCardArtUrl(string cardName, ArtType artType, Language language = Language.English)

Gets the wanted url of the type of card art from the card name, including the correct language

Returns: string url
The url of the card art
Can return null or the English version of the card it hasn’t been translated

// Gets the Simplified Chinese card art for Ventriloquy card from it's name
string artUrl = client.GetCardArtUrl("Ventriloquy", ArtType.Large, Language.ChineseSimplified);

Encoding

EncodeDeck(DecodedDeck decodedDeck)

Encodes a deck from a built DecodedDeck object.

Returns: _string encodedDeckString The encoded string of the deck. Can be viewed on playartifact.com/d/{encodedDeckString} Can return null

//Create a new DecodedDeck, populate and encode it
DecodedDeck decodedDeck = new DecodedDeck();
/* Populate decodedDeck with card id's and amounts/turns */
string encodedString = client.EncodeDeck(decodedDeck);

EncodeDeck(Deck deck)

Encodes a deck from a manually built Deck object

Returns: string encodedDeckString
The encoded string of the deck. Can be viewed on playartifact.com/d/{encodedDeckString}
Can return null

//Create a new deck, populate and encode it
Deck myDeck = new Deck();
/* Populate Deck object with cards */
string encodedString = client.EncodeDeck(myDeck);

Decoding

DecodeDeck(string encodedDeckString)

Decodes a deck from an encoded string.

Returns: DecodedDeck decodedDeck
The DecodeDeck object containing deck name, all cards & items
Can return null

//Create a new deck, populate and encode it
string encodedDeckCode = "ADCJQUQI30zuwEYg2ABeF1Bu94BmWIBTEkLtAKlAZakAYmHh0JsdWUvUmVkIEV4YW1wbGU_";
DecodedDeck decodedDeck = client.DecodeDeck(encodedDeckCode);

back