lib/bitcoin/cli.rb in bitcoin-api-0.1.0 vs lib/bitcoin/cli.rb in bitcoin-api-0.1.1

- old
+ new

@@ -12,11 +12,11 @@ puts "***** [MAIN MENU] *****" puts "* What would you like to do?" puts "* [1] Select Symbol" puts "* [2] View Currency Information" puts "* [3] View Tickers" - # puts "[4] User Dashboard (Auth Needed)" + puts "* [4] User Dashboard" puts " " end def menu # Display options @@ -57,13 +57,34 @@ end end ### TODO: USER SUBMENU ### def user_menu - puts "Nothing here yet!" + user_menu_display + + input = gets.strip + menu if input == '0' + Bitcoin::Account.show_balances if input == '1' + Bitcoin::Account.show_deposit_address if input == '2' + exit if input == 'exit' + user_menu end + def user_menu_display + puts '' + puts 'Type "exit" to quit' + puts '' + puts '====== [User Menu] ======' + puts '| [0] Main Menu' + puts '| [1] View Account Balances' + puts '| [2] View Deposit Address...' + # puts "* [3] Order Menu" # Create New, Cancel, Get by ID, Get History + # puts "* [4] Trade Menu" + # puts "* [5] Transfer To / From Bank Account" + # puts '* [5] Transfer To / From Bank Account' + end + ### SYMBOL SUBMENUS ### def symbol_menu(symbol = nil) # display list & get symbol if it hasn't been selected yet if !symbol @@ -246,20 +267,24 @@ analysis_menu_display(symbol) input = gets.strip menu if input == '0' + symbol_menu(symbol) if input == '00' Bitcoin::Analyzer.analyze_trades symbol if input == '1' + Bitcoin::Analyzer.analyze_candles symbol if input == '2' analysis_menu(symbol) end def analysis_menu_display(symbol) puts "" puts " Type 'exit' to quit" puts "" puts "///// [Analysis Mode - #{symbol.id}] /////" - puts "/ [0] Main Menu" - puts "/ [1] Analyze Trades Within Range..." + puts "/ [0] Main Menu" + puts "/ [00] Symbol Menu" + puts "/ [1] Analyze Trades Within Range..." + puts "/ [2] Analyze Candles Within Range..." puts "" end end