Пример #1
0
        /// <summary>
        /// Modify the list of owners for your website or domain.
        /// Documentation https://developers.google.com/siteverification/v1/reference/webResource/update
        /// 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 Siteverification service.</param>
        /// <param name="id">The id of a verified site or domain.</param>
        /// <param name="body">A valid Siteverification v1 body.</param>
        /// <returns>SiteVerificationWebResourceResourceResponse</returns>
        public static SiteVerificationWebResourceResource Update(SiteverificationService service, string id, SiteVerificationWebResourceResource body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (id == null)
                {
                    throw new ArgumentNullException(id);
                }

                // Make the request.
                return(service.WebResource.Update(body, id).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request WebResource.Update failed.", ex);
            }
        }
Пример #2
0
        /// <summary>
        /// Get the list of your verified websites and domains.
        /// Documentation https://developers.google.com/siteverification/v1/reference/webResource/list
        /// 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 Siteverification service.</param>
        /// <returns>SiteVerificationWebResourceListResponseResponse</returns>
        public static SiteVerificationWebResourceListResponse List(SiteverificationService service)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Make the request.
                return(service.WebResource.List().Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request WebResource.List failed.", ex);
            }
        }
Пример #3
0
        /// <summary>
        /// Relinquish ownership of a website or domain.
        /// Documentation https://developers.google.com/siteverification/v1/reference/webResource/delete
        /// 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 Siteverification service.</param>
        /// <param name="id">The id of a verified site or domain.</param>
        public static void Delete(SiteverificationService service, string id)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (id == null)
                {
                    throw new ArgumentNullException(id);
                }

                // Make the request.
                service.WebResource.Delete(id).Execute();
            }
            catch (Exception ex)
            {
                throw new Exception("Request WebResource.Delete failed.", ex);
            }
        }
Пример #4
0
        /// <summary>
        /// Get a verification token for placing on a website or domain.
        /// Documentation https://developers.google.com/siteverification/v1/reference/webResource/getToken
        /// 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 Siteverification service.</param>
        /// <param name="body">A valid Siteverification v1 body.</param>
        /// <returns>SiteVerificationWebResourceGettokenResponseResponse</returns>
        public static SiteVerificationWebResourceGettokenResponse GetToken(SiteverificationService service, SiteVerificationWebResourceGettokenRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

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