nexpcb/phpoctopart

The php restful api sdk of octopart.

Installs: 230

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 1

Open Issues: 0

pkg:composer/nexpcb/phpoctopart

dev-master 2019-03-28 08:38 UTC

This package is auto-updated.

Last update: 2025-09-29 02:02:40 UTC


README

A php library for octopart v3 restful API. If using Laravel, install laravel-octopart package

Installation

(If using laravel-octopart package, skip below steps)

  1. composer require "nexpcb/phpoctopart"
  2. Get Octopart apikey from its dashboard

Examples

  • Get single brand by uid

NexPCB\PHPOctopart\OctopartClient::create(['apikey' => 'xxxxxxx'])->getBrandByUID('2239e3330e2df5fe');

  • Search brands

NexPCB\PHPOctopart\OctopartClient::create(['apikey' => 'xxxxxxx'])->searchBrands(['q' => 'texas']);

  • Get multiple brands with multiple uids

NexPCB\PHPOctopart\OctopartClient::create(['apikey' => 'xxxxxxx'])->getMultipleBrands(['uid' => ['2239e3330e2df5fe', '56b297b87fa88175']]);