def create_catalog_api_client(user, catalog_integration):
 scopes = ['email', 'profile']
 expires_in = settings.OAUTH_ID_TOKEN_EXPIRATION
 jwt = JwtBuilder(user).build_token(scopes, expires_in)
 return EdxRestApiClient(catalog_integration.internal_api_url, jwt=jwt)

def create_catalog_api_client ( user , catalog_integration ) : scopes = [ 'email' , 'profile' ] expires_in = settings . OAUTH_ID_TOKEN_EXPIRATION jwt = JwtBuilder ( user ) . build_token ( scopes , expires_in ) return EdxRestApiClient ( catalog_integration . internal_api_url , jwt = jwt )
returns an api client which can be used to make catalog api requests .