https://github.com/adbertram/bricklink
A PowerShell module that allows you to interact with Bricklink.com’s API
https://github.com/adbertram/bricklink
Last synced: 5 months ago
JSON representation
A PowerShell module that allows you to interact with Bricklink.com’s API
- Host: GitHub
- URL: https://github.com/adbertram/bricklink
- Owner: adbertram
- Created: 2024-02-19T12:46:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T01:05:37.000Z (over 1 year ago)
- Last Synced: 2025-05-03T14:55:56.514Z (about 1 year ago)
- Language: PowerShell
- Size: 70.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bricklink PowerShell Module
The Bricklink PowerShell Module provides a suite of tools for interacting with the Bricklink API, enabling automation and management of Bricklink resources such as inventory, wanted lists, and order management.
## Prerequisites
Before using this module, you must have:
- PowerShell 7 or later installed on your system.
- A Bricklink account to access the Bricklink API.
- Additionally, you need to obtain API keys from Bricklink by registering your application in the Bricklink API Developer website. The following API credentials are required:
- Consumer Key
- Consumer Secret
- Token Value
- Token Secret
## Initial Setup
- Clone the repository from GitHub or install the module from the PowerShell Gallery by running `Install-Module Bricklink`.
- Copy the configuration.example.json file to configuration.json and fill in your Bricklink API keys and other relevant information.
- Load the module with Import-Module ./Bricklink (adjust the path according to where you placed the module).
## Configuring Authentication
The Bricklink module communicates with Bricklink in two different ways; via the API and also via the web for wanted list management.
To use any function that depends on the API which is all functions _not_ related to wanted lists, you must use the Save-BlBricklinkConfiguration command to save your initial API information securely by running the following commands in PowerShell, replacing with your actual API credentials:
```
Save-BlBricklinkConfiguration -Name "ConsumerKey" -Value ""
Save-BlBricklinkConfiguration -Name "ConsumerSecret" -Value ""
Save-BlBricklinkConfiguration -Name "TokenValue" -Value ""
Save-BlBricklinkConfiguration -Name "TokenSecret" -Value ""
```
To work with wanted lists, you must also provide your Bricklink store username and password.
```
Save-BlBricklinkConfiguration -Name "bricklink-username" -Value ""
Save-BlBricklinkConfiguration -Name "password" -Value ""
```
This information is stored securely and is used by the module to authenticate your API requests.
## Getting Started
After the initial setup and configuration, you can begin using the module to interact with the Bricklink API. Here are a few examples of what you can do:
- Get a list of categories: Get-BlCategoryList
- Add an item to a wanted list: Add-BlWantedListItem -WantedListId -ItemNo "" -Qty -ColorId
- Get price guide information for an item: Get-BlPriceGuide -Type "" -No "" -NewOrUsed "N" -GuideType "sold" -CountryCode "US"
For detailed information on each cmdlet and its parameters, refer to the cmdlet help within PowerShell.
## Contributing
Contributions to the Bricklink PowerShell Module are welcome! Please submit pull requests or issues through GitHub.