I am following http://www.qgis.org/en/docs/pyqgis_developer_cookbook/intro.html. In python console after a raster layer is loaded to a variable "rlayer"
>>>rlayer
<qgis.core.QgsRasterLayer object at 0x113faadf8>
>>>rlayer.drawingStyle()
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'QgsRasterLayer' object has no attribute 'drawingStyle'
>>>rlayer.setDrawingStyle(QgsRasterLayer.SingleBandPseudoColor)
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: type object 'QgsRasterLayer' has no attribute 'SingleBandPseudoColor'
>>>rlayer.setColorShadingAlgorithm(QgsRasterLayer.PseudoColorShader)
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'QgsRasterLayer' object has no attribute 'setColorShadingAlgorithm'
what did I do wrong?