GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mnemocron/GoBricksPart-API: API and conversion table of Gobricks vs. LEGO part ID numbers using gobricks backend API

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
example_hogwarts
example_hogwarts
 
 
raw
raw
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bricklink_to_gorbick.py
bricklink_to_gorbick.py
 
 
color_table.csv
color_table.csv
 
 
gobrick_conversion_table.csv
gobrick_conversion_table.csv
 
 
gobricker.py
gobricker.py
 
 
part_categories.csv
part_categories.csv
 
 
parts.csv
parts.csv
 
 

Repository files navigation

GoBricksPart-API

API and conversion table of Gobricks vs. LEGO® part ID numbers using gobricks backend API

forthebadge forthebadge


This iPython Script uses the brick database from rebrickable.com to determine real LEGO® ID part numbers (ca. 30'000 items). The part numbers are filtered by category (e.g. no sticker sheets, Duplo® etc.). The filtered parts (ca. 11'000 items) are then sent to the gobricks.cn backend API to get a result if gobricks offers a compatible clone part and what Gobricks item number is.

edit

Actually, there is no need to convert any of your lists as long as they are in .csv Format. The Gobricks toolkit accepts partlists with LEGO® ID part numbers in the Rebrickable .csv Format. LEGO® ID part numbers in a .xlsx File will not work.


Part Lists

  • ./gobrick_conversion_table.csv

Convert Bricklink to BOM

  • pick a set
  • export set inventory to new Wanted List
    • click "part out"
    • create new Wanted List
  • download the Wanted List as .xml file
  • open the .xml file with Microsoft Excel
  • save the table as bom.csv
  • run the bricklink_to_gobrick.py
  • open the bom_gobricks.csv with a text editor
  • select all + copy
  • open the template gds-list.xml from gobricks in Microsoft Excel
  • paste the csv values in the table, save
  • upload to gobricks.cn toolkit

Gobricks API Documentation

(inofficial / reverse engineered)

See the ./raw directory for the raw JSON output from the API.

import requests
import json

partlist = ['10884', '2417']
for number in mylist:
    part = {}
    part['color_type'] = 'ldr'
    part['colorid'] = '0'   # color 0 = black
    part['designid'] = number
    part['quantity'] = 1
    partlist.append(part)

payload = {}
payload['testList'] = partlist

headers = {
    'Host':'gobricks.cn',
# fill in full request headers
    'Referer':'https://gobricks.cn/'
}

url = 'https://gobricks.cn/frontend/v1/community/lego2ItemList'
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)  # must return 200
partlist = json.loads(response.text)

About

API and conversion table of Gobricks vs. LEGO part ID numbers using gobricks backend API

Topics

bricklinkgobrickslegorebrickable

Resources

Readme
CC0-1.0 license
Activity

Stars

3 stars

Watchers

1 watching

Forks

4 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.