def upload track
      if track.playlist_id and track.playlist_token
        response = JSON.parse(RestClient.post(UPLOAD_BASE, audioFile: track.file, title: track.title, playlistId: track.playlist_id,
                  playlistUploadToken: track.playlist_token, order: track.order, description: track.description,
                  longitude: track.longitude, latitude: track.latitude))
      else
        response = JSON.parse(RestClient.post(UPLOAD_BASE, audioFile: track.file, title: track.title,
                  order: track.order, description: track.description, longitude: track.longitude, latitude: track.latitude))
      end
      TrackUser.new(response)
    end
def upload track
      if track.playlist_id and track.playlist_token
        response = JSON.parse(RestClient.post(UPLOAD_BASE, audioFile: track.file, title: track.title, playlistId: track.playlist_id,
                  playlistUploadToken: track.playlist_token, order: track.order, description: track.description,
                  longitude: track.longitude, latitude: track.latitude))
      else
        response = JSON.parse(RestClient.post(UPLOAD_BASE, audioFile: track.file, title: track.title,
                  order: track.order, description: track.description, longitude: track.longitude, latitude: track.latitude))
      end
      TrackUser.new(response)
    end
uploads a TrackUpload object, returns a TrackUser object