Skip to content

vivekbhagwat/kin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kin

kin is a simple ruby client binding for Gilt’s API. It is designed to be simple to use, so that developers don’t need to worry about making the correct requests or interpreting the results of those requests, and can instead get right to developing their awesome apps! In case you’re wondering about the name, kin means gold in Japanese (which is kind of related to Gilt)

Install

gem install kin

Use

Create a Client

gilt = Kin::Client.new(Secret.password)

Get all Active Sales

sales_array = gilt.active_sales

Get all Active Sales within a Store

sales_array = gilt.active_sales('women') #could also be men, kids, or home (will be validated)

Get all Upcoming Sales

sales_array = gilt.upcoming_sales

Get all Upcoming Sales within a Store

sales_array = gilt.upcoming_sales('women') #could also be men, kids, or home (will be validated)

Get details about a particular Sale

sale = gilt.sale_detail('women', sale_key) #assuming sale_key is already defined and valid

Get details about a particular Product

Using Product ID

product = gilt.product_detail(product_id) #assuming product_id is already defined and valid

Using a URL given in a Sale Detail

product = gilt.product_detail_from_url(url) #assuming url is already defined (it will be validated)

Extras

Get a list of valid stores

Kin.stores

To Test

Create a file in the test/ directory called “secret.rb” with the contents as follows:

module Secret def Secret.password '<API_KEY>' end end #your api key goes there (without angle brackets)

and run (in the shell):

ruby test_kin.rb

Contributing to kin

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2012 Vivek Bhagwat. See LICENSE.txt for further details.

About

A simple ruby wrapper for the Gilt API, based on the scala wrapper at github.com/mnn2104/Aurum

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages