Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions jobs/v3/api_client/email_alert_search_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START instantiate]
import os
import time

from googleapiclient.discovery import build

client_service = build("jobs", "v3")
parent = "projects/" + os.environ["GOOGLE_CLOUD_PROJECT"]
# [END instantiate]


# [START search_for_alerts]
# [START job_search_for_alerts]
def search_for_alerts(client_service, company_name):
request_metadata = {
"user_id": "HashedUserId",
Expand All @@ -45,9 +43,7 @@ def search_for_alerts(client_service, company_name):
.execute()
)
print(response)


# [END search_for_alerts]
# [END job_search_for_alerts]


def set_up():
Expand Down
14 changes: 4 additions & 10 deletions jobs/v3/api_client/featured_job_search_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START instantiate]
import os
import random
import string
Expand All @@ -24,10 +23,9 @@

client_service = build("jobs", "v3")
parent = "projects/" + os.environ["GOOGLE_CLOUD_PROJECT"]
# [END instantiate]


# [START featured_job]
# [START job_generate_featured_job]
def generate_featured_job(company_name):
# Requisition id should be a unique Id in your system.
requisition_id = "job_with_required_fields:" + "".join(
Expand All @@ -48,12 +46,10 @@ def generate_featured_job(company_name):
}
print("Job generated: %s" % job)
return job
# [END job_generate_featured_job]


# [END featured_job]


# [START search_featured_job]
# [START job_search_featured_job]
def search_featured_job(client_service, company_name):
request_metadata = {
"user_id": "HashedUserId",
Expand All @@ -73,9 +69,7 @@ def search_featured_job(client_service, company_name):
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END search_featured_job]
# [END job_search_featured_job]


def set_up():
Expand Down
16 changes: 0 additions & 16 deletions jobs/v3/api_client/general_search_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START instantiate]
import os
import time

from googleapiclient.discovery import build

client_service = build("jobs", "v3")
parent = "projects/" + os.environ["GOOGLE_CLOUD_PROJECT"]
# [END instantiate]


# [START job_discovery_basic_keyword_search]
Expand All @@ -45,8 +43,6 @@ def basic_keyword_search(client_service, company_name, keyword):
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END job_discovery_basic_keyword_search]


Expand All @@ -70,8 +66,6 @@ def category_search(client_service, company_name, categories):
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END job_discovery_category_filter_search]


Expand All @@ -95,8 +89,6 @@ def employment_types_search(client_service, company_name, employment_types):
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END job_discovery_employment_types_filter_search]


Expand All @@ -120,8 +112,6 @@ def date_range_search(client_service, company_name, date_range):
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END job_discovery_date_range_filter_search]


Expand All @@ -145,8 +135,6 @@ def language_code_search(client_service, company_name, language_codes):
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END job_discovery_language_code_filter_search]


Expand All @@ -170,8 +158,6 @@ def company_display_name_search(client_service, company_name, company_display_na
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END job_discovery_company_display_name_search]


Expand Down Expand Up @@ -204,8 +190,6 @@ def compensation_search(client_service, company_name):
client_service.projects().jobs().search(parent=parent, body=request).execute()
)
print(response)


# [END job_discovery_compensation_search]


Expand Down