技能 API
技能評價
獲取並提交對市場技能的用戶評價。
GET
/
api
/
v1
/
skills
/
{id}
/
reviews
技能評價
curl --request GET \
--url https://api.example.com/api/v1/skills/{id}/reviews \
--header 'Content-Type: application/json' \
--data '
{
"rating": 123,
"body": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/skills/{id}/reviews"
payload = {
"rating": 123,
"body": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({rating: 123, body: JSON.stringify('<string>')})
};
fetch('https://api.example.com/api/v1/skills/{id}/reviews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/skills/{id}/reviews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'rating' => 123,
'body' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/skills/{id}/reviews"
payload := strings.NewReader("{\n \"rating\": 123,\n \"body\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/skills/{id}/reviews")
.header("Content-Type", "application/json")
.body("{\n \"rating\": 123,\n \"body\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/skills/{id}/reviews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rating\": 123,\n \"body\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body獲取某個技能的用戶評價,或提交你自己的評分。
返回一個評價對象數組,包含
身份驗證
需要 Bearer 令牌。參見身份驗證。路徑參數
string
必填
該技能的 UUID。
獲取評價列表(GET)
curl https://www.hitheo.ai/api/v1/skills/skill_abc123/reviews \
-H "Authorization: Bearer $THEO_API_KEY"
rating(1–5)、body、authorUserId 和 createdAt。
提交評價(POST)
integer
必填
評分,範圍 1 到 5。
string
評價內容(最多 2,000 字符)。
curl -X POST https://www.hitheo.ai/api/v1/skills/skill_abc123/reviews \
-H "Authorization: Bearer $THEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rating": 5, "body": "Great skill, saves hours of work!"}'
端點
GET /api/v1/skills/{id}/reviews
需要通過 Bearer 令牌進行身份驗證。參見身份驗證。這個頁面有幫助嗎?
技能評價
curl --request GET \
--url https://api.example.com/api/v1/skills/{id}/reviews \
--header 'Content-Type: application/json' \
--data '
{
"rating": 123,
"body": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/skills/{id}/reviews"
payload = {
"rating": 123,
"body": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({rating: 123, body: JSON.stringify('<string>')})
};
fetch('https://api.example.com/api/v1/skills/{id}/reviews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/skills/{id}/reviews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'rating' => 123,
'body' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/skills/{id}/reviews"
payload := strings.NewReader("{\n \"rating\": 123,\n \"body\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/skills/{id}/reviews")
.header("Content-Type", "application/json")
.body("{\n \"rating\": 123,\n \"body\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/skills/{id}/reviews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rating\": 123,\n \"body\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body