Does not work in plugin
bpy.ops.mesh.primitive_plane_add()
oldmode = bpy.context.mode
bpy.ops.object.mode_set( mode = 'EDIT' )
bpy.ops.unwrap( method = 'ANGLE_BASED', margin=0.001 )
bpy.ops.object.mode_set(mode=olodmode)
does not work also
bpy.ops.mesh.primitive_plane_add()
bpy.ops.object.editmode_toggle()
bpy.ops.unwrap( method = 'ANGLE_BASED', margin=0.001 )
bpy.ops.object.editmode_toggle()
In both cases operator used on OBJECT mode but after executing blender still in 'EDIT' mode.
And BUG 2: There is no normal documentation for addons developers. With samples.