This project is read-only.

Documentation

Reference

Just include the NeonMika.EightTracks.dll (You find it in NeonMika.EightTracks\bin\x86\Debug) in your project.
Instead of that you could include the whole library project using NeonMika.EightTracks.csproj (You find it in NeonMika.EightTracks) in your project.

Structure

This library contains the following classes:

Classes.jpg Responses.jpg

A Respose contains the following Properties:
  • id
  • path
  • restful_url
  • totalentries
  • page
  • perpage
  • nextpage
  • previouspage
  • totalpages
  • canonical_path
  • status
  • errors
  • notices
  • logged_in
  • name
  • api_warning
  • api_version

As you can see, for every object type we have a special Response, for example MixResponse.
They all inherit from Response and additionally contain their specific object, so MixResponse has all Response properties and a Mix property, TrackResponse has all Response properties and a Track property.

Useage

All the communication with the 8tracks.com server is managed in the EightTracksConnection class.
You can create an instance by using the Constructor
  • public EightTracksConnection(string developerKey)
Please also note that this class needs write access to the disc because it will write down the playtoken on the first application start in "playtoken.txt" in the root folder (in the same folder as your .exe).
This token is needed by 8tracks.com, so they can keep track on which user is at which song in which mix.
By using the Authenticate method, you can LogIn a user:
  • public bool Authenticate(string name, string password)
The following picture contains a list of all methods you can use to receive data from 8tracks.com:
EightTracksConnection.png

All methods are tested using this Testing code. Have a look at it if you want to see how all features work.

Best practice

  • Create EightTracksConnection using your own developer API key.
  • Ask the user to log in and use the EightTracksConnection's Authenticate (otherwise you can't like, follow, etc.)
  • Show mixes using GetMixes(...)
  • Use the Set class, which contains the current Track to play and use GetNextTrackInSet(...) to get the next track.
  • Don't forget to use Report30SecondsPlay(...) after playing 30 seconds of a song

Last edited Apr 5, 2013 at 6:26 PM by NeonMika, version 11

Comments

No comments yet.