GData Reference Manual: GDataFreebaseSearchResult

## GDataFreebaseSearchResult GDataFreebaseSearchResult — GData Freebase search result object |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GDataFreebaseSearchResult * | gdata_freebase_search_result_new ()
guint | gdata_freebase_search_result_get_num_items ()
guint | gdata_freebase_search_result_get_total_hits ()
const GDataFreebaseSearchResultItem * | gdata_freebase_search_result_get_item ()
const gchar * | gdata_freebase_search_result_item_get_mid ()
const gchar * | gdata_freebase_search_result_item_get_id ()
const gchar * | gdata_freebase_search_result_item_get_name ()
const gchar * | gdata_freebase_search_result_item_get_language ()
const gchar * | gdata_freebase_search_result_item_get_notable_id ()
const gchar * | gdata_freebase_search_result_item_get_notable_name ()
gdouble | gdata_freebase_search_result_item_get_score ()

## Types and Values

| GDataFreebaseSearchResult
| GDataFreebaseSearchResultClass
| GDataFreebaseSearchResultItem

## Object Hierarchy

        GObject
        ╰── GDataParsable
            ╰── GDataEntry
                ╰── GDataFreebaseResult
                    ╰── GDataFreebaseSearchResult

## Includes

    #include <gdata/services/freebase/gdata-freebase-result.h>

## Description

GDataFreebaseSearchResult is a subclass of GDataEntry to represent the result of a Freebase search query.

For more details of Google Freebase API, see the online documentation.

## Functions

### gdata_freebase_search_result_new ()

    GDataFreebaseSearchResult *
    gdata_freebase_search_result_new (void);

Creates a new GDataFreebaseSearchResult with the given ID and default properties.

#### Returns

a new GDataFreebaseSearchResult; unref with `g_object_unref()`.

[transfer full]

Since 0.15.1

### gdata_freebase_search_result_get_num_items ()

    guint
    gdata_freebase_search_result_get_num_items
                                   (GDataFreebaseSearchResult *self);

Returns the number of items contained in this result.

#### Parameters

self | a GDataFreebaseSearchResult |

#### Returns

The number of items

Since 0.15.1

### gdata_freebase_search_result_get_total_hits ()

    guint
    gdata_freebase_search_result_get_total_hits
                                   (GDataFreebaseSearchResult *self);

Returns the total number of hits found for the search query.

#### Parameters

self | a GDataFreebaseSearchResult |

#### Returns

the total number of hits.

Since 0.15.1

### gdata_freebase_search_result_get_item ()

    const GDataFreebaseSearchResultItem *
    gdata_freebase_search_result_get_item (GDataFreebaseSearchResult *self,
                                           guint i);

Gets an item from the search result.

#### Parameters

self | a GDataFreebaseSearchResult |
i | number of item to retrieve |

#### Returns

a search result item, or `NULL` on invalid item.

[transfer none][allow-none]

Since 0.15.1

### gdata_freebase_search_result_item_get_mid ()

    const gchar *
    gdata_freebase_search_result_item_get_mid
                                   (const GDataFreebaseSearchResultItem *item);

Returns the machine-encoded ID (MID) of the search result item. Elements may have a single MID, as opposed to the potentially multiple Freebase IDs that may point to it. MIDs are usable interchangeably with Freebase IDs.

#### Parameters

item | a GDataFreebaseSearchResultItem |

#### Returns

The result item MID.

[transfer none]

Since 0.15.1

### gdata_freebase_search_result_item_get_id ()

    const gchar *
    gdata_freebase_search_result_item_get_id
                                   (const GDataFreebaseSearchResultItem *item);

Returns the Freebase ID of the search result item.

#### Parameters

item | a GDataFreebaseSearchResultItem |

#### Returns

The search result item Freebase ID.

[transfer none]

Since 0.15.1

### gdata_freebase_search_result_item_get_name ()

    const gchar *
    gdata_freebase_search_result_item_get_name
                                   (const GDataFreebaseSearchResultItem *item);

Returns the human readable name of the search result item.

#### Parameters

item | a GDataFreebaseSearchResultItem |

#### Returns

The human readable name of the item.

[transfer none]

Since 0.15.1

### gdata_freebase_search_result_item_get_language ()

    const gchar *
    gdata_freebase_search_result_item_get_language
                                   (const GDataFreebaseSearchResultItem *item);

Gets the language of this search result item, in ISO-639-1 format.

#### Parameters

item | a GDataFreebaseSearchResultItem |

#### Returns

The language of the search result item.

[transfer none]

Since 0.15.1

### gdata_freebase_search_result_item_get_notable_id ()

    const gchar *
    gdata_freebase_search_result_item_get_notable_id
                                   (const GDataFreebaseSearchResultItem *item);

If this search result item is notable in an specific topic, this function returns the Freebase ID of this topic.

#### Parameters

item | a GDataFreebaseSearchResultItem |

#### Returns

The topic the result item is most notable of, or `NULL`.

[transfer none][allow-none]

Since 0.15.1

### gdata_freebase_search_result_item_get_notable_name ()

    const gchar *
    gdata_freebase_search_result_item_get_notable_name
                                   (const GDataFreebaseSearchResultItem *item);

If this search result item is notable in an specific topic, this function returns the human readable name of this topic.

#### Parameters

item | a GDataFreebaseSearchResultItem |

#### Returns

The human readable topic name, or `NULL`.

[transfer none][allow-none]

Since 0.15.1

### gdata_freebase_search_result_item_get_score ()

    gdouble
    gdata_freebase_search_result_item_get_score
                                   (const GDataFreebaseSearchResultItem *item);

Returns the score of this search result item. The higher, the more relevant this item seems, given the search terms.

#### Parameters

item | a GDataFreebaseSearchResultItem |

#### Returns

the result item score.

Since 0.15.1

## Types and Values

### GDataFreebaseSearchResult

    typedef struct _GDataFreebaseSearchResult GDataFreebaseSearchResult;

All the fields in the GDataFreebaseSearchResult structure are private and should never be accessed directly.

Since 0.15.1

### GDataFreebaseSearchResultClass

    typedef struct {
    } GDataFreebaseSearchResultClass;

All the fields in the GDataFreebaseSearchResultClass structure are private and should never be accessed directly.

Since 0.15.1

### GDataFreebaseSearchResultItem

    typedef struct _GDataFreebaseSearchResultItem GDataFreebaseSearchResultItem;

Opaque struct holding data for a single search result item.

Since 0.15.1