link_preview_generator v0.0.2 LinkPreviewGenerator.Requests

Module providing functions to handle needed requests.

Summary

Functions

After all redirects returns response and newly generated LinkPreviewGenerator.Page struct

Check if given url leads somewhere

Check if given url leads to image

Types

t :: {:ok, HTTPoison.Response.t, LinkPreviewGenerator.t}

Functions

handle_redirects(url, original_url \\ nil)

After all redirects returns response and newly generated LinkPreviewGenerator.Page struct.

valid?(url)

Specs

valid?(String.t) :: {:ok, String.t} | {:error, atom}

Check if given url leads somewhere

valid_image?(url)

Specs

valid_image?(String.t) ::
  {:ok, String.t} |
  {:error, atom}

Check if given url leads to image