docs: def main(args):
      """
          Query manager.
      """
      # Creating the instance
      tAW = TwitterAPIWrapper()
  
      # Selecting the query to be launched
      if args.type == "get_all_docs":
          results = tAW.get_all_docs(args.query)
  
      elif args.type == "get_user":
          results = tAW.get_user(args.query)
  
      elif args.type == "get_followers":
          results = tAW.get_followers(args.query)
  
          print "... %s followers downloaded... " % (len(results))
          #write the csv
          with open('%s_followers.csv' % args.query, 'wb') as f:
              writer = csv.writer(f)
              for r in results:
                  writer.writerow([args.query,str(r)])
  
      elif args.type == "get_friends":
          results = tAW.get_friends(args.query)
          print "... %s friends downloaded... " % (len(results))
          #write the csv
          with open('%s_friends.csv' % args.query, 'wb') as f:
              writer = csv.writer(f)
              for r in results:
                  writer.writerow([args.query,str(r)])
  
      elif args.type == "search_users":
          results = tAW.search_users(args.query)
  
      return results