Skip to content

Commit

Permalink
chore(samples): remove region tags. (#337)
Browse files Browse the repository at this point in the history
* fix: remove region tags.

* fix: remove region tags.

* fix: add new lines to the end of files.

* revert autogenerated samples.

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
2 people authored and dandhlee committed Dec 2, 2022
1 parent a60178f commit 9df015c
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


def main(project_id, dataset_id, table_id):
# [START retail_import_user_events_from_big_query]
# TODO: Set project_id to your Google Cloud Platform project ID.
# project_id = "my-project"

Expand Down Expand Up @@ -98,8 +97,6 @@ def import_user_events_from_big_query():

import_user_events_from_big_query()

# [END retail_import_user_events_from_big_query]


if __name__ == "__main__":
parser = argparse.ArgumentParser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


def main(bucket_name):
# [START retail_import_user_events_from_gcs]
# Import user events into a catalog from GCS using Retail API

import time
Expand Down Expand Up @@ -103,8 +102,6 @@ def import_user_events_from_gcs():
import_user_events_from_gcs()


# [END retail_import_user_events_from_gcs]

if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_import_user_events_from_inline_source]
# Import user events into a catalog from inline source using Retail API
#
import datetime
Expand Down Expand Up @@ -105,5 +104,3 @@ def import_user_events_from_inline_source():


import_user_events_from_inline_source()

# [END retail_import_user_events_from_inline_source]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_purge_user_event]
# Deleting user event using Retail API.
#
import google.auth
Expand Down Expand Up @@ -52,4 +51,3 @@ def call_purge_user_events():

write_user_event(visitor_id)
call_purge_user_events()
# [END retail_purge_user_event]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_rejoin_user_event]
# Starts a user event rejoin operation using Retail API.
#
import google.auth
Expand Down Expand Up @@ -55,5 +54,3 @@ def call_rejoin_user_events():
write_user_event(visitor_id)
call_rejoin_user_events()
purge_user_event(visitor_id)

# [END retail_rejoin_user_event]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_write_user_event]
# Write user event using Retail API.
#
import datetime
Expand Down Expand Up @@ -71,5 +70,3 @@ def write_user_event():

write_user_event()
purge_user_event(visitor_id)

# [END retail_write_user_event]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_add_fulfillment_places]
# Adding place IDs using Retail API.
#
import asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_create_product]
# Create product in a catalog using Retail API
#
import random
Expand Down Expand Up @@ -82,4 +81,3 @@ def create_product(product_id: str):
created_product = create_product(generated_product_id)
# delete created product
delete_product(created_product.name)
# [END retail_create_product]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_crud_product]
# Create, update, get and delete product in a catalog using Retail API.
#
import random
Expand Down Expand Up @@ -140,4 +139,3 @@ def delete_product():
get_product()
update_product()
delete_product()
# [END retail_crud_product]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_delete_product]
# Delete product from a catalog using Retail API.
#
import random
Expand Down Expand Up @@ -56,5 +55,3 @@ def delete_product(product_name: str):
# delete created product
created_product_name = create_product(product_id).name
delete_product(created_product_name)

# [END retail_delete_product]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_get_product]
# Get product from a catalog using Retail API.
#
import random
Expand Down Expand Up @@ -56,5 +55,3 @@ def get_product(product_name: str):
product = get_product(created_product.name)
# remove created product
delete_product(created_product.name)

# [END retail_get_product]
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


def main(project_id, dataset_id, table_id):
# [START retail_import_products_from_big_query]
# TODO: Set project_id to your Google Cloud Platform project ID.
# project_id = "my-project"

Expand Down Expand Up @@ -104,8 +103,6 @@ def import_products_from_big_query():

import_products_from_big_query()

# [END retail_import_products_from_big_query]


if __name__ == "__main__":
parser = argparse.ArgumentParser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


def main(bucket_name):
# [START retail_import_products_from_gcs]
# Import products from using Retail API.
#
import time
Expand Down Expand Up @@ -107,8 +106,6 @@ def import_products_from_gcs():

import_products_from_gcs()

# [END retail_import_products_from_gcs]


if __name__ == "__main__":
parser = argparse.ArgumentParser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_import_products_from_inline_source]
# Import products into a catalog from inline source using Retail API
#
import random
Expand Down Expand Up @@ -144,5 +143,3 @@ def import_products_from_inline_source():


import_products_from_inline_source()

# [END retail_import_products_from_inline_source]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_remove_fulfillment_places]
# Remove place IDs using Retail API.
#
import asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_set_inventory]
# Updating inventory information using Retail API.
#
import asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


# [START retail_update_product]
# Update product in a catalog using Retail API
#
import random
Expand Down Expand Up @@ -91,5 +90,3 @@ def update_product(original_product: Product):
update_product(created_product)
# delete product
delete_product(created_product.name)

# [END retail_update_product]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_search_for_products_with_query_parameter]
# Call Retail API to search for a products in a catalog using only search query.
#

Expand Down Expand Up @@ -56,4 +55,3 @@ def search():


search()
# [END retail_search_for_products_with_query_parameter]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_search_product_with_boost_spec]
# Call Retail API to search for a products in a catalog, rerank the
# results boosting or burying the products that match defined condition.
#
Expand Down Expand Up @@ -65,4 +64,3 @@ def search():


search()
# [END retail_search_product_with_boost_spec]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_search_product_with_facet_spec]
# Call Retail API to search for a products in a catalog with facets.
#
import google.auth
Expand Down Expand Up @@ -63,4 +62,3 @@ def search():


search()
# [END retail_search_product_with_facet_spec]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_search_for_products_with_filter]
# Call Retail API to search for a products in a catalog, filter the results by different product fields.
#

Expand Down Expand Up @@ -57,4 +56,3 @@ def search():


search()
# [END retail_search_for_products_with_filter]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_search_for_products_with_ordering]
# Call Retail API to search for a products in a catalog, order the results by different product fields.
#

Expand Down Expand Up @@ -57,4 +56,3 @@ def search():


search()
# [END retail_search_for_products_with_ordering]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_search_for_products_with_page_size]
# Call Retail API to search for a products in a catalog,
# limit the number of the products per page and go to the next page using "next_page_token"
# or jump to chosen page using "offset".
Expand Down Expand Up @@ -69,4 +68,3 @@ def search():


search()
# [END retail_search_for_products_with_page_size]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START retail_search_for_products_with_query_expansion_specification]
# Call Retail API to search for a products in a catalog,
# enabling the query expansion feature to let the Google Retail Search build an automatic query expansion.
#
Expand Down Expand Up @@ -63,4 +62,3 @@ def search():


search()
# [END retail_search_for_products_with_query_expansion_specification]

0 comments on commit 9df015c

Please sign in to comment.