Giter Club home page Giter Club logo

bigcommerce-api-ruby's Introduction

Bigcommerce

Gem Version Build Status Dependency Status Code Climate Coverage Status

This is the official Bigcommerce API client to support our Rest API. You can find more information about becoming a Bigcommerce developer here: developer.bigcommerce.com.

⚠️ A note about the current client: ⚠️

This is a preview release of the 1.0.0 version of the Bigcommerce API Client. Please report issues if they come up.

We have introduced a new major version of the API client and it is a complete rewrite (for the better). If you want to see the old version of the API client, please view it here: Bigcommerce API client v0.x. We recommend that developers upgrade to the latest client, but we will still support our developers who are unable to upgrade.

Installation

Bigcommerce is available on Rubygems:

gem install bigcommerce --pre

You can also add it to your Gemfile.

gem 'bigcommerce', '>= 1.0.0.beta'

Getting Started

In order to make requests to our API, you must register as a developer and have your credentials ready.

We currently have two different authentication schemes you can use depending on your use-case.

Public Apps

Public apps can be submitted to Bigcommerce App Store, allowing other businesses to install it in their Bigcommerce stores.

More Information

Private Apps

To develop a custom integration for one store, your app needs to use Basic Authentication.

More Information

Usage

For full examples on using the API client, please see the examples folder.

Configuration

In order to authenticate the API client, you will need to configure the client like this:

Single Click (Public Apps):

  • client_id: Obtained from the "My Apps" section on the developer portal.
  • access_token: Obtained after a token exchange in the auth callback.
  • store_hash: Also obtained after the token exchange.
Bigcommerce.configure do |config|
  config.store_hash = 'store_hash'
  config.client_id = 'client_id'
  config.access_token = 'access_token'
end

Private Apps:

To get all the private app credentials, simply visit your store admin page and navigate to the Settings > Legacy API Settings. Once there, you can create a new username to authenticate with.

Bigcommerce.configure do |config|
  config.auth = 'legacy'
  config.url = 'https://api_path.com'
  config.username = 'username'
  config.api_key = 'api_key'
end

SSL Configuration:

If you are using your own self-signed certificate, you can pass SSL options to Faraday. This is not required, but may be useful in special edge cases.

Bigcommerce.configure do |config|
  config.auth = 'legacy'
  config.url = 'https://api_path.com'
  config.username = 'username'
  config.api_key = 'api_key'
  config.ssl = {
    # Faraday options here
  }
end

For more information about configuring SSL with Faraday, please see the following:

Contributing

See CONTRIBUTING.md

bigcommerce-api-ruby's People

Contributors

maetl avatar alexnesbitt avatar saranyan avatar gregory avatar sgerrand avatar mattolson avatar pedelman avatar bradx3 avatar mikelarkin avatar damncabbage avatar zubin avatar pospischil avatar squish avatar imerica avatar cwalsh avatar turnrye avatar sebastianszturo avatar winfred avatar dpslwk avatar

Watchers

James Cloos avatar Alex Girdler avatar

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.