Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.Title = "Destiny 2 Searcher";

            Api.UpdateDatabaseIfRequired().Wait();

            SetupStartingLoop();
        }
Exemplo n.º 2
0
        public static void Register(HttpConfiguration config)
        {
            // Web API configuration and services

            // Web API routes
            config.MapHttpAttributeRoutes();

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{action}/{id}",
                defaults: new { id = RouteParameter.Optional }
                );

            var ApiKey = Properties.Settings.Default.ApiKey;

            _DestinyApi = new Destiny2Api(ApiKey,
                                          new UserAgentHeader("Destiny 2 Party Viewer",
                                                              Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                                                              "Web API", 1, "https://www.d2-partyviewer.com", "*****@*****.**")
                                          , new DirectoryInfo(HttpContext.Current.Server.MapPath("~")));

            _DestinyApi.UpdateDatabaseIfRequired();
        }