api.brand

get()

api.brand.get(id) → Promise<Brand>

单个完整品牌,以可修改的 Brand 对象返回。

GET /api/brand/:idfree
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const brand = await api.brand.get(id);
console.log(brand.name, brand.logos.main?.url, brand.palette.role("primary"));
brand = api.brand.get(brand_id)
print(brand.name, brand.logos.main and brand.logos.main["url"], brand.palette.role("primary"))

其他账户的品牌会返回 brand_not_found,与未知 ID 完全相同。