gfbgraph Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
Synopsis
#include <gfbgraph/gfbgraph.h> #define GFBGRAPH_NODE_ERROR struct GFBGraphNode; struct GFBGraphNodeClass; enum GFBGraphNodeError; GQuark gfbgraph_node_error_quark (void
); GFBGraphNode * gfbgraph_node_new (void
); GFBGraphNode * gfbgraph_node_new_from_id (GFBGraphAuthorizer *authorizer
,const gchar *id
,GType node_type
,GError **error
); const gchar * gfbgraph_node_get_id (GFBGraphNode *node
); const gchar * gfbgraph_node_get_link (GFBGraphNode *node
); const gchar * gfbgraph_node_get_created_time (GFBGraphNode *node
); const gchar * gfbgraph_node_get_updated_time (GFBGraphNode *node
); GList * gfbgraph_node_get_connection_nodes (GFBGraphNode *node
,GType node_type
,GFBGraphAuthorizer *authorizer
,GError **error
); void gfbgraph_node_get_connection_nodes_async (GFBGraphNode *node
,GType node_type
,GFBGraphAuthorizer *authorizer
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GList * gfbgraph_node_get_connection_nodes_async_finish (GFBGraphNode *node
,GAsyncResult *result
,GError **error
); gboolean gfbgraph_node_append_connection (GFBGraphNode *node
,GFBGraphNode *connect_node
,GFBGraphAuthorizer *authorizer
,GError **error
);
Properties
"created-time" gchar* : Read / Write "id" gchar* : Read / Write "link" gchar* : Read / Write "updated-time" gchar* : Read / Write
Description
GFBGraphNode is the base class for the nodes in the Facebook Graph API, such a Album, a Photo or a User. Only usefull to expand the current library functionality creating new nodes based on it.
This object provide the common functions to manage the relations between nodes trough the GFBGraphConnectable interface. See gfbgraph_node_get_connection_nodes and gfbgraph_node_append_node
Details
enum GFBGraphNodeError
typedef enum { GFBGRAPH_NODE_ERROR_NO_CONNECTIONABLE = 1, GFBGRAPH_NODE_ERROR_NO_CONNECTABLE } GFBGraphNodeError;
gfbgraph_node_new ()
GFBGraphNode * gfbgraph_node_new (void
);
Creates a new GFBGraphNode.
Returns : |
a new GFBGraphNode; unref with g_object_unref() . [transfer full]
|
gfbgraph_node_new_from_id ()
GFBGraphNode * gfbgraph_node_new_from_id (GFBGraphAuthorizer *authorizer
,const gchar *id
,GType node_type
,GError **error
);
Retrieve a node object as a GFBgraphNode of node_type type, with the given id
from the Facebook Graph.
|
a const gchar with the node ID. |
|
a GFBGraphNode type GType. |
|
a GFBGraphAuthorizer. |
|
a GError or NULL . [allow-none]
|
Returns : |
a GFBGraphNode or NULL . [transfer full]
|
gfbgraph_node_get_id ()
const gchar * gfbgraph_node_get_id (GFBGraphNode *node
);
Gets the Facebook Graph unique node ID.
|
a GFBGraphNode. |
Returns : |
the node ID. [transfer none] |
gfbgraph_node_get_created_time ()
const gchar * gfbgraph_node_get_created_time (GFBGraphNode *node
);
Gets a node created time.
|
a GFBGraphNode. |
Returns : |
an ISO 8601 encoded date when the node was initially published. [transfer none] |
gfbgraph_node_get_updated_time ()
const gchar * gfbgraph_node_get_updated_time (GFBGraphNode *node
);
Gets a node updated time.
|
a GFBGraphNode. |
Returns : |
an ISO 8601 encoded date when the node was updated. [transfer none] |
gfbgraph_node_get_connection_nodes ()
GList * gfbgraph_node_get_connection_nodes (GFBGraphNode *node
,GType node_type
,GFBGraphAuthorizer *authorizer
,GError **error
);
Retrieve the nodes of type node_type
connected to the node
object. The node_type
object must
implement the GFBGraphConnectionable interface and be connectable to node
type object.
See gfbgraph_node_get_connection_nodes_async()
for the asynchronous version of this call.
|
a GFBGraphNode object which retrieve the connected nodes. |
|
a GFBGraphNode type GType that determines the kind of nodes to retrieve. |
|
a GFBGraphAuthorizer. |
|
a GError or NULL . [allow-none]
|
Returns : |
a newly-allocated GList of type node_type objects with the found nodes. [element-type GFBGraphNode][transfer full]
|
gfbgraph_node_get_connection_nodes_async ()
void gfbgraph_node_get_connection_nodes_async (GFBGraphNode *node
,GType node_type
,GFBGraphAuthorizer *authorizer
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously retrieve the list of nodes of type node_type
connected to the node
object. See
gfbgraph_node_get_connection_nodes()
for the synchronous version of this call.
When the operation is finished, callback
will be called. You can then call gfbgraph_node_get_connection_nodes_finish()
to get the list of connected nodes.
|
A GFBGraphNode object which retrieve the connected nodes. |
|
a GFBGraphNode type GType that must implement the GFBGraphConnectionable interface. |
|
a GFBGraphAuthorizer. |
|
An optional GCancellable object, or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is completed. [scope async] |
|
The data to pass to callback . [closure]
|
gfbgraph_node_get_connection_nodes_async_finish ()
GList * gfbgraph_node_get_connection_nodes_async_finish (GFBGraphNode *node
,GAsyncResult *result
,GError **error
);
Finishes an asynchronous operation started with
gfbgraph_node_get_connection_nodes_async()
.
|
A GFBGraphNode. |
|
A GAsyncResult. |
|
An optional GError, or NULL . [allow-none]
|
Returns : |
a newly-allocated GList of type node_type objects with the found nodes. [element-type GFBGraphNode][transfer full] |
gfbgraph_node_append_connection ()
gboolean gfbgraph_node_append_connection (GFBGraphNode *node
,GFBGraphNode *connect_node
,GFBGraphAuthorizer *authorizer
,GError **error
);
Appends connect_node
to node
. connect_node
must implement the GFBGraphConnectable interface
and be connectable to node
GType.
|
A GFBGraphNode. |
|
A GFBGraphNode. |
|
A GFBGraphAuthorizer. |
|
An optional GError, or NULL . [allow-none]
|
Returns : |
TRUE on sucess, FALSE if an error ocurred. |
Property Details
The "created-time"
property
"created-time" gchar* : Read / Write
An ISO 8601 encoded date when the node was initially published.
Default value: ""
The "id"
property
"id" gchar* : Read / Write
The node ID. All nodes have one of this.
Default value: ""
The "link"
property
"link" gchar* : Read / Write
The node link. An URL to the node on Facebook.
Default value: ""
The "updated-time"
property
"updated-time" gchar* : Read / Write
An ISO 8601 encoded date when the node was updated.
Default value: ""