fix plugin http types & docs (#5494)

This commit is contained in:
2547techno
2024-07-05 20:02:21 -04:00
committed by GitHub
parent 0442b7a81b
commit 93fbcbbe5f
5 changed files with 25 additions and 45 deletions
+19 -24
View File
@@ -158,12 +158,27 @@ function c2.Channel.by_twitch_id(id) end
-- End src/controllers/plugins/api/ChannelRef.hpp
-- Begin src/controllers/plugins/api/HTTPRequest.hpp
-- Begin src/controllers/plugins/api/HTTPResponse.hpp
---@class HTTPResponse
---@field data string Data received from the server
---@field status integer? HTTP Status code returned by the server
---@field error string A somewhat human readable description of an error if such happened
HTTPResponse = {}
--- Returns the data. This is not guaranteed to be encoded using any
--- particular encoding scheme. It's just the bytes the server returned.
---
function HTTPResponse:data() end
--- Returns the status code.
---
function HTTPResponse:status() end
--- A somewhat human readable description of an error if such happened
---
function HTTPResponse:error() end
-- End src/controllers/plugins/api/HTTPResponse.hpp
-- Begin src/controllers/plugins/api/HTTPRequest.hpp
---@alias HTTPCallback fun(result: HTTPResponse): nil
---@class HTTPRequest
@@ -213,26 +228,6 @@ function HTTPRequest.create(method, url) end
-- End src/controllers/plugins/api/HTTPRequest.hpp
-- Begin src/controllers/plugins/api/HTTPResponse.hpp
---@class HTTPResponse
HTTPResponse = {}
--- Returns the data. This is not guaranteed to be encoded using any
--- particular encoding scheme. It's just the bytes the server returned.
---
function HTTPResponse:data() end
--- Returns the status code.
---
function HTTPResponse:status() end
--- A somewhat human readable description of an error if such happened
---
function HTTPResponse:error() end
-- End src/controllers/plugins/api/HTTPResponse.hpp
-- Begin src/common/network/NetworkCommon.hpp
---@alias HTTPMethod integer