main: fix API usage

This commit is contained in:
dece 2020-11-05 21:42:02 +01:00
parent 9954067710
commit f8439dee4a

View file

@ -4,7 +4,7 @@
import argparse
import logging
from scaruffi import api
from scaruffi.api import ScaruffiApi
def main():
@ -22,8 +22,7 @@ def main():
args = parser.parse_args()
log_level = logging.DEBUG if args.verbose else logging.WARNING
global LOG
LOG = api.setup_logging("scaruffi", level=log_level)
api = ScaruffiApi(log_level=log_level)
if args.musicians:
musicians = api.get_musicians(args.offset, args.limit)