# Path: vk_api/api.py
# def vapi(method, params=''):
#     return api_request(get_api(account=bot_header.CURRENT_ACCOUNT), method, params)


from sys import argv
from vk_api.api import vapi
# Author:      hydrogen-nt
#
# Created:     13.01.2018
# Copyright:   (c) hydrogen-nt 2018
#
# implements using VK api on console
# by typing "vapi [method] [params (x='y',)]"
#-------------------------------------------------------------------------------


def print_usage():
    print("vapi [method] [params]")

#main method
def main(c):
    c = c.replace("vapi", "").strip()
    if not c:
        print_usage()
        return 0

    method = ''
    params = None
    if ' ' in c:
        arr = c.split(' ')
        method = arr[0]
        if len(arr) >= 2:
            params = arr[1]
    else:
        method = c


# Path: vk_api/api.py
# def vapi(method, params=''):
#     return api_request(get_api(account=bot_header.CURRENT_ACCOUNT), method, params)


# Path: console/vapi.py
from sys import argv
from vk_api.api import vapi

# Author:      hydrogen-nt
#
# Created:     13.01.2018
# Copyright:   (c) hydrogen-nt 2018
#
# implements using VK api on console
# by typing "vapi [method] [params (x='y',)]"
#-------------------------------------------------------------------------------


def print_usage():
    print("vapi [method] [params]")

#main method
def main(c):
    c = c.replace("vapi", "").strip()
    if not c:
        print_usage()
        return 0

    method = ''
    params = None
    if ' ' in c:
        arr = c.split(' ')
        method = arr[0]
        if len(arr) >= 2:
            params = arr[1]
    else:
        method = c


    x = vapi(method, params=params)