How to use lightkurve for asteroseismology with Kepler and K2 data