GData.FreebaseTopicObject

Fields

None

Methods

get_id ()

get_property_count (property)

get_property_hits (property)

get_property_value (property, item)

list_properties ()

ref ()

unref ()

Details

class GData.FreebaseTopicObject

Opaque struct containing a Freebase topic object. This object may contain one or more GData.FreebaseTopicValue structs, which may in turn contain nested GData.FreebaseTopicObject structs to express complex data.

New in version 0.15.1.

get_id()
Returns:

the Freebase ID of this object

Return type:

str

Gets the Freebase ID for this specific object.

New in version 0.15.1.

Deprecated since version 0.17.7: Google Freebase has been permanently shut down.

get_property_count(property)
Parameters:

property (str) – a property name contained in self

Returns:

The number of values contained for property

Return type:

int

Returns the number of values that self holds for the given property. If self contains no information about property, 0 is returned.

New in version 0.15.1.

Deprecated since version 0.17.7: Google Freebase has been permanently shut down.

get_property_hits(property)
Parameters:

property (str) – a property name contained in self

Returns:

the total number of hits for this property

Return type:

int

Returns the total number of hits that the Freebase database stores for this object, this number either equals or is greater than GData.FreebaseTopicObject.get_property_count(), the query limit can be controlled through GData.Query.set_max_results() on the topic query.

If self contains no information about property, 0 is returned.

New in version 0.15.1.

Deprecated since version 0.17.7: Google Freebase has been permanently shut down.

get_property_value(property, item)
Parameters:
  • property (str) – a property name contained in self

  • item (int) – item number to retrieve from property

Returns:

the value for this property/item

Return type:

GData.FreebaseTopicValue or None

Gets the value that self stores for this property/item pair, as a generic GData.FreebaseTopicValue. If self contains no information about property, or item is outside the [0..:obj:GData.FreebaseTopicObject.get_property_count() - 1] range, None is returned.

New in version 0.15.1.

Deprecated since version 0.17.7: Google Freebase has been permanently shut down.

list_properties()
Returns:

An array of property names, free with g_ptr_array_unref().

Return type:

[str]

Returns the list of Freebase properties described by self.

New in version 0.15.1.

Deprecated since version 0.17.7: Google Freebase has been permanently shut down.

ref()
Returns:

self, with an extra reference.

Return type:

GData.FreebaseTopicObject

Creates and returns a new reference on self.

New in version 0.15.1.

Deprecated since version 0.17.7: Google Freebase has been permanently shut down.

unref()

Removes a reference from self. If the reference count drops to 0, the object is freed.

New in version 0.15.1.

Deprecated since version 0.17.7: Google Freebase has been permanently shut down.