#NEWLINE# def get_api( connection , **kwargs ) : #NEWLINE# #INDENT# auth = linkedin . LinkedInAuthentication ( kwargs . get ( 'consumer_key' ) , kwargs . get ( 'consumer_secret' ) , None , linkedin . PERMISSIONS . enums . values ( ) ) #NEWLINE# auth . token = AccessToken ( getattr ( connection , 'access_token' ) , getattr ( connection , 'expires_in' ) ) #NEWLINE# api = linkedin . LinkedInApplication ( auth ) #NEWLINE# return api