class BadASS::Client

A client to periodically check for new toys and news to avoid spamming the BD API directly.

Attributes

drops[R]

@return [Array<BadASS::Toy>] the current drops

sales[R]

@return [Array<BadASS::Sale>] the current BD sales

Public Class Methods

new(refresh_rate: 600) click to toggle source

Creates a client to do API operations. @param refresh_rate [Integer] the rate at which the Client should refresh its list of toys.

# File lib/badass/client.rb, line 5
def initialize(refresh_rate: 600)
  Thread.new do
    @drops = BadASS.drops
    @sales = BadASS.sales
    sleep(refresh_rate)
  end
end