brickset is a Go client library for accessing the brickset.com API v3.

Abstract

brickset is a Go client library for accessing the brickset.com API v3.

If using this API, you may need to complete the following:

  • Register for the brickset.com,click here
  • All methods require a valid API key to be passed, which can be obtained here.

Interfaces

type IBrickSet interface {
	GetSets(ctx context.Context, params *GetSetRequest) (int, []*Sets, error)
	GetThemes(ctx context.Context) (int, []*Themes, error)
	GetReviews(ctx context.Context, setID int) (int, []*Review, error)
	GetSubthemes(ctx context.Context, theme string) (int, []*Subthemes, error)
	GetInstructions(ctx context.Context, setID int) (int, []*Instruction, error)
	GetInstructions2(ctx context.Context, setNumber string) (int, []*Instruction, error)
	GetAdditionalImages(ctx context.Context, setID int) (int, []*Image, error)
	GetYears(ctx context.Context, theme string) (int, []*Years, error)
}

Installation

# Go Modules
require github.com/wuhongbing/brickset

Usage

The following samples will assist you to become as comfortable as possible with brickset library.

package main

import (
	"context"
	"github.com/wuhongbing/brickset"
	"log"
)

func main() {
	ctx := context.Background()
	svc := brickset.New("api-key", "username", "password", brickset.WithDebug(true))
	_, themes, err := svc.GetThemes(ctx)
	if err != nil {
		panic(err)
	}
	for _, theme := range themes {
		_, sets, err := svc.GetSets(ctx, &brickset.GetSetRequest{Theme: theme.Theme, PageSize: 2})
		if err != nil {
			panic(err)
		}
		for _, set := range sets {
			log.Println(set.Name)
		}
	}
}

Tests

go test -v
Similar Resources

Go Substrate RPC Client (GSRPC)Go Substrate RPC Client (GSRPC)

Go Substrate RPC Client (GSRPC) Substrate RPC client in Go. It provides APIs and types around Polkadot and any Substrate-based chain RPC calls. This c

Nov 11, 2021

Server and client implementation of the grpc go libraries to perform unary, client streaming, server streaming and full duplex RPCs from gRPC go introduction

Description This is an implementation of a gRPC client and server that provides route guidance from gRPC Basics: Go tutorial. It demonstrates how to u

Nov 24, 2021

Comunicación de envios de archivos entres cliente-servidor, client-client.

Client - Server - Client Estes es un proyecto simple de comunicacion de envios de archivos del cliente al servidor y viceversamente, y de cliente a cl

Jul 16, 2022

Go PowerDNS 4.x API Client

PowerDNS 4.x API bindings for Golang This community project provides bindings for the currently latest version of PowerDNS Authoritative Server. Featu

Dec 12, 2022

Golang client for querying SecurityTrails API data

Golang client for querying SecurityTrails API data

haktrails haktrails is a Golang client for querying SecurityTrails API data, sponsored by SecurityTrails. SecurityTrails $50 Bug Bounty Hunter Plan Sa

Jan 4, 2023

Go client for the Notion API.

go-notion go-notion is a client for the Notion API, written in Go. Features The client supports all (non-deprecated) endpoints available in the Notion

Jan 2, 2023

Notion Official API Go Client.

go-notion Go SDK for Notion Official API. go get github.com/sorcererxw/go-notion Overview Getting Started Pagination Error Handling Reverse Proxy OAut

Aug 4, 2021

Go client for the Foreign exchange rates and currency conversion API 💰

fixer Go client for Fixer.io (Foreign exchange rates and currency conversion API) You need to register for a free access key if using the default Fixe

Nov 14, 2022

Teraswitch Go API Client

GoTSW The official Teraswitch Go client. Install go get -u github.com/teraswitch/gotsw Usage import "github.com/teraswitch/gotsw" Authentication packa

Apr 1, 2022
Related tags
Client library with golang for accessing Harbor API.

go-client Client library with golang for accessing Harbor API. Client Types There are 3 swagger files in this repo. api/ v2.0/ legacy_swag

Nov 13, 2022
Godaddy-domains-client-go - Godaddy domains api Client golang - Write automaticly from swagger codegen

Go API client for swagger Overview This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you c

Jan 9, 2022
Tailscale-client-go - A client implementation for the Tailscale HTTP API

tailscale-client-go A client implementation for the Tailscale HTTP API Example p

Sep 8, 2022
An API Client package for Studyplus for School SYNC API

Studyplus for School SYNC API Client This project is currently alpha, possibility having breaking changes. studyplus_for_school_sync_go is a API clien

Aug 2, 2021
Go API Client for Metasploit RPC API

go-msf-rpc Golang based RPC client to communicate with Metasploit. Based on code initially developed by Wyatt Dahlenburg repo. Extended to include oth

Nov 18, 2022
iceportal-api is a Golang client implementation to interact with the REST API of iceportal.de when connected to the WiFi-Network offered in German ICE Trains.
iceportal-api is a Golang client implementation to interact with the REST API of iceportal.de when connected to the WiFi-Network offered in German ICE Trains.

iceportal-api is a Golang client implementation to interact with the REST API of iceportal.de when connected to the WiFi-Network offered in German ICE Trains.

Aug 20, 2022
Go/Golang client library to interact with the Stein API

go-stein This Go / Golang client helps you interact with the Stein API. Stein is a suite of programs to help you turn any Google Sheet to a database.

Aug 23, 2022
Prisma Client Go is an auto-generated and fully type-safe database client

Prisma Client Go Typesafe database access for Go Quickstart • Website • Docs • API reference • Blog • Slack • Twitter Prisma Client Go is an auto-gene

Jan 9, 2023
The Dual-Stack Dynamic DNS client, the world's first dynamic DNS client built for IPv6.

dsddns DsDDNS is the Dual-Stack Dynamic DNS client. A dynamic DNS client keeps your DNS records in sync with the IP addresses associated with your hom

Sep 27, 2022