def run_sample(): import base_company_sample # Create a company before creating jobs company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') # Construct a job job_to_be_created = generate_job_with_required_fields(company_name) # Create a job job_created = create_job(client_service, job_to_be_created) # Get a job job_name = job_created.get('name') get_job(client_service, job_name) # Update a job job_to_be_updated = job_created job_to_be_updated.update({'description': 'changedDescription'}) update_job(client_service, job_name, job_to_be_updated) # Update a job with field mask update_job_with_field_mask(client_service, job_name, {'title': 'changedJobTitle'}, 'title') # Delete a job delete_job(client_service, job_name) # Delete company only after cleaning all jobs under this company base_company_sample.delete_company(client_service, company_name)
def tear_down(company_name, job_name, job_name2): import base_company_sample import base_job_sample base_job_sample.delete_job(client_service, job_name) base_job_sample.delete_job(client_service, job_name2) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample # Create a company before creating jobs company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') created_jobs = batch_job_create(client_service, company_name) updated_jobs = batch_job_update(client_service, created_jobs) batch_job_delete(client_service, updated_jobs) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_to_be_created.update({'display_name': 'Google'}) company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = base_job_sample.generate_job_with_required_fields( company_name) amount = {'currency_code': 'USD', 'units': 12} compensation_info = { 'entries': [{ 'type': 'BASE', 'unit': 'HOURLY', 'amount': amount }] } job_to_be_created.update({ 'title': 'Systems Administrator', 'employment_types': 'FULL_TIME', 'language_code': 'en-US', 'compensation_info': compensation_info }) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) basic_keyword_search(client_service, company_name, 'Systems Administrator') category_search(client_service, company_name, ['COMPUTER_AND_IT']) date_range = {'start_time': '2018-07-01T00:00:00Z'} date_range_search(client_service, company_name, date_range) employment_types_search(client_service, company_name, ['FULL_TIME', 'CONTRACTOR', 'PER_DIEM']) company_display_name_search(client_service, company_name, ['Google']) compensation_search(client_service, company_name) language_code_search(client_service, company_name, ['pt-BR', 'en-US']) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = generate_featured_job(company_name) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) search_featured_job(client_service, company_name) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample import custom_attribute_sample as caa company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = caa.generate_job_with_custom_attributes(company_name) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) histogram_search(client_service, company_name) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = generate_job_with_custom_attributes(company_name) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) custom_attribute_filter_string_value(client_service) custom_attribute_filter_long_value(client_service) custom_attribute_filter_multi_attributes(client_service) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created.update( {'locations': ['1600 Amphitheatre Pkwy, Mountain View, CA 94043']}) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) commute_search(client_service, company_name) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') location = 'Mountain View, CA' distance = 0.5 keyword = 'Software Engineer' location2 = 'Synnyvale, CA' job_to_be_created = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created.update({'addresses': [location], 'title': keyword}) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') job_to_be_created2 = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created2.update({'addresses': [location2], 'title': keyword}) job_name2 = base_job_sample.create_job(client_service, job_to_be_created2).get('name') # Wait several seconds for post processing time.sleep(10) basic_location_search(client_service, company_name, location, distance) city_location_search(client_service, company_name, location) broadening_location_search(client_service, company_name, location) keyword_location_search(client_service, company_name, location, distance, keyword) multi_locations_search(client_service, company_name, location, distance, location2) base_job_sample.delete_job(client_service, job_name) base_job_sample.delete_job(client_service, job_name2) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') location = 'Mountain View, CA' distance = 0.5 keyword = 'Software Engineer' location2 = 'Synnyvale, CA' job_to_be_created = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created.update({'locations': [location], 'job_title': keyword}) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') job_to_be_created2 = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created2.update({'locations': [location2], 'job_title': keyword}) job_name2 = base_job_sample.create_job(client_service, job_to_be_created2).get('name') # Wait several seconds for post processing time.sleep(10) basic_location_search(client_service, company_name, location, distance) city_location_search(client_service, company_name, location) broadening_location_search(client_service, company_name, location) keyword_location_search(client_service, company_name, location, distance, keyword) multi_locations_search(client_service, company_name, location, distance, location2) base_job_sample.delete_job(client_service, job_name) base_job_sample.delete_job(client_service, job_name2) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created.update({'title': 'Software engineer'}) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) auto_complete_default(client_service, 'goo', company_name) auto_complete_default(client_service, 'sof', company_name) job_title_auto_complete(client_service, 'sof', company_name) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created.update({'job_title': 'Software engineer'}) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) auto_complete_default(client_service, 'goo', company_name) auto_complete_default(client_service, 'sof', company_name) job_title_auto_complete(client_service, 'sof', company_name) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)
def run_sample(): import base_company_sample import base_job_sample company_to_be_created = base_company_sample.generate_company() company_created = base_company_sample.create_company( client_service, company_to_be_created) company_name = company_created.get('name') job_to_be_created = base_job_sample.generate_job_with_required_fields( company_name) job_to_be_created.update({ 'addresses': ['1600 Amphitheatre Pkwy, Mountain View, CA 94043'] }) job_name = base_job_sample.create_job(client_service, job_to_be_created).get('name') # Wait several seconds for post processing time.sleep(10) commute_search(client_service, company_name) base_job_sample.delete_job(client_service, job_name) base_company_sample.delete_company(client_service, company_name)