Exemplo n.º 1
0
 private API()
 {
     userAPI        = new UserAPI();
     songAPI        = new SongAPI();
     channelAPI     = new ChannelAPI();
     openChannelAPI = new OpenChannelAPI();
     moreInfoAPI    = new MoreInfoAPI();
 }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            // Load configs
            LoadConfigsAsync();

            // Create builder
            var builder = WebApplication.CreateBuilder(args);

            builder.Host.ConfigureWebHostDefaults(webBuilder =>
            {
                webBuilder.UseUrls("http://localhost:3000", "https://localhost:3001");
            });

            // Set up services
            ConfigureServices(builder);

            // Build web app
            var app = builder.Build();

            // Configure application
            ConfigureApp(app);

            app.MapGet("/api/ping", () => "pong");

            // Add API routes
            BaseAPI.AddRoutes(app);
            UploadAPI.AddRoutes(app);
            ChannelAPI.AddRoutes(app);
            CategoryAPI.AddRoutes(app);
            PlanetAPI.AddRoutes(app);
            UserAPI.AddRoutes(app);
            MemberAPI.AddRoutes(app);
            RoleAPI.AddRoutes(app);
            EmbedAPI.AddRoutes(app);

            // Run
            app.Run();
        }
 public ChannelData(ChannelAPI channelAPI, EntityId entityId, ulong objectId, ChannelAPI.ChannelType channelType) : base(entityId, objectId, channelType)
 {
     this.m_channelState = new bnet.protocol.channel.ChannelState();
     this.m_members      = new Map <EntityId, Member>();
     this.m_channelAPI   = channelAPI;
 }