local LuoyeCloud = {}
LuoyeCloud.API_KEY = "your_api_key_here"
LuoyeCloud.BASE_URL = "https://www.luoyekj.top/api/"
function LuoyeCloud:upload(data, filename)
local url = self.BASE_URL .. "upload"
local headers = {
["Authorization"] = "Bearer " .. self.API_KEY
}
return http.post(url, data, headers)
end
import requests
class LuoyeCloud:
API_KEY = "your_api_key_here"
BASE_URL = "https://www.luoyekj.top/api/"
def upload(self, data, filename):
url = f"{self.BASE_URL}upload"
headers = {"Authorization": f"Bearer {self.API_KEY}"}
return requests.post(url, headers=headers, data=data)
class LuoyeCloud {
constructor() {
this.API_KEY = 'your_api_key_here';
this.BASE_URL = 'https://www.luoyekj.top/api/';
}
async upload(data, filename) {
const url = this.BASE_URL + 'upload';
return fetch(url, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + this.API_KEY
},
body: data
});
}
}