[][src]Function hdk::api::get_links_with_options

pub fn get_links_with_options(
    base: &Address,
    link_type: LinkMatch<&str>,
    tag: LinkMatch<&str>,
    options: GetLinksOptions
) -> ZomeApiResult<GetLinksResult>

Consumes four values; the address of an entry get get links from (the base), the type of the links to be retrieved, an optional tag to match, and an options struct for selecting what meta data and crud status links to retrieve. Note: the type is intended to describe the relationship between the base and other entries you wish to lookup. This function returns a list of addresses of other entries which matched as being linked by the given type. If the tag is not None it will return only links that match the tag exactly. If the tag parameter is None it will return all links of the given type regardless of their tag. Links are created using the Zome API function link_entries. If you also need the content of the entry consider using one of the helper functions: get_links_result or get_links_and_load


pub fn handle_posts_by_agent(agent: Address) -> ZomeApiResult<GetLinksResult> {
    hdk::get_links_with_options(&agent, LinkMatch::Exactly("authored_posts"), LinkMatch::Any, GetLinksOptions::default())