lib/netki/netki.rb in netki-0.0.4 vs lib/netki/netki.rb in netki-0.0.5
- old
+ new
@@ -30,13 +30,10 @@
return {} if response.code == 204 && method == "DELETE"
# We should have response content at this point
raise "Empty Response Received" if response.content.nil? || response.content.empty?
- # Verify we have the correct content type
- raise "Non-JSON Content Type" if response.headers['Content-Type'] != 'application/json'
-
# Make Sure We Can Decode JSON Response
begin
ret_data = JSON.parse(response.content)
rescue JSON::ParserError => e
raise "Invalid JSON Response Received"
@@ -103,10 +100,10 @@
# :section: Getters
# Get Address for Existing Currency
def get_address(currency)
- @wallets[currency][:address]
+ @wallets[currency][:address] if @wallets.has_key? currency
end
# Get Wallet Name Array of Used Currencies
def used_currencies
@wallets.keys