Example #1
0
        public HttpAsService(SecondBot MainBot, JsonConfig BotConfig, bool running_in_docker)
        {
            Bot    = MainBot;
            Config = BotConfig;

            Tokens = new TokenStorage();
            // Load scoped tokens
            if (running_in_docker == true)
            {
                // using ENV values
                loadScopedTokensFromENV();
            }
            else
            {
                // from file
                loadScopedTokensFromFile();
            }

            // Our web server is disposable
            try
            {
                if (killedLogger == false)
                {
                    killedLogger = true;
                    Swan.Logging.Logger.UnregisterLogger <ConsoleLogger>();
                }
                WebServer server = CreateWebServer(Config.Http_Host);
                // Once we've registered our modules and configured them, we call the RunAsync() method.
                LogFormater.Info("Starting HTTP service: " + Config.Http_Host);
                server.RunAsync();
                while (Bot.KillMe == false)
                {
                    Thread.Sleep(3000);
                }
            }
            catch (Exception e)
            {
                LogFormater.Info("HTTP service has ended because: " + e.Message);
            }
        }
Example #2
0
 public WebApiControllerWithTokens(SecondBot mainbot, TokenStorage setuptokens)
 {
     bot    = mainbot;
     tokens = setuptokens;
 }
Example #3
0
 public HTTP_Inventory(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #4
0
 public HTTP_Dialogs(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #5
0
 public HTTP_Estate(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #6
0
 public HTTP_Animation(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #7
0
 public HTTP_Avatars(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #8
0
 public HTTP_Parcel(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #9
0
 public Http_Funds(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #10
0
 public HTTP_Movement(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #11
0
 public HTTP_Notecard(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #12
0
 public HTTP_Friends(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #13
0
 public HTTP_StreamAdmin(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }
Example #14
0
 public HTTP_Group(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens)
 {
 }