Skip to content

spuder/tindie_api

Repository files navigation

tindie_api

Description

tindie_api is a Ruby gem that provides a convenient interface for interacting with the Tindie API. This library simplifies the process of managing products, orders, and other Tindie-related operations programmatically.

Installation

Add this line to your application's Gemfile:

gem 'tindie_api'

Then execute:

bundle install

Or install it yourself as:

gem install tindie_api

Usage

Get unshipped orders

get "/orders" do
    @username = ENV['TINDIE_USERNAME']
    @api_key = ENV['TINDIE_API_KEY']
    @api = TindieApi::TindieOrdersAPI.new(@username, @api_key)

    # false means unshipped
    orders = @api.get_all_orders(false)

    puts orders.inspect

    erb :orders, locals: { orders: orders }
end

Note that the Tindie api uses pagination with 20 items (default) and 50 items (max).

There are 3 ways to get orders depending on the level of abstraction you desire

  • get_orders (Returns TindieAPI Objects)
  • get_orders_json (Returns Json)
  • get_all_orders (Returns TindieAPI Objects)

Examples

See this git repo for additional examples

spuder/packpoint

About

Ruby Library to interact with Tindie.com API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages