{"id":28582143,"url":"https://github.com/ed-flanagan/riot_lor","last_synced_at":"2025-07-23T15:33:28.457Z","repository":{"id":40323385,"uuid":"396691067","full_name":"ed-flanagan/riot_lor","owner":"ed-flanagan","description":"Elixir library to encode/decode Legend of Runterra deck codes","archived":false,"fork":false,"pushed_at":"2024-07-25T14:13:10.000Z","size":100,"stargazers_count":2,"open_issues_count":11,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-14T02:17:52.326Z","etag":null,"topics":["elixir","legends-of-runeterra","lor","riot","riot-games","runeterra"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ed-flanagan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-16T08:13:46.000Z","updated_at":"2024-06-01T16:53:53.000Z","dependencies_parsed_at":"2024-06-01T18:32:49.609Z","dependency_job_id":"42e76afe-4c16-4085-8326-0e8b507d6f25","html_url":"https://github.com/ed-flanagan/riot_lor","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":0.4411764705882353,"last_synced_commit":"3c67b90455f5db774df95ef3cb14c54de9bc45ff"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ed-flanagan/riot_lor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ed-flanagan%2Friot_lor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ed-flanagan%2Friot_lor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ed-flanagan%2Friot_lor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ed-flanagan%2Friot_lor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ed-flanagan","download_url":"https://codeload.github.com/ed-flanagan/riot_lor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ed-flanagan%2Friot_lor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266704231,"owners_count":23971439,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["elixir","legends-of-runeterra","lor","riot","riot-games","runeterra"],"created_at":"2025-06-11T05:00:47.785Z","updated_at":"2025-07-23T15:33:28.428Z","avatar_url":"https://github.com/ed-flanagan.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🃏 Riot LoR deck code library ⚗️\n\n[![Package](https://img.shields.io/hexpm/v/riot_lor?logo=elixir)](https://hex.pm/packages/riot_lor)\n[![Docs](https://img.shields.io/badge/hex-docs-7851a9?logo=elixir)](https://hexdocs.pm/riot_lor)\n[![Test](https://github.com/ed-flanagan/riot_lor/actions/workflows/test.yaml/badge.svg)](https://github.com/ed-flanagan/riot_lor/actions/workflows/test.yaml)\n[![Coverage](https://coveralls.io/repos/github/ed-flanagan/riot_lor/badge.svg?branch=main)](https://coveralls.io/github/ed-flanagan/riot_lor?branch=main)\n\n[Yet another](https://github.com/petter-kaspersen/lor-deck-codes-elixir)\n[Elixir](https://elixir-lang.org/)\nimplementation of\n[Riot](https://www.riotgames.com/en)'s\n[Legends of Runterra](https://playruneterra.com/en-us/)\n[deck code library](https://github.com/RiotGames/LoRDeckCodes).\n\n## Installation\n\nIf [using Hex](https://hex.pm/docs/usage), the package can be installed\nby adding `:riot_lor` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:riot_lor, \"~\u003e 1.1.1\"}\n  ]\nend\n```\n\n## Usage\n\n### Documentation\n\nDocs can be found at\n[https://hexdocs.pm/riot_lor](https://hexdocs.pm/riot_lor).\n\nYou can also read supplemental docs under the `docs/` directory.\n\n### Examples\n\nYou can run the project locally with `iex -S mix`.\nYou may want to\n[configure IEx](https://hexdocs.pm/elixir/1.12/Inspect.Opts.html) to\n* display lists of ints as lists, rather than charlists\n* limit inspect enum length to 4, in case your want to limit large outputs of decks\n\n#### Inspect options\n\n```sh\niex \\\n\t--eval 'IEx.configure(inspect: [limit: 4, charlists: :as_lists])' \\\n\t-S mix\n```\n\n```elixir\niex(1)\u003e IEx.configure(inspect: [limit: 4, charlists: :as_lists])\n:ok\n```\n\n#### Decoding\n\n```elixir\niex(2)\u003e deck_code = \"CEAAECABAQJRWHBIFU2DOOYIAEBAMCIMCINCILJZAICACBANE4VCYBABAILR2HRL\"\n\"CEAAECABAQJRWHBIFU2DOOYIAEBAMCIMCINCILJZAICACBANE4VCYBABAILR2HRL\"\niex(3)\u003e deck = Riot.LoR.DeckCode.decode!(deck_code)\n%{\n  %Riot.LoR.Card{fac: 2, num: 6, set: 1} =\u003e 2,\n  %Riot.LoR.Card{fac: 2, num: 9, ...} =\u003e 2,\n  %Riot.LoR.Card{fac: 2, ...} =\u003e 2,\n  %Riot.LoR.Card{...} =\u003e 2,\n  ...\n}\niex(4)\u003e Riot.LoR.Deck.code_count(deck)\n[{\"01IO006\", 2}, {\"01IO009\", 2}, {\"01IO012\", ...}, {...}, ...]\n```\n\n#### Encoding\n\n```elixir\niex(5)\u003e card_counts = [{\"01DE001\", 1}, {\"05BC198\", 1}]\n[{\"01DE001\", 1}, {\"05BC198\", 1}]\niex(6)\u003e deck = Riot.LoR.Deck.from_card_counts!(card_counts)\n%{\n  %Riot.LoR.Card{fac: 0, num: 1, set: 1} =\u003e 1,\n  %Riot.LoR.Card{fac: 10, num: 198, set: 5} =\u003e 1\n}\niex(7)\u003e Riot.LoR.DeckCode.encode!(deck)\n\"CQAAAAQBAEAACAIFBLDAC\"\n```\n\n## Contributing\n\nSee the `CONTRIBUTING.md` file.\n\n## Legal\n\nLicensed under the MIT License. See the LICENSE file for more details.\n\nPer [Riot's Core Policies](https://developer.riotgames.com/policies/general#_core-policies):\n\nThe `riot_lor` project isn't endorsed by Riot Games and doesn't reflect the\nviews or opinions of Riot Games or anyone officially involved in producing or\nmanaging Riot Games properties. Riot Games, and all associated properties are\ntrademarks or registered trademarks of Riot Games, Inc.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fed-flanagan%2Friot_lor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fed-flanagan%2Friot_lor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fed-flanagan%2Friot_lor/lists"}