/// <summary> /// Similar to Get User but with authenticated user (token owner) as user id. /// <code>scope = identify</code> /// </summary> /// <param name="gameMode"><see cref="GameMode"/>. User default mode will be used if not specified.</param> /// <returns></returns> public User GetOwnData(GameMode?gameMode = null) { string route = "/me/" + gameMode?.ToParamString(); var json = _httpClient.HttpGet(OsuClientV2.BaseUri + route); var obj = JsonConvert.DeserializeObject <User>(json); return(obj); }
/// <summary> /// Similar to Get User but with authenticated user (token owner) as user id. /// <code>scope = identify</code> /// </summary> /// <param name="id">b id</param> /// <returns></returns> public Beatmap GetBeatmap(int id) { string route = $"/beatmaps/{id}"; var json = _httpClient.HttpGet(OsuClientV2.BaseUri + route); var obj = JsonConvert.DeserializeObject <Beatmap>(json); return(obj); }
/// <summary> /// Get clients which were created. /// </summary> public void GetClients() { string json = HttpClient.HttpGet( url: ClientLink, argsHeader: new Dictionary <string, string> { [TokenKey] = CsrfToken, } ); }
private static string GetJson(string url) { return(HttpClientUtility.HttpGet(url)); }