Top |
Functions
Object Hierarchy
GBoxed ├── GDataFreebaseTopicObject ╰── GDataFreebaseTopicValue GObject ╰── GDataParsable ╰── GDataEntry ╰── GDataFreebaseResult ╰── GDataFreebaseTopicResult
Description
GDataFreebaseTopicResult is a subclass of GDataFreebaseResult that contains all or a subset of the information contained in Freebase about the Freebase ID given to the GDataFreebaseTopicQuery.
For more details of Google Freebase API, see the online documentation.
Functions
gdata_freebase_topic_result_new ()
GDataFreebaseTopicResult *
gdata_freebase_topic_result_new (void
);
Creates a new GDataFreebaseTopicResult with the given ID and default properties.
Since 0.15.1
gdata_freebase_topic_result_dup_object ()
GDataFreebaseTopicObject *
gdata_freebase_topic_result_dup_object
(GDataFreebaseTopicResult *self
);
Returns a reference to the root GDataFreebaseTopicObject containing the topic query results.
Returns
A new reference on the result object, unref with
gdata_freebase_topic_object_unref()
.
[transfer full]
Since 0.15.1
gdata_freebase_topic_object_ref ()
GDataFreebaseTopicObject *
gdata_freebase_topic_object_ref (GDataFreebaseTopicObject *object
);
Creates and returns a new reference on object
.
Since 0.15.1
gdata_freebase_topic_object_unref ()
void
gdata_freebase_topic_object_unref (GDataFreebaseTopicObject *object
);
Removes a reference from object
. If the reference count drops to 0,
the object is freed.
Since 0.15.1
gdata_freebase_topic_object_list_properties ()
GPtrArray *
gdata_freebase_topic_object_list_properties
(const GDataFreebaseTopicObject *object
);
Returns the list of Freebase properties described by object
.
Returns
An array of property names, free with g_ptr_array_unref()
.
[transfer container][element-type gchar*]
Since 0.15.1
gdata_freebase_topic_object_get_id ()
const gchar *
gdata_freebase_topic_object_get_id (const GDataFreebaseTopicObject *object
);
Gets the Freebase ID for this specific object.
Since 0.15.1
gdata_freebase_topic_object_get_property_count ()
guint64 gdata_freebase_topic_object_get_property_count (const GDataFreebaseTopicObject *object
,const gchar *property
);
Returns the number of values that object
holds for the given property
. If object
contains no information about property
, 0 is returned.
Since 0.15.1
gdata_freebase_topic_object_get_property_hits ()
guint64 gdata_freebase_topic_object_get_property_hits (const GDataFreebaseTopicObject *object
,const gchar *property
);
Returns the total number of hits that the Freebase database stores
for this object, this number either equals or is greater than
gdata_freebase_topic_object_get_property_count()
, the query limit
can be controlled through gdata_query_set_max_results()
on the topic
query.
If object
contains no information about property
, 0 is returned.
Since 0.15.1
gdata_freebase_topic_object_get_property_value ()
GDataFreebaseTopicValue * gdata_freebase_topic_object_get_property_value (const GDataFreebaseTopicObject *object
,const gchar *property
,gint64 item
);
Gets the value that object
stores for this property
/item
pair, as a generic
GDataFreebaseTopicValue. If object
contains no information about property
,
or item
is outside the [0..gdata_freebase_topic_object_get_property_count() - 1]
range, NULL
is returned.
Parameters
object |
||
property |
a property name contained in |
|
item |
item number to retrieve from |
Since 0.15.1
gdata_freebase_topic_value_ref ()
GDataFreebaseTopicValue *
gdata_freebase_topic_value_ref (GDataFreebaseTopicValue *value
);
Creates and returns a new reference on value
.
Since 0.15.1
gdata_freebase_topic_value_unref ()
void
gdata_freebase_topic_value_unref (GDataFreebaseTopicValue *value
);
Removes a reference from value
. If the reference count drops to 0,
the object is freed.
Since 0.15.1
gdata_freebase_topic_value_get_property ()
const gchar *
gdata_freebase_topic_value_get_property
(GDataFreebaseTopicValue *value
);
Returns the property name that this value describes
Since 0.15.1
gdata_freebase_topic_value_get_text ()
const gchar *
gdata_freebase_topic_value_get_text (GDataFreebaseTopicValue *value
);
Returns a textual representation of this value, this is either the value contained transformed to a string, or a concatenation of subvalues for compound types.
Since 0.15.1
gdata_freebase_topic_value_get_language ()
const gchar *
gdata_freebase_topic_value_get_language
(GDataFreebaseTopicValue *value
);
Returns the language used in the content of value
Since 0.15.1
gdata_freebase_topic_value_get_creator ()
const gchar *
gdata_freebase_topic_value_get_creator
(GDataFreebaseTopicValue *value
);
Returns the Freebase ID of the user that created this value.
Since 0.15.1
gdata_freebase_topic_value_get_timestamp ()
gint64
gdata_freebase_topic_value_get_timestamp
(GDataFreebaseTopicValue *value
);
Returns the time at which this value was created in the Freebase database.
It's a UNIX timestamp in seconds since the epoch. If value
has no timestamp,
-1 will be returned.
Since 0.15.1
gdata_freebase_topic_value_get_value_type ()
GType
gdata_freebase_topic_value_get_value_type
(GDataFreebaseTopicValue *value
);
Returns the GType of the real value held in value
.
Since 0.15.1
gdata_freebase_topic_value_copy_value ()
void gdata_freebase_topic_value_copy_value (GDataFreebaseTopicValue *value
,GValue *gvalue
);
Copies in gvalue
the value held in value
. the GValue must be later freed through g_value_unset()
Since 0.15.1
gdata_freebase_topic_value_get_int ()
gint64
gdata_freebase_topic_value_get_int (GDataFreebaseTopicValue *value
);
Returns a gint64 value held in value
. It is only valid to call this if the GType is a G_TYPE_INT64
Since 0.15.1
gdata_freebase_topic_value_get_double ()
gdouble
gdata_freebase_topic_value_get_double (GDataFreebaseTopicValue *value
);
Returns a gdouble value held in value
. It is only valid to call this if the GType is a G_TYPE_DOUBLE
Since 0.15.1
gdata_freebase_topic_value_get_string ()
const gchar *
gdata_freebase_topic_value_get_string (GDataFreebaseTopicValue *value
);
Returns a string value held in value
. It is only valid to call this if the GType is a G_TYPE_STRING
Since 0.15.1
gdata_freebase_topic_value_get_object ()
const GDataFreebaseTopicObject *
gdata_freebase_topic_value_get_object (GDataFreebaseTopicValue *value
);
Returns a compound/complex object held in value
. It is only valid to call this if the GType is a
GDATA_TYPE_FREEBASE_TOPIC_OBJECT
.
Since 0.15.1
gdata_freebase_topic_value_is_image ()
gboolean
gdata_freebase_topic_value_is_image (GDataFreebaseTopicValue *value
);
Returns true if value
holds a freebase image object, on such values it
will be valid to call gdata_freebase_service_get_image()
to get a stream
to the image itself.
Since 0.15.1
Types and Values
GDataFreebaseTopicResult
typedef struct _GDataFreebaseTopicResult GDataFreebaseTopicResult;
All the fields in the GDataFreebaseTopicResult structure are private and should never be accessed directly.
Since 0.15.1
GDataFreebaseTopicResultClass
typedef struct { } GDataFreebaseTopicResultClass;
All the fields in the GDataFreebaseTopicResultClass structure are private and should never be accessed directly.
Since 0.15.1
GDataFreebaseTopicObject
typedef struct _GDataFreebaseTopicObject GDataFreebaseTopicObject;
Opaque struct containing a Freebase topic object. This object may contain one or more GDataFreebaseTopicValue structs, which may in turn contain nested GDataFreebaseTopicObject structs to express complex data.
Since 0.15.1
GDataFreebaseTopicValue
typedef struct _GDataFreebaseTopicValue GDataFreebaseTopicValue;
Opaque struct containing a value of a Freebase topic object. This struct may contain a simple value (integers, doubles, strings...) or complex values, expressed through a GDataFreebaseTopicObject.
Since 0.15.1