Querying the Beatport API

Simple catalog query:
Dim beatport As New BeatportNet.Beatport()
Dim query As New BeatportNet.Catalog.Search.CatalogQuery("jamiroquai+a+funk+odyssey")
Dim res As BeatportNet.Catalog.Search.SearchResponse = beatport.Search(query)

If res.Results.Count > 0 Then
    'TODO
End If
Applying filters:
query.Filters.Add(BeatportNet.Catalog.Search.QueryFilter.genreId, "5")
Applying sorting:
Dim sort As BeatportNet.Catalog.Search.QuerySort = BeatportNet.Catalog.Search.QuerySort.ReleaseDate

'or another way
Dim sortDesc As New BeatportNet.Catalog.Search.QuerySort(
                BeatportNet.Catalog.Search.QuerySortField.releaseDate,
                BeatportNet.Catalog.Search.QuerySortDirection.descending)

query.Sort.Add(sort)
Artist details:
Dim artist As BeatportNet.Catalog.Artist = beatport.GetArtist(38843)

Last edited Feb 18, 2013 at 8:09 PM by pistipanko, version 10

Comments

No comments yet.