public Task <SoundCloudList <User> > GetAllAsync(UserQueryBuilder builder) { builder.Path = UsersPath; builder.Paged = true; return(GetPage <User>(builder.BuildUri())); }
public async Task <User> GetAsync(long userId) { var builder = new UserQueryBuilder { Path = string.Format(UserPath, userId) }; return(await Gateway.SendGetRequestAsync <User>(builder.BuildUri())); }
public void Test_No_Parameters() { var builder = new UserQueryBuilder(); var query = builder.BuildUri(); Assert.That(query.ToString(), Is.EqualTo("https://api.soundcloud.com/?")); }
public async Task <IEnumerable <User> > GetAsync(UserQueryBuilder queryBuilder) { EnsureClientId(); queryBuilder.Path = UsersPath; queryBuilder.Paged = true; return(await GetListAsync <User>(queryBuilder.BuildUri())); }
public IEnumerable <User> Get(UserQueryBuilder queryBuilder) { EnsureClientId(); queryBuilder.Path = UsersPath; queryBuilder.Paged = true; return(GetList <User>(queryBuilder.BuildUri())); }
public Task <SoundCloudList <Playlist> > GetPlaylistsAsync(User user, int limit = SoundCloudQueryBuilder.MaxLimit) { user.ValidateGet(); var builder = new UserQueryBuilder { Path = string.Format(UserPlaylistsPath, user.Id), Paged = true, Limit = limit }; return(GetPage <Playlist>(builder.BuildUri())); }
public async Task <User> GetAsync(int userId) { EnsureClientId(); var builder = new UserQueryBuilder(); builder.Path = string.Format(UserPath, userId); return(await GetByIdAsync <User>(builder.BuildUri())); }
public User Get(int userId) { EnsureClientId(); var builder = new UserQueryBuilder(); builder.Path = string.Format(UserPath, userId); return(GetById <User>(builder.BuildUri())); }
public void Test_SearchString() { var builder = new UserQueryBuilder(); builder.SearchString = "SearchString"; var query = builder.BuildUri(); Assert.That(query.ToString(), Is.EqualTo("https://api.soundcloud.com/?q=SearchString")); }
public void Test_Paged() { var builder = new UserQueryBuilder(); builder.Paged = true; builder.SearchString = "SearchString"; var query = builder.BuildUri(); Assert.That(query.ToString(), Is.EqualTo("https://api.soundcloud.com/?limit=200&q=SearchString&linked_partitioning=1")); }
public async Task <IEnumerable <Comment> > GetCommentsAsync(User user) { EnsureClientId(); Validate(user.ValidateGet); var builder = new UserQueryBuilder(); builder.Path = string.Format(UserCommentsPath, user.id); builder.Paged = true; return(await GetListAsync <Comment>(builder.BuildUri())); }
public IEnumerable <WebProfile> GetWebProfiles(User user) { EnsureClientId(); Validate(user.ValidateGet); var builder = new UserQueryBuilder(); builder.Path = string.Format(UserWebProfilesPath, user.id); builder.Paged = true; return(GetList <WebProfile>(builder.BuildUri())); }
public IEnumerable <Playlist> GetPlaylists(User user) { EnsureClientId(); Validate(user.ValidateGet); var builder = new UserQueryBuilder(); builder.Path = string.Format(UserPlaylistsPath, user.id); builder.Paged = true; return(GetList <Playlist>(builder.BuildUri())); }