-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(job): rename and delete tags at jobs/v3/api_client/location_search_sample.py #13005
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -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 basic_location_search] | ||||||||
# [START job_basic_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Renaming region tags need to have the new region tag included, then updating the docs, then removing the old tag.
Suggested change
(Change this in all other places. This is an earlier PR from you, you may have already adapted to this pattern since) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks glasnt! Please check b/347825791 for more details on this example Even in this case, should I add both region tags? |
||||||||
def basic_location_search(client_service, company_name, location, distance): | ||||||||
request_metadata = { | ||||||||
"user_id": "HashedUserId", | ||||||||
|
@@ -47,10 +45,10 @@ def basic_location_search(client_service, company_name, location, distance): | |||||||
print(response) | ||||||||
|
||||||||
|
||||||||
# [END basic_location_search] | ||||||||
# [END job_basic_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||||
|
||||||||
|
||||||||
# [START keyword_location_search] | ||||||||
# [START job_keyword_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The # Performs a keyword-based location search, adding a keyword filter to the job query. |
||||||||
def keyword_location_search(client_service, company_name, location, distance, keyword): | ||||||||
request_metadata = { | ||||||||
"user_id": "HashedUserId", | ||||||||
|
@@ -72,10 +70,10 @@ def keyword_location_search(client_service, company_name, location, distance, ke | |||||||
print(response) | ||||||||
|
||||||||
|
||||||||
# [END keyword_location_search] | ||||||||
# [END job_keyword_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correctly renamed the |
||||||||
|
||||||||
|
||||||||
# [START city_location_search] | ||||||||
# [START job_city_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The # Performs a location search limited to a specific city. |
||||||||
def city_location_search(client_service, company_name, location): | ||||||||
request_metadata = { | ||||||||
"user_id": "HashedUserId", | ||||||||
|
@@ -97,10 +95,10 @@ def city_location_search(client_service, company_name, location): | |||||||
print(response) | ||||||||
|
||||||||
|
||||||||
# [END city_location_search] | ||||||||
# [END job_city_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Accurately renamed the |
||||||||
|
||||||||
|
||||||||
# [START multi_locations_search] | ||||||||
# [START job_multi_locations_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correctly renamed the # Performs a job search using multiple location filters. |
||||||||
def multi_locations_search( | ||||||||
client_service, company_name, location1, distance1, location2 | ||||||||
): | ||||||||
|
@@ -125,10 +123,10 @@ def multi_locations_search( | |||||||
print(response) | ||||||||
|
||||||||
|
||||||||
# [END multi_locations_search] | ||||||||
# [END job_multi_locations_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||||
|
||||||||
|
||||||||
# [START broadening_location_search] | ||||||||
# [START job_broadening_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The # Performs a location search with broadening enabled, expanding the search radius if initial results are limited. |
||||||||
def broadening_location_search(client_service, company_name, location): | ||||||||
request_metadata = { | ||||||||
"user_id": "HashedUserId", | ||||||||
|
@@ -151,7 +149,7 @@ def broadening_location_search(client_service, company_name, location): | |||||||
print(response) | ||||||||
|
||||||||
|
||||||||
# [END broadening_location_search] | ||||||||
# [END job_broadening_location_search] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||||
|
||||||||
|
||||||||
location = "Mountain View, CA" | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correctly renamed the
[START]
tag for thebasic_location_search
function. Adding a concise in-line comment explaining the function's purpose and parameters would improve readability. For example:# Performs a basic location search for jobs using the provided client service, company name, location, and distance.