Discussion Forum: Thread 358066 |
|
![](/images/dot.gif) |
| ![](/images/dot.gif) | Author: | TheRIK ![View Messages Posted By TheRIK View Messages Posted By TheRIK](/images/msgs16.png) | Posted: | May 22, 2024 13:59 | Subject: | PHP & BrickLink API | Viewed: | 86 times | Topic: | LANG Deutsch | |
|
| Hallo Zusammen,
ich versuche mit einem selbst geschriebenen PHP Skript auf die BrickLink API
zuzugreifen. Klappt soweit auch Recht gut, außer wenn es um das Thema der "Zusätze"
geht. Quasi das hier klappt "GET /items/part/3001old/price" während das
hier "GET /items/part/3001old/price?new_or_used=U" nicht klappt. Ich
werde einfach nicht schlau draus...
Vielleicht hat ja jemand eine Idee...
|
|
| ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) |
| ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | Author: | WWTech ![View Messages Posted By WWTech View Messages Posted By WWTech](/images/msgs16.png) | Posted: | May 28, 2024 07:49 | Subject: | Re: PHP & BrickLink API | Viewed: | 68 times | Topic: | LANG Deutsch | |
|
| In LANG Deutsch, TheRIK writes:
| Hallo Zusammen,
ich versuche mit einem selbst geschriebenen PHP Skript auf die BrickLink API
zuzugreifen. Klappt soweit auch Recht gut, außer wenn es um das Thema der "Zusätze"
geht. Quasi das hier klappt "GET /items/part/3001old/price" während das
hier "GET /items/part/3001old/price?new_or_used=U" nicht klappt. Ich
werde einfach nicht schlau draus...
Vielleicht hat ja jemand eine Idee...
|
Poste doch mal das Script
|
|
| ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) |
| ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | ![](/images/dot.gif) | Author: | TheRIK ![View Messages Posted By TheRIK View Messages Posted By TheRIK](/images/msgs16.png) | Posted: | Jun 1, 2024 23:53 | Subject: | Re: PHP & BrickLink API | Viewed: | 61 times | Topic: | LANG Deutsch | |
|
| In LANG Deutsch, WWTech writes:
| In LANG Deutsch, TheRIK writes:
| Hallo Zusammen,
ich versuche mit einem selbst geschriebenen PHP Skript auf die BrickLink API
zuzugreifen. Klappt soweit auch Recht gut, außer wenn es um das Thema der "Zusätze"
geht. Quasi das hier klappt "GET /items/part/3001old/price" während das
hier "GET /items/part/3001old/price?new_or_used=U" nicht klappt. Ich
werde einfach nicht schlau draus...
Vielleicht hat ja jemand eine Idee...
|
Poste doch mal das Script
|
function fetchCurrentPrices($itemNo, $itemType, $colorId) {
$part = strtolower($itemType);
$url = "https://api.bricklink.com/api/store/v1/items/$part/$itemNo/price?guide_type=sold";
$response = makeRequest($url, 'GET' ;
if ($response['code'] != 200) {
logError("Error fetching current prices for item $itemNo in color
$colorId: {$response['body']}" ;
return null;
} else {
return json_decode($response['body'], true);
}
}
|
![](/images/dot.gif) |
|
|
|
|
|