Esempio n. 1
0
        /// <summary>
        /// Fetches analytics stats of a short Dynamic Link for a givenduration. Metrics include number of clicks, redirects, installs,app first opens, and app reopens.
        /// Documentation https://developers.google.com/firebasedynamiclinks/v1/reference/v1/getLinkStats
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Firebasedynamiclinks service.</param>
        /// <param name="dynamicLink">Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>DynamicLinkStatsResponse</returns>
        public static DynamicLinkStats GetLinkStats(FirebasedynamiclinksService service, string dynamicLink, V1GetLinkStatsOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (dynamicLink == null)
                {
                    throw new ArgumentNullException(dynamicLink);
                }

                // Building the initial request.
                var request = service.V1.GetLinkStats(dynamicLink);

                // Applying optional parameters to the request.
                request = (V1Resource.GetLinkStatsRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request V1.GetLinkStats failed.", ex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Get iOS strong/weak-match info for post-install attribution.
        /// Documentation https://developers.google.com/firebasedynamiclinks/v1/reference/v1/installAttribution
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Firebasedynamiclinks service.</param>
        /// <param name="body">A valid Firebasedynamiclinks v1 body.</param>
        /// <returns>GetIosPostInstallAttributionResponseResponse</returns>
        public static GetIosPostInstallAttributionResponse InstallAttribution(FirebasedynamiclinksService service, GetIosPostInstallAttributionRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.V1.InstallAttribution(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request V1.InstallAttribution failed.", ex);
            }
        }
        /// <summary>
        /// Creates a short Dynamic Link given either a valid long Dynamic Link ordetails such as Dynamic Link domain, Android and iOS app information.The created short Dynamic Link will not expire.Repeated calls with the same long Dynamic Link or Dynamic Link informationwill produce the same short Dynamic Link.The Dynamic Link domain in the request must be owned by requester'sFirebase project.
        /// Documentation https://developers.google.com/firebasedynamiclinks/v1/reference/shortLinks/create
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Firebasedynamiclinks service.</param>
        /// <param name="body">A valid Firebasedynamiclinks v1 body.</param>
        /// <returns>CreateShortDynamicLinkResponseResponse</returns>
        public static CreateShortDynamicLinkResponse Create(FirebasedynamiclinksService service, CreateShortDynamicLinkRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.ShortLinks.Create(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request ShortLinks.Create failed.", ex);
            }
        }