http_post_data -> export_url

This commit is contained in:
Jean-Patrick Guerrero 2019-11-01 02:04:35 +01:00
parent 70d38d1c63
commit 4241c89c17
2 changed files with 3 additions and 3 deletions

2
API.md
View File

@ -204,7 +204,7 @@ You can add a stereotype like so:
craftguide.group_stereotypes.radioactive = "mod:item"
```
#### `craftguide.http_post_data`
#### `craftguide.export_url`
If set, the mod will export all the cached recipes and usages in a JSON format
to the given URL (HTTP support is required¹).

View File

@ -1438,7 +1438,7 @@ local function get_init_items()
handle_aliases(hash)
sort(init_items)
if http and true_str(craftguide.http_post_data) then
if http and true_str(craftguide.export_url) then
local post_data = {
recipes = recipes_cache,
usages = usages_cache,
@ -1446,7 +1446,7 @@ local function get_init_items()
}
http.fetch_async({
url = craftguide.http_post_data,
url = craftguide.export_url,
post_data = write_json(post_data),
})
end