Skip to content

Add TrustedParts.com (ECIA) info provider - #1519

Merged
jbtronics merged 1 commit into
Part-DB:masterfrom
killecaptron:add-trustedparts-provider
Sep 6, 2026
Merged

Add TrustedParts.com (ECIA) info provider#1519
jbtronics merged 1 commit into
Part-DB:masterfrom
killecaptron:add-trustedparts-provider

Conversation

@killecaptron

@killecaptron killecaptron commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

TrustedParts.com is a part search engine operated by the Electronic Components Industry Association, which aggregates stock, prices and specifications of authorized distributors. Its Inventory API is free to use, but requires an approved account (company ID + API key).

The API has no part IDs, parts are always identified by their part number, so the provider IDs are built as "manufacturer|mpn". A single search already returns all offers and specifications, therefore the results are cached and reused for the detail view.

As the API can search up to 50 part numbers in a single request, the provider also implements BatchInfoProviderInterface for the bulk import.

Requests are sent with a user agent identifying Part-DB and the current user ID, as required by the API terms of use for non-website applications.

The datasheet links of this provider are redirect URLs without a file extension, which uncovered a separate problem in Attachment::isPicture() (broken preview images). That is fixed in #1520, independently of this PR.

TrustedParts.com is a part search engine operated by the Electronic
Components Industry Association, which aggregates stock, prices and
specifications of authorized distributors. Its Inventory API is free to
use, but requires an approved account (company ID + API key).

The API has no part IDs, parts are always identified by their part
number, so the provider IDs are built as "manufacturer|mpn". A single
search already returns all offers and specifications, therefore the
results are cached and reused for the detail view.

As the API can search up to 50 part numbers in a single request, the
provider also implements BatchInfoProviderInterface for the bulk import.

Requests are sent with a user agent identifying Part-DB and the current
user ID, as required by the API terms of use for non-website
applications.
@jbtronics

Copy link
Copy Markdown
Member

Due to a lack of an API key i could not test it, but I assume you did.

And from the pure codebase it looks fine.

Thank you very much for the PR.

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.92308% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.02%. Comparing base (0e1a932) to head (09e6330).
⚠️ Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
...oProviderSystem/Providers/TrustedPartsProvider.php 96.92% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1519      +/-   ##
============================================
+ Coverage     61.82%   62.02%   +0.19%     
- Complexity     9728     9790      +62     
============================================
  Files           724      725       +1     
  Lines         31302    31497     +195     
============================================
+ Hits          19353    19536     +183     
- Misses        11949    11961      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jbtronics
jbtronics merged commit 9ece64b into Part-DB:master Sep 6, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants