Edge label using Cgraph library

Hi, how can I add the edge label using the Cgraph?
As far as I know in Gvedit it is possible to add labels using [label="template"].
Looking through the http://www.graphviz.org/pdf/Agraph.pdf and http://www.graphviz.org/doc/libguide/libguide.pdf 
I couldn't fully comprehend nor find my anwser.
Is there any command I could add to my graph to create that label?

For example:

g = agopen("g", Agdirected, 0);
u = agnode(g, "lol", 1);
v = agnode(g, "asd", 1);
e = agedge(g, n, m, 0, 1);
char* mychar;
command(g,u,v,mychar) or command(g,e,mychar)

EDIT:

I don't seem to see the topics I wrote earlier so I'm sorry if I created multiple threads

You would create edge labels

You would create edge labels the same way you would create node labels. That is, a label is just an attribute, so you first declare the attribute and then assign values to individual objects:

Agedge_t* e;

agattr(g, AGEDGE, "label", "");

agset(e, "label", "edge_label");

 

See section 2.1.1 of the libguide for more details.

Recent comments