Bootstraponline seems to be intentionally unhelpful, so I'll spend some time on this, as the documentation is pretty spotty in this regard. All of my examples are using java/junit, because that's what I use, but I'd expect it maps reasonably well to whatever your language of choice is.
First, the AppiumDriver has a getOrientation() method that will return a ScreenOrientation object. ScreenOrientation has a value() method that returns either "portrait" or "landscape". So you can pretty easily tell what your device's current orientation is by calling driver.getOrientation().value().
For element-relative swiping, you can locate whatever element you're trying to interact with, and then call element.getLocation().getX() and element.getLocation().getY() to get the upper-left coordinates of the element. element.getSize().getWidth() and element.getSize().getHeight() will allow you to find the width and height of the element, and from there it's pretty easy to figure out the x and y for your relative swipes. You will probably want to do a little bit of "safety padding" on those values just to make sure that you're not clicking on the absolute right or left edge of the element you're trying to interact with.
You should also be able to call driver.rotate("LANDSCAPE") or driver.rotate("PORTRAIT") to switch orientations (although I haven't actually used that functionality in any of my tests to date, so I have no idea if it actually works).
Finally, I'd recommend doing some looking into the PageObject design pattern for automated tests - it will make it much easier for you to write a resilient test suite for your app. Instead of writing ten tests which specifically interact with (for example) a contacts screen, you write a single "ContactsScreen" object that describes the content screen and the parts of it that you can interact with, and then your tests can simply reference the ContactsScreen. That way, if the Contacts screen changes, you only have to modify your ContactsScreen object, and maybe one or two tests, rather than having to fix all ten of your tests.
Good luck!