transform.rotate in Blender 2.8
Select the object in the 3D window ; key in r,x,30    to rotate 30 deg about the x-axis ; Visit the info window to see and copy/paste the equivalent python code.
I forgot which is local and which is global, i.e. experiment with r,x,30 or r,x,x,30
Note also the use of degrees with the keyboard, but radians in the script:
bpy.ops.transform.rotate(value=pi/6, orient_axis='Z',\ orient_type='LOCAL') verified with Blender 2.8
We have left off the numerous optional arguments in this example