<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using MusicPickerApp.Api.Util;
using Microsoft.AspNet.SignalR.Client;

namespace MusicPickerApp.Api {
    /// <summary>
    /// Singleton class which regroups every call to the server the application need to do (HttpRequests and WebSockets)
    ///</summary>
    public sealed class ApiClient {
        private static readonly string SERVER_URL = "http://localhost:50559";
        private static readonly ApiClient instance = new ApiClient();
        private static readonly Uri endpoint = new Uri(SERVER_URL);
        private string bearer;
        private bool authenticated;
        public Device CurrentDevice { get; set; }
        public Artist CurrentArtist { get; set; }
        public Album CurrentAlbum { get; set; }
        public Track CurrentTrack { get; set; }

        private HubConnection hubConnection;
        private IHubProxy hubProxy;
        public static ApiClient Instance {
            get {
                return instance;
            }
        }

        private ApiClient() {
        }

        public bool SignUp(string username, string password) {
            Uri uri = new Uri(endpoint, "/api/Account/Register");
            HttpContent content = new FormUrlEncodedContent(new[]
            {
                new KeyValuePair<string, string>("Username", username),<commit_msg>Added description for the server url<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using MusicPickerApp.Api.Util;
using Microsoft.AspNet.SignalR.Client;

namespace MusicPickerApp.Api {
    /// <summary>
    /// Singleton class which regroups every call to the server the application need to do (HttpRequests and WebSockets)
    /// The server url is the localhost if you want deploy the server on your computer if not you can find the address of our server by mail
    ///</summary>
    public sealed class ApiClient {
        private static readonly string SERVER_URL = "http://localhost:50559";
        private static readonly ApiClient instance = new ApiClient();
        private static readonly Uri endpoint = new Uri(SERVER_URL);
        private string bearer;
        private bool authenticated;
        public Device CurrentDevice { get; set; }
        public Artist CurrentArtist { get; set; }
        public Album CurrentAlbum { get; set; }
        public Track CurrentTrack { get; set; }

        private HubConnection hubConnection;
        private IHubProxy hubProxy;
        public static ApiClient Instance {
            get {
                return instance;
            }
        }

        private ApiClient() {
        }

        public bool SignUp(string username, string password) {
            Uri uri = new Uri(endpoint, "/api/Account/Register");
            HttpContent content = new FormUrlEncodedContent(new[]
            {
                new KeyValuePair<string, string>("Username", username),
{'fraction_non_alphanumeric': 0.07837837837837838, 'fraction_numerical': 0.003003003003003003, 'mean_word_length': 2.6970033296337403, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6638050', 'n_tokens_mistral': 835, 'n_tokens_neox': 829, 'n_words': 289}