コード例 #1
0
        /// <summary>
        /// Updates the information about the specified namespace. Only the namespace visibility can be updated.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/namespaces/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 proximitybeacon service.</param>
        /// <param name="namespaceName">Resource name of this namespace. Namespaces names have the format: namespaces/namespace.</param>
        /// <param name="body">A valid proximitybeacon v1beta1 body.</param>
        /// <param name="optional">Optional paramaters.</param>        /// <returns>NamespaceResponse</returns>
        public static Namespace Update(proximitybeaconService service, string namespaceName, Namespace body, NamespacesUpdateOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (namespaceName == null)
                {
                    throw new ArgumentNullException(namespaceName);
                }

                // Building the initial request.
                var request = service.Namespaces.Update(body, namespaceName);

                // Applying optional parameters to the request.
                request = (NamespacesResource.UpdateRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Namespaces.Update failed.", ex);
            }
        }
コード例 #2
0
        /// <summary>
        /// List the diagnostics for a single beacon. You can also list diagnostics for all the beacons owned by your Google Developers Console project by using the beacon name `beacons/-`. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/diagnostics/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 proximitybeacon service.</param>
        /// <param name="beaconName">Beacon that the diagnostics are for.</param>
        /// <param name="optional">Optional paramaters.</param>        /// <returns>ListDiagnosticsResponseResponse</returns>
        public static ListDiagnosticsResponse List(proximitybeaconService service, string beaconName, DiagnosticsListOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (beaconName == null)
                {
                    throw new ArgumentNullException(beaconName);
                }

                // Building the initial request.
                var request = service.Diagnostics.List(beaconName);

                // Applying optional parameters to the request.
                request = (DiagnosticsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Diagnostics.List failed.", ex);
            }
        }
コード例 #3
0
        /// <summary>
        /// Gets the Proximity Beacon API's current public key and associated parameters used to initiate the Diffie-Hellman key exchange required to register a beacon that broadcasts the Eddystone-EID format. This key changes periodically; clients may cache it and re-use the same public key to provision and register multiple beacons. However, clients should be prepared to refresh this key when they encounter an error registering an Eddystone-EID beacon.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/v1beta1/getEidparams
        /// 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 proximitybeacon service.</param>
        /// <returns>EphemeralIdRegistrationParamsResponse</returns>
        public static EphemeralIdRegistrationParams GetEidparams(proximitybeaconService service)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Make the request.
                return(service.V1beta1.GetEidparams().Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request V1beta1.GetEidparams failed.", ex);
            }
        }
コード例 #4
0
        /// <summary>
        /// Given one or more beacon observations, returns any beacon information and attachments accessible to your application. Authorize by using the [API key](https://developers.google.com/beacons/proximity/how-tos/authorizing#APIKey) for the application.
        /// Documentation https://developers.google.com/proximitybeacon/v1beta1/reference/beaconinfo/getforobserved
        /// 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 proximitybeacon service.</param>
        /// <param name="body">A valid proximitybeacon v1beta1 body.</param>
        /// <returns>GetInfoForObservedBeaconsResponseResponse</returns>
        public static GetInfoForObservedBeaconsResponse Getforobserved(proximitybeaconService service, GetInfoForObservedBeaconsRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

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