/// <summary> /// Returns the specified available feature for user by name. /// </summary> /// <remarks> /// <br/>**Required scope**: None /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='featureName'> /// The feature name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AvailableFeature> GetAvailableFeatureByNameAsync(this IAvailableFeatures operations, string featureName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAvailableFeatureByNameWithHttpMessagesAsync(featureName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Datasets = new Datasets(this); Imports = new Imports(this); Reports = new Reports(this); Dashboards = new Dashboards(this); Tiles = new Tiles(this); Apps = new Apps(this); Dataflows = new Dataflows(this); Gateways = new Gateways(this); Groups = new Groups(this); Capacities = new Capacities(this); AvailableFeatures = new AvailableFeatures(this); BaseUri = new System.Uri("https://api.powerbi.com"); SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <summary> /// Returns a list of available features for the user /// </summary> /// <remarks> /// <br/>**Required scope**: None /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListAvailableFeature> GetAvailableFeaturesAsync(this IAvailableFeatures operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAvailableFeaturesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the specified available feature for user by name. /// </summary> /// <remarks> /// <br/>**Required scope**: None /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='featureName'> /// The feature name /// </param> public static AvailableFeature GetAvailableFeatureByName(this IAvailableFeatures operations, string featureName) { return(operations.GetAvailableFeatureByNameAsync(featureName).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of available features for the user /// </summary> /// <remarks> /// <br/>**Required scope**: None /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static ODataResponseListAvailableFeature GetAvailableFeatures(this IAvailableFeatures operations) { return(operations.GetAvailableFeaturesAsync().GetAwaiter().GetResult()); }