🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

cheapshark

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheapshark

bundlerRubygems
Version
0.6.1
Version published
Maintainers
1
Created
Source

CheapShark

Dependency Status Code Climate Build Status

Ruby wrapper for CheapShark's API.

Installation

Add this to your Gemfile and do a bundle install.

gem 'cheapshark'

Or install it yourself:

$ gem install cheapshark

Usage

require 'cheapshark'
CheapShark.games(title: 'Borderlands 2')    # Returns an array of Game objects
CheapShark.games(title: 'Borderlands 2')[0] # Returns the likely most-relevant result
CheapShark.stores                           # Returns stores and their IDs
CheapShark.deals(storeID: 1, pageSize: 5)   # Returns five best deals on Steam (CS sorts by deal rating by default)
CheapShark.deal(id: 'DCqsq6Hnmtzu2UVkBpD133kL1pG93Ovz4%2BEjTuJAx9c%3D') # Returns a specific deal.

Keep in mind that option names must be properly capitalized. The API will respond to storeID but ignore storeid.

CheapShark.deals(storeID: 1, pageSize: 5) # Right
CheapShark.deals(storeid: 1, pageSize: 5) # Wrong, will return five best deals from any store
CheapShark.deals(storeID: 1, pagesize: 5) # Wrong, will return the API default of sixty deals
CheapShark.deals(storeid: 1, pagesize: 5) # Very wrong, will return all deals

To-dos

  • Decide on garbage-input scenarios to handle (things like calling CheapShark.games() without params)
  • Alert feature
  • Complete expectations.md

Contributing

  • Fork it ( https://github.com/GA114/cheapshark/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 27 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts