ትክክለኛውን የክፍል ውል ያግኙ
ክፍል ያግኙ። ትክክለኛ API-ውን ያንብቡ።
የሕዝብ ካታሎግ፣ የተዋቀረ API መረጃ ጠቋሚ፣ የተከፋፈሉ ማጣቀሻዎችና MCP ፍለጋ የክፍል ባህሪዎችን፣ ክስተቶችን፣ ስሎቶችን፣ ጥገኝነቶችንና የሽግግር መመሪያን ያሳያሉ። ወኪሎች ምልክት ከመጻፋቸው በፊት ጠባብ ውል ይመረምራሉ።
ምሳሌ
ክፍል ይፈልጉ፣ ከዚያም ትክክለኛውን API ያንብቡ።
const origin = 'https://www.lyra-ui.com/api/v1/components';
const search = await fetch(origin + '/search?q=combobox');
if (!search.ok) throw new Error('Component search failed');
const { matches } = await search.json();
const tag = matches[0]?.tag;
if (tag) {
const response = await fetch(origin + '/' + encodeURIComponent(tag));
if (!response.ok) throw new Error('Component reference failed');
const reference = await response.json();
console.log(reference.markdown);
}