hunter v0.5.1 Hunter.Card View Source
Card entity
This module defines a Hunter.Card
struct and the main functions
for working with Cards
Fields
url
- the url associated with the cardtitle
- the title of the carddescription
- the card descriptionimage
- the image associated with the card, if anytype
-link
,photo
,video
, orrich
author_name
- name of the author/owner of the resourceauthor_url
- URL for the author/owner of the resourceprovider_name
- name of the resource providerprovider_url
- url of the resource providerhtml
- HTML required to display the resourcewidth
- width in pixelsheight
- height in pixels
Link to this section Summary
Functions
Retrieve a card associated with a status
Link to this section Types
Link to this section Functions
Link to this function
card_by_status(conn, id)
View Source
card_by_status(conn, id)
View Source
card_by_status(Hunter.Client.t(), non_neg_integer()) :: Hunter.Card.t()
card_by_status(Hunter.Client.t(), non_neg_integer()) :: Hunter.Card.t()
Retrieve a card associated with a status
Parameters
conn
- connection credentialsid
- status id
Examples
iex> conn = Hunter.new([base_url: "https://social.lou.lt", bearer_token: "123456"])
%Hunter.Client{base_url: "https://social.lou.lt", bearer_token: "123456"}
iex> Hunter.Card.card_by_status(conn, 118_635)
%Hunter.Card{description: "hunter - A Elixir client for Mastodon, a GNU Social compatible micro-blogging service",
image: "https://social.lou.lt/system/preview_cards/images/000/000/378/original/34700?1491626499",
title: "milmazz/hunter", url: "https://github.com/milmazz/hunter"}