def milestones(args): if args.type == 'all': print(api('milestones')) elif args.platform == 'all': print(api('milestones', args.type)) else: print(api('milestones', args.type, args.platform))
def charts(args): if args.platform == 'all' or not hasattr(args, 'action'): print(api('charts')) elif args.action == 'all': print(api('charts', args.platform)) else: print(api('charts', args.platform, args.action))
def viral(args): if args.platform == 'all' or not hasattr(args, 'action'): print(api('viral')) elif args.action == 'all': print(api('viral', args.platform)) else: print(api('viral', args.platform, args.action))
from pynindo import api print(api('charts', 'youtube', 'small')) print(api.charts['youtube']['small']) print(api['charts']['youtube']['small'])
def search(args): if args.full: for artist in api('search', args.name).json(): print(api.artist[artist['id']]) else: print(api('search', args.name))