Пример #1
0
        /// <summary>
        /// Runs a stored query to generate a report.
        /// Documentation https://developers.google.com/doubleclickbidmanager/v1/reference/queries/runquery
        /// 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 Doubleclickbidmanager service.</param>
        /// <param name="queryId">Query ID to run.</param>
        /// <param name="body">A valid Doubleclickbidmanager v1 body.</param>
        public static void Runquery(DoubleclickbidmanagerService service, string queryId, RunQueryRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (queryId == null)
                {
                    throw new ArgumentNullException(queryId);
                }

                // Make the request.
                service.Queries.Runquery(body, queryId).Execute();
            }
            catch (Exception ex)
            {
                throw new Exception("Request Queries.Runquery failed.", ex);
            }
        }
Пример #2
0
        /// <summary>
        /// Retrieves stored queries.
        /// Documentation https://developers.google.com/doubleclickbidmanager/v1/reference/queries/listqueries
        /// 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 Doubleclickbidmanager service.</param>
        /// <returns>ListQueriesResponseResponse</returns>
        public static ListQueriesResponse Listqueries(DoubleclickbidmanagerService service)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Make the request.
                return(service.Queries.Listqueries().Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Queries.Listqueries failed.", ex);
            }
        }
Пример #3
0
        /// <summary>
        /// Retrieves stored reports.
        /// Documentation https://developers.google.com/doubleclickbidmanager/v1/reference/reports/listreports
        /// 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 Doubleclickbidmanager service.</param>
        /// <param name="queryId">Query ID with which the reports are associated.</param>
        /// <returns>ListReportsResponseResponse</returns>
        public static ListReportsResponse Listreports(DoubleclickbidmanagerService service, string queryId)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (queryId == null)
                {
                    throw new ArgumentNullException(queryId);
                }

                // Make the request.
                return(service.Reports.Listreports(queryId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Reports.Listreports failed.", ex);
            }
        }
Пример #4
0
        /// <summary>
        /// Uploads line items in CSV format.
        /// Documentation https://developers.google.com/doubleclickbidmanager/v1/reference/lineitems/uploadlineitems
        /// 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 Doubleclickbidmanager service.</param>
        /// <param name="body">A valid Doubleclickbidmanager v1 body.</param>
        /// <returns>UploadLineItemsResponseResponse</returns>
        public static UploadLineItemsResponse Uploadlineitems(DoubleclickbidmanagerService service, UploadLineItemsRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Lineitems.Uploadlineitems(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Lineitems.Uploadlineitems failed.", ex);
            }
        }
Пример #5
0
        /// <summary>
        /// Retrieves entities in SDF format.
        /// Documentation https://developers.google.com/doubleclickbidmanager/v1/reference/sdf/download
        /// 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 Doubleclickbidmanager service.</param>
        /// <param name="body">A valid Doubleclickbidmanager v1 body.</param>
        /// <returns>DownloadResponseResponse</returns>
        public static DownloadResponse Download(DoubleclickbidmanagerService service, DownloadRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Sdf.Download(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Sdf.Download failed.", ex);
            }
        }
Пример #6
0
        /// <summary>
        /// Creates a query.
        /// Documentation https://developers.google.com/doubleclickbidmanager/v1/reference/queries/createquery
        /// 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 Doubleclickbidmanager service.</param>
        /// <param name="body">A valid Doubleclickbidmanager v1 body.</param>
        /// <returns>QueryResponse</returns>
        public static Query Createquery(DoubleclickbidmanagerService service, Query body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Queries.Createquery(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Queries.Createquery failed.", ex);
            }
        }
Пример #7
0
        /// <summary>
        /// Retrieves a stored query.
        /// Documentation https://developers.google.com/doubleclickbidmanager/v1/reference/queries/getquery
        /// 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 Doubleclickbidmanager service.</param>
        /// <param name="queryId">Query ID to retrieve.</param>
        /// <returns>QueryResponse</returns>
        public static Query Getquery(DoubleclickbidmanagerService service, string queryId)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (queryId == null)
                {
                    throw new ArgumentNullException(queryId);
                }

                // Make the request.
                return(service.Queries.Getquery(queryId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Queries.Getquery failed.", ex);
            }
        }