예제 #1
0
 public FeedlySharpHttpClient(FeedlyOptions options) : this(new FeedlyAuthenticator(options))
 {
 }
예제 #2
0
 public FeedlyAuthenticator(FeedlyOptions feedlyOptions)
 {
     this.feedlyOptions = feedlyOptions;
 }
예제 #3
0
 /// <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)}"]))
 {
 }
예제 #4
0
        public static IServiceCollection AddFeedlySharp(this IServiceCollection services, FeedlyOptions feedlyOptions)
        {
            services.AddSingleton <IFeedlySharpHttpClient>(new FeedlySharpHttpClient(feedlyOptions));

            return(services);
        }