Example #1
0
from snapchat import Snapchat

#Get snapchat ready
name = 'snapmecatz'
password = os.environ.get('SNAPMECATZ')
s = Snapchat()
s.login(name, password)

#AddFriends
count = 0
update=s.get_updates()
for user in (update['added_friends']):
    s.add_friend(user['name'])
    count+=1
print(count)
Example #2
-1
def getbests(amount='all'):
	#login
	username = request.args.get('username', '')
	password = request.args.get('password', '')
	s = Snapchat()
	s.login(username, password)
	if amount == 'all':
			return Response(json.dumps(s.get_updates()['updates_response']['added_friends']), mimetype='text/javascript')
	if amount == 'bests':
			return Response(json.dumps(s.get_updates()['updates_response']['bests']), mimetype='text/javascript')