Loading...
Loading...
Compare original and translation side by side
https://assets.picaos.com/logos/{platform}.svghttps://assets.picaos.com/logos/gmail.svghttps://assets.picaos.com/logos/slack.svghttps://assets.picaos.com/logos/hubspot.svghttps://assets.picaos.com/logos/{platform}.svghttps://assets.picaos.com/logos/gmail.svghttps://assets.picaos.com/logos/slack.svghttps://assets.picaos.com/logos/hubspot.svg| Integration | Platform ID | Asset URL |
|---|---|---|
| Gmail | | |
| Google Calendar | | |
| Slack | | |
| HubSpot | | |
| Salesforce | | |
| Notion | | |
| Linear | | |
| GitHub | | |
| Jira | | |
| Asana | | |
| Stripe | | |
| Shopify | | |
| Zendesk | | |
| Intercom | | |
| Airtable | | |
| 集成工具 | 平台ID | 资源URL |
|---|---|---|
| Gmail | | |
| Google Calendar | | |
| Slack | | |
| HubSpot | | |
| Salesforce | | |
| Notion | | |
| Linear | | |
| GitHub | | |
| Jira | | |
| Asana | | |
| Stripe | | |
| Shopify | | |
| Zendesk | | |
| Intercom | | |
| Airtable | | |
GET https://api.picaos.com/v1/available-connectors?limit=300
Headers:
x-pica-secret: YOUR_PICA_SECRET_KEYGET https://api.picaos.com/v1/available-connectors?limit=300
Headers:
x-pica-secret: YOUR_PICA_SECRET_KEY{
"rows": [
{
"platform": "gmail",
"name": "Gmail",
"category": "Communication",
"image": "https://assets.picaos.com/logos/gmail.svg",
"description": "..."
},
{
"platform": "slack",
"name": "Slack",
"category": "Communication",
"image": "https://assets.picaos.com/logos/slack.svg",
"description": "..."
}
],
"total": 200,
"pages": 1,
"page": 1
}{
"rows": [
{
"platform": "gmail",
"name": "Gmail",
"category": "Communication",
"image": "https://assets.picaos.com/logos/gmail.svg",
"description": "..."
},
{
"platform": "slack",
"name": "Slack",
"category": "Communication",
"image": "https://assets.picaos.com/logos/slack.svg",
"description": "..."
}
],
"total": 200,
"pages": 1,
"page": 1
}| Field | Description |
|---|---|
| Platform identifier (use for constructing URLs) |
| Display name |
| Official logo URL |
| Integration category |
| 字段 | 描述 |
|---|---|
| 平台标识符(用于构造URL) |
| 显示名称 |
| 官方Logo URL |
| 集成工具分类 |
interface Integration {
platform: string;
name: string;
image: string;
category: string;
}
async function getIntegrations(): Promise<Integration[]> {
const response = await fetch(
"https://api.picaos.com/v1/available-connectors?limit=300",
{
headers: {
"x-pica-secret": process.env.PICA_SECRET_KEY,
},
}
);
if (!response.ok) {
throw new Error(`Failed to fetch integrations: ${response.status}`);
}
const data = await response.json();
return data.rows;
}interface Integration {
platform: string;
name: string;
image: string;
category: string;
}
async function getIntegrations(): Promise<Integration[]> {
const response = await fetch(
"https://api.picaos.com/v1/available-connectors?limit=300",
{
headers: {
"x-pica-secret": process.env.PICA_SECRET_KEY,
},
}
);
if (!response.ok) {
throw new Error(`Failed to fetch integrations: ${response.status}`);
}
const data = await response.json();
return data.rows;
}function getIntegrationLogo(platform: string): string {
return `https://assets.picaos.com/logos/${platform}.svg`;
}
// Usage
const gmailLogo = getIntegrationLogo("gmail");
// => "https://assets.picaos.com/logos/gmail.svg"function getIntegrationLogo(platform: string): string {
return `https://assets.picaos.com/logos/${platform}.svg`;
}
// 使用示例
const gmailLogo = getIntegrationLogo("gmail");
// => "https://assets.picaos.com/logos/gmail.svg"function IntegrationCard({ integration }) {
const [imgError, setImgError] = useState(false);
return (
<div className="integration-card">
{!imgError ? (
<img
src={integration.image}
alt={integration.name}
onError={() => setImgError(true)}
/>
) : (
<div className="fallback-icon">
{integration.name.charAt(0).toUpperCase()}
</div>
)}
<span>{integration.name}</span>
</div>
);
}function IntegrationCard({ integration }) {
const [imgError, setImgError] = useState(false);
return (
<div className="integration-card">
{!imgError ? (
<img
src={integration.image}
alt={integration.name}
onError={() => setImgError(true)}
/>
) : (
<div className="fallback-icon">
{integration.name.charAt(0).toUpperCase()}
</div>
)}
<span>{integration.name}</span>
</div>
);
}function getIntegrationLogo(platform: string, primaryUrl?: string): string {
// Use API-provided URL if available
if (primaryUrl) {
return primaryUrl;
}
// Construct from pattern
return `https://assets.picaos.com/logos/${platform}.svg`;
}
function getFallbackLogo(platform: string): string {
// SimpleIcons as fallback
return `https://cdn.simpleicons.org/${platform}`;
}function getIntegrationLogo(platform: string, primaryUrl?: string): string {
// 如果API提供了URL则使用该地址
if (primaryUrl) {
return primaryUrl;
}
// 按照格式构造URL
return `https://assets.picaos.com/logos/${platform}.svg`;
}
function getFallbackLogo(platform: string): string {
// 使用SimpleIcons作为备用
return `https://cdn.simpleicons.org/${platform}`;
}let cachedIntegrations: Integration[] | null = null;
let cacheTime: number = 0;
const CACHE_DURATION = 60 * 60 * 1000; // 1 hour
async function getIntegrationsCached(): Promise<Integration[]> {
const now = Date.now();
if (cachedIntegrations && now - cacheTime < CACHE_DURATION) {
return cachedIntegrations;
}
cachedIntegrations = await getIntegrations();
cacheTime = now;
return cachedIntegrations;
}let cachedIntegrations: Integration[] | null = null;
let cacheTime: number = 0;
const CACHE_DURATION = 60 * 60 * 1000; // 1小时
async function getIntegrationsCached(): Promise<Integration[]> {
const now = Date.now();
if (cachedIntegrations && now - cacheTime < CACHE_DURATION) {
return cachedIntegrations;
}
cachedIntegrations = await getIntegrations();
cacheTime = now;
return cachedIntegrations;
}GET https://api.picaos.com/v1/available-connectors?authkit=true&limit=300GET https://api.picaos.com/v1/available-connectors?authkit=true&limit=300| Property | Value |
|---|---|
| Format | SVG (scalable) |
| Background | Transparent |
| Recommended display size | 24x24 to 64x64 px |
| Color | Original brand colors |
| 属性 | 值 |
|---|---|
| 格式 | SVG(可缩放) |
| 背景 | 透明 |
| 推荐显示尺寸 | 24x24 至 64x64 px |
| 颜色 | 品牌原始配色 |
| Issue | Cause | Solution |
|---|---|---|
| 404 on asset URL | Invalid platform ID | Verify platform ID from API response |
| Image not loading | CORS or network issue | Use |
| Wrong logo displayed | Platform ID mismatch | Use exact |
| Blurry logo | Scaling PNG | Assets are SVG, ensure proper rendering |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 资源URL返回404 | 平台ID无效 | 从API响应中验证平台ID |
| 图片无法加载 | CORS或网络问题 | 使用 |
| 显示错误的Logo | 平台ID不匹配 | 使用API返回的精确 |
| Logo模糊 | 缩放PNG图片 | 资源为SVG格式,请确保正确渲染 |
| Endpoint | Description |
|---|---|
| List all integrations with assets |
| List OAuth-enabled integrations |
| 端点 | 描述 |
|---|---|
| 列出所有带有资源的集成工具 |
| 列出支持OAuth的集成工具 |
https://assets.picaos.com/logos/{platform}.svg{platform}https://assets.picaos.com/logos/{platform}.svg{platform}