mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-02 05:19:35 +00:00
Fixed disable logic and disable hints for info providers
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
This commit is contained in:
parent
a48490ac1a
commit
eaaf44b391
9 changed files with 28 additions and 27 deletions
|
|
@ -246,7 +246,7 @@ class OEMSecretsProvider implements InfoProviderInterface
|
|||
'name' => 'OEMSecrets',
|
||||
'description' => 'This provider uses the OEMSecrets API to search for parts.',
|
||||
'url' => 'https://www.oemsecrets.com/',
|
||||
'disabled_help' => 'Configure the API key in the PROVIDER_OEMSECRETS_KEY environment variable to enable.'
|
||||
'disabled_help' => 'Configure the API key in the provider settings to enable.'
|
||||
];
|
||||
}
|
||||
/**
|
||||
|
|
@ -265,7 +265,7 @@ class OEMSecretsProvider implements InfoProviderInterface
|
|||
*/
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->settings->apiKey !== '';
|
||||
return $this->settings->apiKey !== null && $this->settings->apiKey !== '';
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -285,18 +285,18 @@ class OEMSecretsProvider implements InfoProviderInterface
|
|||
public function searchByKeyword(string $keyword): array
|
||||
{
|
||||
/*
|
||||
oemsecrets Part Search API 3.0.1
|
||||
oemsecrets Part Search API 3.0.1
|
||||
|
||||
"https://oemsecretsapi.com/partsearch?
|
||||
searchTerm=BC547
|
||||
&apiKey=icawpb0bspoo2c6s64uv4vpdfp2vgr7e27bxw0yct2bzh87mpl027x353uelpq2x
|
||||
¤cy=EUR
|
||||
&countryCode=IT"
|
||||
|
||||
&countryCode=IT"
|
||||
|
||||
partsearch description:
|
||||
Use the Part Search API to find distributor data for a full or partial manufacturer
|
||||
Use the Part Search API to find distributor data for a full or partial manufacturer
|
||||
part number including part details, pricing, compliance and inventory.
|
||||
|
||||
|
||||
Required Parameter Format Description
|
||||
searchTerm string Part number you are searching for
|
||||
apiKey string Your unique API key provided to you by OEMsecrets
|
||||
|
|
@ -304,14 +304,14 @@ class OEMSecretsProvider implements InfoProviderInterface
|
|||
Additional Parameter Format Description
|
||||
countryCode string The country you want to output for
|
||||
currency string / array The currency you want the prices to be displayed as
|
||||
|
||||
|
||||
To display the output for GB and to view prices in USD, add [ countryCode=GB ] and [ currency=USD ]
|
||||
as seen below:
|
||||
oemsecretsapi.com/partsearch?apiKey=abcexampleapikey123&searchTerm=bd04&countryCode=GB¤cy=USD
|
||||
|
||||
|
||||
To view prices in both USD and GBP add [ currency[]=USD¤cy[]=GBP ]
|
||||
oemsecretsapi.com/partsearch?searchTerm=bd04&apiKey=abcexampleapikey123¤cy[]=USD¤cy[]=GBP
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -1465,4 +1465,4 @@ class OEMSecretsProvider implements InfoProviderInterface
|
|||
return $url;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue