Skip to content

Instantly share code, notes, and snippets.

@PyYoshi
Last active May 9, 2017 02:30
Show Gist options
  • Save PyYoshi/2ef27605dfd1e58b95a73afe5cc1d205 to your computer and use it in GitHub Desktop.
Save PyYoshi/2ef27605dfd1e58b95a73afe5cc1d205 to your computer and use it in GitHub Desktop.
Minecraftのversion_manifest.jsonをjqでパースして最新の情報を取得

Requirements

Shell

$ curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json | jq '.latest.release as $latest | .versions | .[] | select(.type == "release" and .id == $latest)'

Output

{
  "id": "1.11.2",
  "type": "release",
  "time": "2017-04-07T11:44:29+00:00",
  "releaseTime": "2016-12-21T09:29:12+00:00",
  "url": "https://launchermeta.mojang.com/mc/game/12f260fc1976f6dd688a211f1a906f956344abdd/1.11.2.json"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment