جزو جو صحيح معاهدو ڳوليو
جزو ڳوليو. ان جو صحيح API پڙهو.
عوامي فهرست، بناوٽ وارو API انڊيڪس، الڳ حوالا ۽ MCP ڳولا جزو جون خاصيتون، واقعا، slots، انحصار ۽ منتقلي جون هدايتون ڏيکارين ٿا. ڪوڊ ايجنٽ مارڪ اپ لکڻ کان اڳ محدود صحيح معاهدو پڙهي سگهن ٿا.
مثال
ڪو جزو ڳوليو، پوءِ ان جو صحيح 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);
}