Create drupal content programmatically with custom entity ( assets ) I am using asset module : https://www.drupal.org/project/asset

I creates a new entity type = asset. I get a form where I can add ( document, image, video..).

How can I, from a custom module add a content of asset ? I think that I cannot do it the way we creat nodes ... like :

$node = new stdClass();
$node-&gt;type = "asset";
node_object_prepare($node);
....


Please help

thank you
I think you can try to use core and EntityAPI methods for this task like this:

$asset = entity_get_controller('asset');
$asset-&gt;type = 'MY_TYPE';
$asset-&gt;... = '...';
....

$asset-&gt;save();