เริ่มต้นอย่างรวดเร็ว
เริ่มต้นใน 5 นาที
ทุกสิ่งที่คุณต้องการในการรวม Source Parts API เข้ากับแอปพลิเคชันของคุณ
Get up and running in 4 simple steps
1
Install the SDK
Choose your preferred package manager to install our TypeScript SDK
npm install @sourceparts/sdk2
Configure your API key
Set up authentication to connect with Source Parts API
Add your API key to your .env file:
SOURCEPARTS_API_KEY=your_api_key_hereGet your API key from the API Dashboard
3
Initialize the client
Create a client instance with your configuration
import { SourceParts } from '@sourceparts/sdk';
const client = new SourceParts({
apiKey: process.env.SOURCEPARTS_API_KEY,
environment: 'production'
});4
Make your first request
Search for components and get real-time pricing data
// Search for components
const results = await client.components.search({
query: 'ESP32',
limit: 10,
filters: {
inStock: true,
category: 'microcontrollers'
}
});
console.log(`Found ${results.total} components`);
results.items.forEach(component => {
console.log(`${component.name}: ${component.price}`);
});ขั้นตอนถัดไปคืออะไร?
สำรวจ API
ศึกษาเอกสาร API ที่ครอบคลุมของเราอย่างลึกซึ้ง
ดูเอกสาร APIตัวอย่างโค้ด
เรียกดูตัวอย่างและรูปแบบการรวมในโลกแห่งความเป็นจริง
ดูตัวอย่างรับการสนับสนุน
ทีมวิศวกรรมของเราพร้อมช่วยให้คุณประสบความสำเร็จ
ติดต่อฝ่ายสนับสนุน