コード例 #1
0
 public TransfersByGameWeek(
     IOptions <FplbotOptions> fplbotOptions,
     ILeagueClient leagueClient,
     IPlayerClient playerClient,
     ITransfersClient transfersClient,
     IEntryClient entryClient
     )
 {
     _fplbotOptions   = fplbotOptions.Value;
     _leagueClient    = leagueClient;
     _playerClient    = playerClient;
     _transfersClient = transfersClient;
     _entryClient     = entryClient;
 }
コード例 #2
0
        public static ISlackbotWorkerBuilder AddFplBot(this ISlackbotWorkerBuilder builder, Action <FplbotOptions> configure)
        {
            builder.Services.Configure <FplbotOptions>(configure);

            var opts = new FplbotOptions();

            configure(opts);
            builder.Services.AddFplApiClient(o =>
            {
                o.Login    = opts.Login;
                o.Password = opts.Password;
            });
            builder.AddCommon();

            return(builder);
        }