Ihumkpụrụedemede
Identifikaa ihumkpụrụedemede site n'ihe oyiyi ma ọ bụ inyogo, nke ejikọtara ya na laịibrọ̀fọ́ọ̀ltụ̀ nke ihumkpụrụedemede ọbụla. Ọbụla maka ndị mmadụ na saịtị a - API a bụ maka ọrụ program na mbubata.
Ebemkpofuozi
POST https://fonts.free/api/identify/
Móòdù abụọ. Ziga nzaghachi wizard dịka JSON, mọọbụ inyogo dịka data fọọmu nke akụkụ dịgasị iche iche. Tinye?top=N (1-48) ka ehazi ọnụọgụgụ n'ótùo
1. Site n'ihe oyiyi
curl -X POST "https://fonts.free/api/identify/?top=8" \
-H "Content-Type: application/json" \
-d '{"answers": {"serif": ["none"], "contrast": ["low"], "a": ["double"]}}'
2. Site n'ịnyogo (beta)
curl -X POST "https://fonts.free/api/identify/" \
-F "image=@sample.png"
Python
import requests
H = {"X-Api-Key": "your_key"}
# by traits
r = requests.post("https://fonts.free/api/identify/?top=8", headers=H,
json={"answers": {"serif": ["none"], "contrast": ["low"]}})
# from an image
r = requests.post("https://fonts.free/api/identify/", headers=H,
files={"image": open("sample.png", "rb")})
for m in r.json()["matches"]:
print(m["family"], m["score"], m["url"])
Ndesịta ozi ahụ
{
"ok": true,
"mode": "wizard",
"matches": [
{"slug": "roboto", "family": "Roboto",
"url": "https://fonts.free/fonts/roboto/",
"css": "…", "score": 3}
]
}
Nkwenye na nkwụsị
N'enweghị kii, ebemkpofuozi ahụ na-arụ ọrụ mana ọ bụ nke na-egbochi ọnụọgụgụ IP - mma maka ịtụle ya. Kii na-ebuli oke gị n'ebemkpofuozi ọnwa. Ziga ya dịka isiokwu mọọbụ ajụjụ parameter:
-H "X-Api-Key: your_key" # or ?key=your_key
Nhazi
Enweghị kii achọrọ maka ojiji n'okporo ụzọ. Ọ bara uru maka prototypes na nsomebefaịlụ nke obere ụda.
Maka usoroiheomume mmepe na nghọta báà. Nhazi n'ihe n'ihu.
High-throughput mọọbụ n'imewe ojiji. Nhazi n'ihe n'ihu.
Free tier chọrọ kii ọbụla - kpọọ n'oge ahụ, ọ bụ nke na-egbochi ọnụọgụgụ n'ime IP. Tinye na ibe nke n'ime maka kii na квота ọnwa dị elu. Ọdịiche ọbụla API na-eziga bụ nke ọbụla, oghe-laịsịensị ihumkpụrụedemede, yabụ ọ dịghị ihe ọbụla iji laịsị downstream.