Skip to content

Instantly share code, notes, and snippets.

@jamespenguin
Created October 8, 2014 06:09
Show Gist options
  • Save jamespenguin/1e3a69f169c2402b8826 to your computer and use it in GitHub Desktop.
Save jamespenguin/1e3a69f169c2402b8826 to your computer and use it in GitHub Desktop.
get '/api/rising_and_falling' do
begin
data = CardPrices.success({"rising" => CardPrices::PriceStats.top_rising_cards,
"falling" => CardPrices::PriceStats.top_dropping_cards})
rescue
data = CardPrices.error "Failed to retrieve rising and falling price data."
end
content_type :json
return data.to_json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment