ExDoppler.Shares (ExDoppler v1.0.1)

View Source

Module for interacting with ExDoppler.Share

๐Ÿ“– Resources

Summary

Functions

Creates a plain-text share link ExDoppler.Share

Same as plain_text/2 but won't wrap a successful response in {:ok, response}

Functions

plain_text(text_to_share, opts \\ [])

Creates a plain-text share link ExDoppler.Share

๐Ÿท๏ธ Params

  • text_to_share - Plain text to share (e.g "sharing this string")
  • opts: Optional modifications
    • expire_days - Days until the link is inaccessible. Default: 90
    • expire_views - Number of views until the link is inaccessible. -1 means infinite. Default: -1

โคต๏ธ Returns

โœ… On Success

  {:ok, %ExDoppler.Share{...}}

โŒ On Failure

  {:error, err}

๐Ÿ’ป Examples

iex> alias ExDoppler.Shares
iex> {:ok, _share} = Shares.plain_text("SHARE_THIS_TEXT", expire_days: 1, expire_views: 1)

๐Ÿ“– Resources

plain_text!(text_to_share, opts \\ [])

Same as plain_text/2 but won't wrap a successful response in {:ok, response}