View Issue Details

IDProjectCategoryView StatusLast Update
0005044unrealdocumentationpublic2018-06-15 08:29
Reportersyzop Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0005044: Serve active downloads JSON
DescriptionNot an UnrealIRCd bug/feature but for the website:

It's probably a good idea to serve a file showing the current release and available downloads, along with their URL.
Suggested by Gottem (sortof :D)
TagsNo tags attached.
3rd party modules

Activities

syzop

2017-12-30 11:09

administrator   ~0020006

For each version:
* version
* download link for *NIX
* download link for Windows
* type: "stable" or "release candidate"

syzop

2018-06-15 08:12

administrator   ~0020155

Done, URL is https://www.unrealircd.org/downloads/list.json

Style is branch [ version [ downloads [ ] ] ]

Example of current output:

{
  "4.0": {
    "4.0.17": {
      "type": "Stable",
      "version": "4.0.17",
      "downloads": {
        "src": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.17.tar.gz",
        "winssl": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.17.exe"
      }
    },
    "4.0.18-rc1": {
      "type": "Release Candidate",
      "version": "4.0.18-rc1",
      "downloads": {
        "src": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.18-rc1.tar.gz",
        "winssl": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.18-rc1.exe"
      }
    }
  }
}

Just use json_decode() or similar and you get a nice array.

syzop

2018-06-15 08:29

administrator   ~0020156

Update. Changed nesting naming/style so you can use something like $arr["4.0"]["Stable"]["src"] without having to walk through the array:

{
  "4.0": {
    "Stable": {
      "type": "Stable",
      "version": "4.0.17",
      "downloads": {
        "src": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.17.tar.gz",
        "winssl": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.17.exe"
      }
    },
    "Release Candidate": {
      "type": "Release Candidate",
      "version": "4.0.18-rc1",
      "downloads": {
        "src": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.18-rc1.tar.gz",
        "winssl": "https:\/\/www.unrealircd.org\/downloads\/unrealircd-4.0.18-rc1.exe"
      }
    }
  }
}

Issue History

Date Modified Username Field Change
2017-12-30 11:07 syzop New Issue
2017-12-30 11:09 syzop Note Added: 0020006
2018-06-15 08:12 syzop Assigned To => syzop
2018-06-15 08:12 syzop Status new => closed
2018-06-15 08:12 syzop Resolution open => fixed
2018-06-15 08:12 syzop Note Added: 0020155
2018-06-15 08:29 syzop Note Added: 0020156