• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

blockexchange / blockexchange / 13110168475

03 Feb 2025 09:18AM UTC coverage: 48.213% (+0.6%) from 47.564%
13110168475

push

github

BuckarooBanzay
http/json overhaul

51 of 102 new or added lines in 14 files covered. (50.0%)

1 existing line in 1 file now uncovered.

985 of 2043 relevant lines covered (48.21%)

1734.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
/api/media.lua
1
---------
2
-- media api calls
3

4
local http, url = ...
1✔
5

6
--- creates a new mod
7
-- @param token the token in string format
8
-- @param mod the mod to create
9
-- @return a promise with the result
10
function blockexchange.api.create_media_mod(token, mod)
2✔
NEW
11
    return Promise.json(http, url .. "/api/media/mod/" .. mod.name, {
×
12
        method = "POST",
13
        data = mod,
14
        headers = { "Authorization: " .. token }
×
15
    })
16
end
17

18
--- creates or updates nodedefs
19
-- @param token the token in string format
20
-- @param nodedefs the nodedefs to create
21
-- @return a promise with the result
22
function blockexchange.api.create_media_nodedefs(token, nodedefs)
2✔
NEW
23
    return Promise.json(http, url .. "/api/media/nodedef", {
×
24
        method = "POST",
25
        data = nodedefs,
26
        headers = { "Authorization: " .. token }
×
27
    })
28
end
29

30
--- creates or updates mediafiles
31
-- @param token the token in string format
32
-- @param mediafiles the mediafiles to create
33
-- @return a promise with the result
34
function blockexchange.api.create_media_mediafiles(token, mediafiles)
2✔
NEW
35
    return Promise.json(http, url .. "/api/media/mediafile", {
×
36
        method = "POST",
37
        data = mediafiles,
38
        headers = { "Authorization: " .. token }
×
39
    })
40
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc