{"id":27918142,"url":"https://github.com/misterjimson/artifactdeckcodedotnet","last_synced_at":"2025-05-06T18:19:20.326Z","repository":{"id":33271469,"uuid":"156937187","full_name":"MisterJimson/ArtifactDeckCodeDotNet","owner":"MisterJimson","description":"A C# port of ArtifactDeckCode","archived":false,"fork":false,"pushed_at":"2022-12-08T09:00:29.000Z","size":36,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T18:19:11.475Z","etag":null,"topics":["artifact","artifactdeckcode","csharp","deckcode","dota2"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MisterJimson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-10T01:42:10.000Z","updated_at":"2025-02-24T02:56:40.000Z","dependencies_parsed_at":"2023-01-15T00:15:34.964Z","dependency_job_id":null,"html_url":"https://github.com/MisterJimson/ArtifactDeckCodeDotNet","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterJimson%2FArtifactDeckCodeDotNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterJimson%2FArtifactDeckCodeDotNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterJimson%2FArtifactDeckCodeDotNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterJimson%2FArtifactDeckCodeDotNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MisterJimson","download_url":"https://codeload.github.com/MisterJimson/ArtifactDeckCodeDotNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741484,"owners_count":21797030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artifact","artifactdeckcode","csharp","deckcode","dota2"],"created_at":"2025-05-06T18:19:19.406Z","updated_at":"2025-05-06T18:19:20.318Z","avatar_url":"https://github.com/MisterJimson.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArtifactDeckCodeDotNet [![NuGet](https://buildstats.info/nuget/ArtifactDeckCodeDotNet)](https://www.nuget.org/packages/ArtifactDeckCodeDotNet)\nA C# port of [ArtifactDeckCode](https://github.com/ValveSoftware/ArtifactDeckCode)\n\nRefer to that page for more detailed information on Artifact Deck Codes.\n## Documentation\n### Decoder\nParseDeck returns a Deck object with contains a list of Heroes(ids and turn numbers), Cards(ids and count), and the deck Name.\n```csharp\nDeck deck = ArtifactDeckDecoder.ParseDeck(\"ADCJWkTZX05uwGDCRV4XQGy3QGLmqUBg4GQJgGLGgO7AaABR3JlZW4vQmxhY2sgRXhhbXBsZQ__\");\nConsole.WriteLine(deck.Name); // outputs \"Green/Black Example\"\n```\n### Encoder\nEncodeDeck returns a string. This string is the ArtifactDeckCode.\n```csharp\nDeck deck = new Deck();\ndeck.Name = \"my sweet deck\";\ndeck.Heroes = new List\u003cHero\u003e();\ndeck.Cards = new List\u003cCard\u003e();\ndeck.Heroes.Add(new Hero { Id = 4005, Turn = 1 });\ndeck.Heroes.Add(new Hero { Id = 10014, Turn = 1 });\ndeck.Cards.Add(new Card { Id = 3001, Count = 1 });\ndeck.Cards.Add(new Card { Id = 10165, Count = 3 });\n\n...\n\nstring deckCode = ArtifactDeckEncoder.EncodeDeck(deck);\nConsole.WriteLine(deckCode); // outputs URL safe deck code string\n```\n### CardSetApiClient\nThe CardSetApiClient allows you to request details on all cards in Artifact by set id. Currently 0 and 1 are the only valid set ids.\n```csharp\nusing(var apiClient = new CardSetApiClient())\n{\n    CardSet cardSet = await client.GetCardSetAsync(0);\n\n    Console.WriteLine(cardSet.Version); //outputs \"1\"\n    Console.WriteLine(cardSet.SetInfo.Name.English); //outputs \"Base Set\"\n    Console.WriteLine(string.Join(\", \", cardSet.CardList\n      .Skip(15)\n      .Take(3)\n      .Select(x =\u003e x.CardName.English))); //outputs \"Town Portal Scroll, Fahrvhan the Dreamer, Pack Leadership\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisterjimson%2Fartifactdeckcodedotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisterjimson%2Fartifactdeckcodedotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisterjimson%2Fartifactdeckcodedotnet/lists"}