def publish_text_on_company(): linkedin = PyLinkedinAPI(access_token) id = int(input('Enter id(integer) company: ')) comment = input('Enter text: ') data = linkedin.publish_company_comment(id, comment) spaces(1) print(data)
def get_profile(): linkedin = PyLinkedinAPI(access_token) fields = input( 'Enter fields separated by commas without spaces \nEx: id,email-address,... : ' ) companies = linkedin.get_profile(fields.split(',')) spaces(1) print(companies)
def publish_on_profile(): linkedin = PyLinkedinAPI(access_token) comment, title, description, site, image = get_content() data = linkedin.publish_profile(comment, title=title, description=description, submitted_url=site, submitted_image_url=image) spaces(1) print(data)
def post(message, url=None): """ Публикация в LinkedIn """ config = SocialConfig.get_solo() message = format_message(message, url=url) if not message: return from PyLinkedinAPI.PyLinkedinAPI import PyLinkedinAPI linkedin_api = PyLinkedinAPI(config.linkedin_access_token) linkedin_api.publish_profile_comment(message)
def publish_on_company(): linkedin = PyLinkedinAPI(access_token) id = int(input('Enter id(integer) company: ')) comment, title, description, site, image = get_content() data = linkedin.publish_company(id, comment, title=title, description=description, submitted_url=site, submitted_image_url=image) spaces(1) print(data)
def publish_text_on_profile(): linkedin = PyLinkedinAPI(access_token) comment = input('Enter text: ') data = linkedin.publish_profile_comment(comment) spaces(1) print(data)
def get_companies(): linkedin = PyLinkedinAPI(access_token) companies = linkedin.get_companies() spaces(1) print(companies)
def get_basic_profile(): linkedin = PyLinkedinAPI(access_token) profile = linkedin.get_basic_profile() spaces(1) print(profile)
def setUp(self): access_token = 'AQVaE34QblVhvPlUn-6zWh3YLgHjx...' self.linkedin = PyLinkedinAPI(access_token)
def publish_text_on_profile(access_token, post_text): linkedin = PyLinkedinAPI(access_token) data = linkedin.publish_profile_comment(post_text) spaces(1) print(data)