google-analytics-cli 0.2.2__py3-none-any.whl → 0.2.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ga_cli/commands/user_provided_data.py +56 -0
- ga_cli/main.py +2 -0
- {google_analytics_cli-0.2.2.dist-info → google_analytics_cli-0.2.4.dist-info}/METADATA +1 -1
- {google_analytics_cli-0.2.2.dist-info → google_analytics_cli-0.2.4.dist-info}/RECORD +6 -5
- {google_analytics_cli-0.2.2.dist-info → google_analytics_cli-0.2.4.dist-info}/WHEEL +0 -0
- {google_analytics_cli-0.2.2.dist-info → google_analytics_cli-0.2.4.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""User-provided data settings commands for a property."""
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
import typer
|
|
6
|
+
|
|
7
|
+
from ..api.client import get_admin_alpha_client
|
|
8
|
+
from ..config.store import get_effective_value
|
|
9
|
+
from ..utils import handle_error, output, require_options, resolve_output_format
|
|
10
|
+
|
|
11
|
+
user_provided_data_app = typer.Typer(
|
|
12
|
+
name="user-provided-data",
|
|
13
|
+
help="Manage user-provided data settings for a property",
|
|
14
|
+
no_args_is_help=True,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@user_provided_data_app.command("get")
|
|
19
|
+
def get_cmd(
|
|
20
|
+
property_id: Optional[str] = typer.Option(
|
|
21
|
+
None, "--property-id", "-p", help="Property ID (numeric)"
|
|
22
|
+
),
|
|
23
|
+
output_format: Optional[str] = typer.Option(
|
|
24
|
+
None, "--output", "-o", help="Output format (json, table, compact)"
|
|
25
|
+
),
|
|
26
|
+
):
|
|
27
|
+
"""Get user-provided data settings for a property."""
|
|
28
|
+
try:
|
|
29
|
+
effective_property = get_effective_value(property_id, "default_property_id")
|
|
30
|
+
require_options({"property_id": effective_property}, ["property_id"])
|
|
31
|
+
effective_format = resolve_output_format(output_format)
|
|
32
|
+
|
|
33
|
+
admin = get_admin_alpha_client()
|
|
34
|
+
settings = (
|
|
35
|
+
admin.properties()
|
|
36
|
+
.getUserProvidedDataSettings(
|
|
37
|
+
name=f"properties/{effective_property}/userProvidedDataSettings"
|
|
38
|
+
)
|
|
39
|
+
.execute()
|
|
40
|
+
)
|
|
41
|
+
output(
|
|
42
|
+
settings,
|
|
43
|
+
effective_format,
|
|
44
|
+
columns=[
|
|
45
|
+
"name",
|
|
46
|
+
"userProvidedDataCollectionEnabled",
|
|
47
|
+
"automaticallyDetectedDataCollectionEnabled",
|
|
48
|
+
],
|
|
49
|
+
headers=[
|
|
50
|
+
"Resource Name",
|
|
51
|
+
"Data Collection Enabled",
|
|
52
|
+
"Auto-Detection Enabled",
|
|
53
|
+
],
|
|
54
|
+
)
|
|
55
|
+
except Exception as e:
|
|
56
|
+
handle_error(e)
|
ga_cli/main.py
CHANGED
|
@@ -30,6 +30,7 @@ from .commands.properties import properties_app
|
|
|
30
30
|
from .commands.property_settings import property_settings_app
|
|
31
31
|
from .commands.reports import reports_app
|
|
32
32
|
from .commands.upgrade_cmd import upgrade_app
|
|
33
|
+
from .commands.user_provided_data import user_provided_data_app
|
|
33
34
|
|
|
34
35
|
app = typer.Typer(
|
|
35
36
|
name="ga",
|
|
@@ -65,6 +66,7 @@ app.add_typer(property_settings_app, name="property-settings")
|
|
|
65
66
|
app.add_typer(reports_app, name="reports")
|
|
66
67
|
app.add_typer(agent_app, name="agent")
|
|
67
68
|
app.add_typer(upgrade_app, name="upgrade")
|
|
69
|
+
app.add_typer(user_provided_data_app, name="user-provided-data")
|
|
68
70
|
app.add_typer(completions_app, name="completions")
|
|
69
71
|
|
|
70
72
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-analytics-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Command-line interface for Google Analytics 4
|
|
5
5
|
Project-URL: Homepage, https://github.com/daidalytics/google-analytics-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/daidalytics/google-analytics-cli
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
ga_cli/__init__.py,sha256=EVdY_GaBSodKq6rMkyKBcUzQLGOHaPDoyFqcDzlnTnY,241
|
|
2
|
-
ga_cli/main.py,sha256=
|
|
2
|
+
ga_cli/main.py,sha256=oCq2cZ_ykBuBfQOFaGZ693ghdeiSlv3hH_9SeSZdAnY,4691
|
|
3
3
|
ga_cli/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
ga_cli/api/client.py,sha256=GM53azK0cT0a_T9AYGmJfQZdCPanlXTnLXhKXUfLkWA,4375
|
|
5
5
|
ga_cli/auth/__init__.py,sha256=PItt3BDK4o4wDLyUllWt1Q5IjYaz3l_mTywj4w7YxII,764
|
|
@@ -35,6 +35,7 @@ ga_cli/commands/properties.py,sha256=AAp3Aa7g7ZZt2vecG3RxBzi8NTRO6bIaIUmV-Pzrfjo
|
|
|
35
35
|
ga_cli/commands/property_settings.py,sha256=TJbpmSZBUJ9NIYmaVprYIqw8X3-Lp8AC7t1VFD8Rros,6344
|
|
36
36
|
ga_cli/commands/reports.py,sha256=QE6hVHnv0maz-0Bt4owdlBvVe9Hp4C0dVslo-aMRViA,39198
|
|
37
37
|
ga_cli/commands/upgrade_cmd.py,sha256=RSYEz97sNKibVwiINsdX4j6TrEhNrg2cd9BWMGPNYJA,4876
|
|
38
|
+
ga_cli/commands/user_provided_data.py,sha256=2yCIdIp4krKZUcZrSE2hTmy1JEJrxXvgImdQX4BnV5A,1766
|
|
38
39
|
ga_cli/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
40
|
ga_cli/config/constants.py,sha256=p-1l8q7vv2FEbOGsi0NKJEEbuZprTlXSpU6h614KVHY,2926
|
|
40
41
|
ga_cli/config/store.py,sha256=fqB3AV3DcAz94sq2qXNEI8d6MBfXA945QFaYq25NraU,3294
|
|
@@ -45,7 +46,7 @@ ga_cli/utils/errors.py,sha256=l0Iwjmj1QqzLU032QAiVUnIbfntkxoIAZqyQCfgACCE,4465
|
|
|
45
46
|
ga_cli/utils/filters.py,sha256=tYtajCWC5CGPtrlpT95KA19y86a6cg0ejQXXjzguheg,8378
|
|
46
47
|
ga_cli/utils/output.py,sha256=0ihWQi7-kGSkNb-0OTFv_12ZmqVUjpZQLEGjvNrxUeE,6092
|
|
47
48
|
ga_cli/utils/pagination.py,sha256=w6_To6luCR54M04Uk_WFFydvProG2yGxN-CzkzSk9c4,2380
|
|
48
|
-
google_analytics_cli-0.2.
|
|
49
|
-
google_analytics_cli-0.2.
|
|
50
|
-
google_analytics_cli-0.2.
|
|
51
|
-
google_analytics_cli-0.2.
|
|
49
|
+
google_analytics_cli-0.2.4.dist-info/METADATA,sha256=s_P3qtCbsQaBtechmROfd-0BJ52-5c7mPfoIBscLt0c,12870
|
|
50
|
+
google_analytics_cli-0.2.4.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
51
|
+
google_analytics_cli-0.2.4.dist-info/entry_points.txt,sha256=J1Jvi1IZo4YujxqhyipvHz4NAepNhxZo7g_WyQIIOz0,39
|
|
52
|
+
google_analytics_cli-0.2.4.dist-info/RECORD,,
|
|
File without changes
|
{google_analytics_cli-0.2.2.dist-info → google_analytics_cli-0.2.4.dist-info}/entry_points.txt
RENAMED
|
File without changes
|