Created
October 8, 2014 06:09
-
-
Save jamespenguin/1e3a69f169c2402b8826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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