{"id":15445353,"url":"https://github.com/bgmp/minecraft-data","last_synced_at":"2025-04-19T20:42:23.430Z","repository":{"id":56883776,"uuid":"262212006","full_name":"BGMP/minecraft-data","owner":"BGMP","description":"Gem to gather different pieces of information related to Minecraft player profiles","archived":false,"fork":false,"pushed_at":"2020-08-05T20:47:22.000Z","size":54,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T03:30:50.484Z","etag":null,"topics":["gem","minecraft","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/minecraft-data","language":"Ruby","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/BGMP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-05-08T02:53:06.000Z","updated_at":"2022-11-10T18:49:07.000Z","dependencies_parsed_at":"2022-08-20T23:40:26.535Z","dependency_job_id":null,"html_url":"https://github.com/BGMP/minecraft-data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2Fminecraft-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2Fminecraft-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2Fminecraft-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2Fminecraft-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BGMP","download_url":"https://codeload.github.com/BGMP/minecraft-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249795202,"owners_count":21326777,"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":["gem","minecraft","ruby"],"created_at":"2024-10-01T19:44:44.392Z","updated_at":"2025-04-19T20:42:23.407Z","avatar_url":"https://github.com/BGMP.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft::Data\n\nMinecraft Data is a dead simple ruby gem to gather different pieces of information related to Minecraft player profiles.\n\nServices used:\n  * https://github.com/Electroid/mojang-api - API.\n    * https://api.ashcon.app/mojang/v2/user/BGMP\n    * https://api.ashcon.app/mojang/v2/avatar/BGMP\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'minecraft-data', '~\u003e 0.2.0'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install minecraft-data\n\n## Usage\n\n#### `.username_to_uuid()` `.uuid_to_username()`\n\nRetrieve the username of a given player uuid and vice versa.\n\n```ruby\nMinecraft::Data.username_to_uuid('Notch')\nMinecraft::Data.uuid_to_username('069a79f4-44e9-4726-a5be-fca90e38aaf5')\n```\n\nOutput:\n```\n069a79f4-44e9-4726-a5be-fca90e38aaf5\nNotch\n```\n\n#### `.name_history_of_username()` `.name_history_of_uuid()`\n\nRetrieve the name history of a player by it's uuid or username.\n\n```ruby\nMinecraft::Data.name_history_of_uuid('2cef6d05-ec9a-44b3-bedc-53359c68ae65')\n```\n\nOutput:\n```\n{\"username\"=\u003e\"banja13\"}\n{\"username\"=\u003e\"LeWizard23\", \"changed_at\"=\u003e\"2015-05-01T02:27:06.000Z\"}\n{\"username\"=\u003e\"BGMP00\", \"changed_at\"=\u003e\"2015-06-09T19:40:49.000Z\"}\n{\"username\"=\u003e\"BGMP\", \"changed_at\"=\u003e\"2017-10-08T20:11:36.000Z\"}\n```\n\n#### `.head_url_of_uuid()` `.head_url_of_username()`\n\nRetrieves a link pointing to an image of the given user's skin head. `true` or `false` depending on whether you want the skin's overlay to be present or not.\n\n```ruby\nMinecraft::Data.head_url_of_uuid('2cef6d05-ec9a-44b3-bedc-53359c68ae65')\nMinecraft::Data.head_url_of_username('BGMP')\n```\n\nOutput:\n```\nhttps://api.ashcon.app/mojang/v2/avatar/2cef6d05-ec9a-44b3-bedc-53359c68ae65\nhttps://api.ashcon.app/mojang/v2/avatar/BGMP\n```\n\n#### `normalize_uuid(uuid)`\n\nNormalises a trimmed uuid.\n\n```ruby\nMinecraft::Data.head_url_of_uuid('2cef6d05ec9a44b3bedc53359c68ae65')\n```\n\nOutput:\n```\n2cef6d05-ec9a-44b3-bedc-53359c68ae65\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports are welcome on GitHub at this repo's [issues tab](https://github.com/BGMP/minecraft-data/issues). This project is intended to be a safe, welcoming space for collaboration, thus I'm absolutely open to any changes to be submitted through a pull request [here](https://github.com/BGMP/minecraft-data/pulls)!\n\n## Licence\n\nThe gem is available as open source under the terms of the [MIT Licence](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgmp%2Fminecraft-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgmp%2Fminecraft-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgmp%2Fminecraft-data/lists"}