public void Init()
 {
     string[] keys = File.ReadAllLines("Resources/keys.dat");
     api      = new OsuApi("2558", keys[0], keys[1]);
     replays  = new ServerReplayDb(api, "serverdata");
     beatmaps = new ServerBeatmapDb(api, "serverdata");
 }
Example #2
0
 public void Init()
 {
     string[] keys = File.ReadAllLines("Resources/keys.dat");
     client          = new HttpClient();
     Logger.Instance = new TestLogger();
     api             = new OsuApi(client, "2558", keys[0], keys[1]);
     replays         = new ServerReplayDb(api, Path.Combine(root, "serverdata"));
     beatmaps        = new ServerBeatmapDb(api, Path.Combine(root, "serverdata"), true);
 }
Example #3
0
        public ServerBeatmapDb(OsuApi api, string serverDir)
        {
            this.api = api;
            folder   = serverDir;
            string db = Path.Combine(serverDir, "beatmaps.db");

            if (File.Exists(db))
            {
                hashes = JsonConvert.DeserializeObject <Dictionary <string, string> >(File.ReadAllText(db));
            }
            else
            {
                hashes = new Dictionary <string, string>();
            }
        }
Example #4
0
 public ServerReplayDb(OsuApi api, string serverFolder)
 {
     this.api          = api;
     this.serverFolder = serverFolder;
 }