public FeedlySharpHttpClient(FeedlyOptions options) : this(new FeedlyAuthenticator(options)) { }
public FeedlyAuthenticator(FeedlyOptions feedlyOptions) { this.feedlyOptions = feedlyOptions; }
/// <summary> /// Uses: configuration["Feedly:AccessToken"] /// </summary> /// <param name="configuration"></param> public FeedlySharpHttpClient(IConfiguration configuration) : this(FeedlyOptions.Create(configuration[$"Feedly:{nameof(FeedlyOptions.AccessToken)}"], configuration[$"Feedly:{nameof(FeedlyOptions.RefreshToken)}"], configuration[$"Feedly:{nameof(FeedlyOptions.UserID)}"], configuration[$"Feedly:{nameof(FeedlyOptions.Domain)}"])) { }
public static IServiceCollection AddFeedlySharp(this IServiceCollection services, FeedlyOptions feedlyOptions) { services.AddSingleton <IFeedlySharpHttpClient>(new FeedlySharpHttpClient(feedlyOptions)); return(services); }