Ejemplo n.º 1
0
        /// <summary>Snippet for GetFeedAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetFeedResourceNamesAsync()
        {
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            FeedName resourceName = FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]");
            // Make the request
            Feed response = await feedServiceClient.GetFeedAsync(resourceName);
        }
        /// <summary>Snippet for GetFeedAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetFeedAsync()
        {
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER]/feeds/[FEED]";
            // Make the request
            Feed response = await feedServiceClient.GetFeedAsync(resourceName);
        }
        /// <summary>Snippet for GetFeedAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetFeedRequestObjectAsync()
        {
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetFeedRequest request = new GetFeedRequest
            {
                ResourceNameAsFeedName = FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"),
            };
            // Make the request
            Feed response = await feedServiceClient.GetFeedAsync(request);
        }
        /// <summary>Snippet for MutateFeedsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MutateFeedsAsync()
        {
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            IEnumerable <FeedOperation> operations = new FeedOperation[]
            {
                new FeedOperation(),
            };
            // Make the request
            MutateFeedsResponse response = await feedServiceClient.MutateFeedsAsync(customerId, operations);
        }
Ejemplo n.º 5
0
        /// <summary>Snippet for GetFeedAsync</summary>
        public async Task GetFeedAsync()
        {
            // Snippet: GetFeedAsync(string, CallSettings)
            // Additional: GetFeedAsync(string, CancellationToken)
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER_ID]/feeds/[FEED_ID]";
            // Make the request
            Feed response = await feedServiceClient.GetFeedAsync(resourceName);

            // End snippet
        }
Ejemplo n.º 6
0
        /// <summary>Snippet for GetFeedAsync</summary>
        public async Task GetFeedResourceNamesAsync()
        {
            // Snippet: GetFeedAsync(FeedName, CallSettings)
            // Additional: GetFeedAsync(FeedName, CancellationToken)
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            FeedName resourceName = FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]");
            // Make the request
            Feed response = await feedServiceClient.GetFeedAsync(resourceName);

            // End snippet
        }
Ejemplo n.º 7
0
        /// <summary>Snippet for MutateFeedsAsync</summary>
        public async Task MutateFeedsAsync()
        {
            // Snippet: MutateFeedsAsync(string, IEnumerable<FeedOperation>, CallSettings)
            // Additional: MutateFeedsAsync(string, IEnumerable<FeedOperation>, CancellationToken)
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            string customerId = "";
            IEnumerable <FeedOperation> operations = new FeedOperation[]
            {
                new FeedOperation(),
            };
            // Make the request
            MutateFeedsResponse response = await feedServiceClient.MutateFeedsAsync(customerId, operations);

            // End snippet
        }
        /// <summary>Snippet for MutateFeedsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MutateFeedsRequestObjectAsync()
        {
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateFeedsRequest request = new MutateFeedsRequest
            {
                CustomerId = "",
                Operations =
                {
                    new FeedOperation(),
                },
                PartialFailure = false,
                ValidateOnly   = false,
            };
            // Make the request
            MutateFeedsResponse response = await feedServiceClient.MutateFeedsAsync(request);
        }
        /// <summary>Snippet for MutateFeedsAsync</summary>
        public async Task MutateFeedsRequestObjectAsync()
        {
            // Snippet: MutateFeedsAsync(MutateFeedsRequest, CallSettings)
            // Additional: MutateFeedsAsync(MutateFeedsRequest, CancellationToken)
            // Create client
            FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateFeedsRequest request = new MutateFeedsRequest
            {
                CustomerId = "",
                Operations =
                {
                    new FeedOperation(),
                },
                PartialFailure = false,
                ValidateOnly   = false,
            };
            // Make the request
            MutateFeedsResponse response = await feedServiceClient.MutateFeedsAsync(request);

            // End snippet
        }