Esempio n. 1
0
        /// <summary>
        /// Initializes a new isntance of the <see cref="SoundCloudClient"/> class.
        /// </summary>
        /// 
        /// <param name="credentials">Required credentials for authentication.</param>
        public SoundCloudClient(SoundCloudCredentials credentials)
        {
            Credentials = credentials;
            SoundCloudClientID = credentials.ClientID;

            EnableGZip = true;
        }
        /// <summary>
        /// Initializes a new isntance of the <see cref="SoundCloudClient"/> class.
        /// </summary>
        ///
        /// <param name="credentials">Required credentials for authentication.</param>
        public SoundCloudClient(SoundCloudCredentials credentials)
        {
            Credentials        = credentials;
            SoundCloudClientID = credentials.ClientID;

            EnableGZip = true;
        }
Esempio n. 3
0
 static void Main(string[] args)
 {
     //fill credentials
     SoundCloudCredentials credentials = new SoundCloudCredentials(ClientId, ClientSecret, Username, Password);
     //create client
     SoundCloudClient client = new SoundCloudClient(credentials);
     //login to soundcloud
     SoundCloudAccessToken token = client.Authenticate();
     
     //fetch some data
     if (client.IsAuthenticated)
     {
         //Fetch current user info
         var mySelf = User.Me();
         //search for tracks
         string searchFor = "electro swing";
         //execute search
         List<Track> searchResults = Track.Search(searchFor, null, Filter.All, "", "", null, null, null, null, DateTime.MinValue, DateTime.Now, null, null, null);
         //iterate in tracks and fetch details again
         foreach (int trackId in searchResults.Select(track => track.Id))
         {
             Track track = Track.GetTrack(trackId);
             //here you can play a track or do something else ;)
         }
     }
     //wait for user input
     Console.ReadLine();
 }
 /// <summary>
 /// Initializes a new isntance of the <see cref="SoundCloudClient"/> class.
 /// </summary>
 /// 
 /// <param name="credentials">Required credentials for authentication.</param>
 public SoundCloudClient(SoundCloudCredentials credentials)
 {
     Credentials = credentials;
     SoundCloudClientID = credentials.ClientID;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new isntance of the <see cref="SoundCloudClient"/> class.
 /// </summary>
 ///
 /// <param name="credentials">Required credentials for authentication.</param>
 public SoundCloudClient(SoundCloudCredentials credentials)
 {
     Credentials        = credentials;
     SoundCloudClientID = credentials.ClientID;
 }