Module: Google::Analytics::Data::V1beta::AnalyticsData::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/analytics/data/v1beta/analytics_data/paths.rb

Overview

Path helper methods for the AnalyticsData API.

Instance Method Summary collapse

Instance Method Details

#audience_export_path(property:, audience_export:) ⇒ ::String

Create a fully-qualified AudienceExport resource string.

The resource will be in the following format:

properties/{property}/audienceExports/{audience_export}

Parameters:

  • property (String)
  • audience_export (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/analytics/data/v1beta/analytics_data/paths.rb', line 38

def audience_export_path property:, audience_export:
  raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"

  "properties/#{property}/audienceExports/#{audience_export}"
end

#metadata_path(property:) ⇒ ::String

Create a fully-qualified Metadata resource string.

The resource will be in the following format:

properties/{property}/metadata

Parameters:

  • property (String)

Returns:

  • (::String)


54
55
56
# File 'lib/google/analytics/data/v1beta/analytics_data/paths.rb', line 54

def  property:
  "properties/#{property}/metadata"
end

#property_path(property:) ⇒ ::String

Create a fully-qualified Property resource string.

The resource will be in the following format:

properties/{property}

Parameters:

  • property (String)

Returns:

  • (::String)


68
69
70
# File 'lib/google/analytics/data/v1beta/analytics_data/paths.rb', line 68

def property_path property:
  "properties/#{property}"
end