Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

docs: add Admin API samples for property user link management methods #67

Merged
merged 4 commits into from
May 27, 2021

Conversation

ikuleshov
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@ikuleshov ikuleshov requested a review from a team as a code owner May 19, 2021 23:55
@ikuleshov ikuleshov requested a review from busunkim96 May 19, 2021 23:55
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 19, 2021
@product-auto-label product-auto-label bot added api: analyticsadmin Issues related to the googleapis/python-analytics-admin API. samples Issues that are directly related to samples. labels May 19, 2021
@snippet-bot
Copy link

snippet-bot bot commented May 19, 2021

Here is the summary of changes.

You are about to add 10 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@ikuleshov
Copy link
Contributor Author

Region tag product prefix check is failing due to the product set as non-public in https://devrel.corp.google.com/admin/products/401. This is something that we are currently working on, but I believe the region prefixes are fine.

Copy link
Contributor

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test files seem to be missing copyright years in the license header.

samples/properties_user_links_audit.py Show resolved Hide resolved
samples/properties_user_links_audit_test.py Show resolved Hide resolved
samples/properties_user_links_audit_test.py Show resolved Hide resolved
@@ -0,0 +1,29 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright year

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,29 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright year

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,29 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright year

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,29 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright year

@@ -0,0 +1,27 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright year

@@ -0,0 +1,29 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright year

# [START analyticsadmin_properties_user_links_list]
from google.analytics.admin import AnalyticsAdminServiceClient

from properties_user_links_get import print_user_link
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are these samples going to be presented in the documentation? Cloud code snippets normally don't import functions from other files since they are intended to be copy-paste runnable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good question. I updated samples to just use print() to output the raw response proto, which does the job just fine, and removes dependencies between samples. Samples for *get() operations (e.g. properties_user_links_get) still have a proper print method that demonstrates how to access and print individual fields of the response.

@ikuleshov ikuleshov merged commit aa55627 into googleapis:master May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: analyticsadmin Issues related to the googleapis/python-analytics-admin API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants