Code Monkey home page Code Monkey logo

go-bigcommerce's Introduction

This library provides an unofficial Go client for the bigcommerce REST API

Installation:

go get github.com/seanomeara96/go-bigcommerce

bigcommerce example usage:

package main

import (
	"fmt"

  	"github.com/joho/godotenv"
  	"github.com/seanomeara96/go-bigcommerce"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}

	storeHash := os.Getenv("STORE_HASH")
	xAuthToken := os.Getenv("XAUTHTOKEN")

	store := bigcommerce.NewClient(storeHash, xAuthToken, 3)

	products, err := store.GetAllProducts(bigcommerce.ProductQueryParams{})
	if err != nil {
		panic(err)
	}
	fmt.Println(products)
}

go-bigcommerce's People

Contributors

seanomeara96 avatar

Watchers

 avatar

Forkers

william1benn

go-bigcommerce's Issues

Willing to accept a PR - Missing sub-resources in parent struct

You never added the include sub-resource structs to the product struct, so if you use the query param include to get the sub-resource custom_fields , in the all product request function, you cannot access the custom field sub-resource struct in the returned product struct since the field currently does not exist, but should as it is a valid option from bigcommerce.

https://developer.bigcommerce.com/docs/rest-catalog/products#get-all-products

The following sub-resources include:

  • variants
  • images
  • custom_fields
  • bulk_pricing_rules
  • primary_images
  • modifiers
  • options
  • videos

I forked your repo and made the change, but since this still seems as an active repo, I wanted to make a PR to introduce this change.

Forked

Really appreciate your work here, but there were some missing parameters, as well as the customer endpoints that did not exist. I issued two pull requests that have not gotten a response from you that will correct these issues.

I have made these corrections, in this forked repo below.

https://github.com/william1benn/go-bigcommerce

I am more than willing to submit all this work to this repo to avoid duplication of efforts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.