MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / apiV1GetAudio

Function apiV1GetAudio

internal/web/api_v1_audio.go:18–27  ·  view source on GitHub ↗

GET /admin/api/v1/audio

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

16
17// GET /admin/api/v1/audio
18func apiV1GetAudio(w http.ResponseWriter, r *http.Request) {
19 writeJSON(w, http.StatusOK, APIResponse[audioAPIResponse]{
20 Success: true,
21 Data: audioAPIResponse{
22 Sounds: audio.GetAllAudio(),
23 Music: audio.GetMusicFiles(),
24 SoundFiles: audio.GetSoundFiles(),
25 },
26 })
27}
28
29// POST /admin/api/v1/audio
30// Body: {"identifier": "my-sound", "description": "...", "filepath": "...", "volume": 80, "tags": ["combat"]}

Callers

nothing calls this directly

Calls 4

GetAllAudioFunction · 0.92
GetMusicFilesFunction · 0.92
GetSoundFilesFunction · 0.92
writeJSONFunction · 0.85

Tested by

no test coverage detected