{"id":"123marble-rbx/rbxrankdb","name":"rbxrankdb","scope":"123marble-rbx","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.0.8","latest":"0.0.8","versions":["0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":false,"dependencies":{"roblox/testez":{"version":"^0.4.1","alias":"testez"}},"integrity":"bb9cd2d52ccb852b588c0206aff3e7c94ac9195c930c029a1e6bc3fb770a75e9","likes":0,"downloads":0,"install":"forest install 123marble-rbx/rbxrankdb","url":"https://forest.dev/p/roblox/123marble-rbx/rbxrankdb","files":"https://api.forest.dev/ai/package/roblox/123marble-rbx/rbxrankdb/files","readme":"# RBXRankDB\nA wrapper to connect [RankDB server](https://github.com/Vivino/rankdb/tree/master) to your ROBLOX games 🌟!\n\n\n## Why use RBXRankDB?\n\nROBLOX's Ordered Datastore [does not support the retrieval of entries at specific ranks](https://devforum.roblox.com/t/how-to-get-players-rank-in-ordered-datastore-leaderboard/1080297/12?u=123marble) and is therefore not sufficient for use cases that need to maintain and query large persistent leaderboard data. An externally hosted solution such as RankDB is required and RBXRankDB provides a simple way to interface with your RankDB server.\n\n# Usage\nCopy the contents of `src/rbxRankDB` into a module script and require it in your game. Alternatively, [install the package with Wally](https://wally.run/package/123marble-rbx/rbxrankdb). \n```lua\nlocal RankDBClient = require(path.to.rbxRankDB)\nlocal client = RankDBClient.new(\"<url>\", \"<token>\")\nclient:createList(\"TestList\")\nclient:updateElement(\"TestList\", 1, 10, 0, nil) -- listId, elementId, score, prevRank, prevScore\n\n-- returns:\n-- {\n--     id = 1,\n--     prevRank = nil,\n--     newRank = 1,\n--     prevScore = nil,\n--     newScore = 10,\n-- }\n\n```\n\n# Contribute\n## How do I run the unit tests?\nTesting requires Wally, Rojo, and Roblox Studio.\n1. Ensure RankDB server is running\n2. Add secrets.lua to the project root containing the following so that the tests can authenticate:\n```lua\nreturn {\n    url = \"<host_url>\",\n    token = \"<jwt_token>\"\n}\n```\n3. Install packages with `wally install`\n4. Sync `rojo` with `dev.project.json`\n5. Run the Roblox Studio place\n6. Check output window for test status\n","readmeTruncated":false}