Ejemplo n.º 1
0
        /// <summary>
        /// Deletes an existing object of the specified object type.
        /// </summary>
        /// <param name="objectType">The object type.</param>
        /// <param name="objectId">The ID of the specific object.</param>
        public async Task DeleteAsync(ApiObjectType objectType, int objectId, CancellationToken cancellationToken = default)
        {
            var query = new Dictionary <string, object?>
            {
                { "objectID", (int)objectType },
                { "id", objectId }
            };

            await _apiRequest.DeleteAsync <object>(
                "object", query, false, cancellationToken).ConfigureAwait(false);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Deletes an existing object of the specified object type.
        /// </summary>
        /// <param name="objectType">The object type.</param>
        /// <param name="objectId">The ID of the specific object.</param>
        public async Task DeleteAsync(ApiObjectType objectType, int objectId)
        {
            var query = new Dictionary <string, object?>
            {
                { "objectID", (int)objectType },
                { "id", objectId }
            };

            await _apiRequest.DeleteAsync <object>(
                "object", query, encodeJson : false).ConfigureAwait(false);
        }