Skip to content

typedlabs/opengraph4s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opengraph4s

Parses given html data into Facebook OpenGraph structure.

  1. [Set Up](#Set Up)
  2. Usage

Quick start

Set Up

Download

In plugins.sbt, add the following bintray resolver

Resolver.bintrayIvyRepo("typedlabs", "releases")

In build.sbt, set the opengraph4s version in a variable (for the latest version, set val opengraph4sVersion = the version you see in the bintray badge above).

libraryDependencies ++= Seq(
    "com.typedlabs" %% "opengraph4s" % opengraph4sVersion
)

Usage

Using opengraph4s is simple. It only needs an implicit ExecutionContext to run it's Future

import com.typedlabs.opengraph4s.OpenGraph
import com.typedlabs.opengraph4s.OpenGraphNotFound

val opengraphData: Future[Either[OpenGraphNotFound, OpenGraph]] = 
  OpenGraph.extract("http://www.lightbend.com/blog/lightbend-tech-digest-march-2017")

OpenGraph case class is composed off optional fields as not all web pages have a consistent representation of open graph meta tags.

About

Open Graph protocol extraction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages