Esempio n. 1
0
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))
Esempio n. 2
0
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))
Esempio n. 3
0
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))
Esempio n. 4
0
from pynindo import api

print(api('charts', 'youtube', 'small'))
print(api.charts['youtube']['small'])
print(api['charts']['youtube']['small'])
Esempio n. 5
0
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))