Skip to content

j0053f/link-preview

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-link-preview 🔗

View the link preview using our App. Use the API to generate link preview in your app or use the NPM package to use the custom hook in your React app.

Features ✨

  • Use our app to view the link preview of any link
  • Use our API endpoint to integrate link preview in your app
  • Use the custom hook provided by our npm package to integrate link preview in your React app

Useful links 🔗

API

API endpoint

https://get-link-preview.herokuapp.com/?url=https://github.com/siddhigate

API response

{ 
  "success":true,
  "title":"siddhigate - Overview",
  "description":"Full stack developer. siddhigate has 49 repositories available. Follow their code on GitHub.",
  "image":"https://avatars.githubusercontent.com/u/80971056?v=4?s=400",
  "sitename":"GitHub",
  "ogUrl":"https://github.com/siddhigate",
  "type":"profile",
  "domain":"github.com",
  "favicon":"https://github.githubassets.com/favicons/favicon.svg"}
}

NPM package

Installation

import { useLinkPreview } from "get-link-preview"; 

Import custom hook


import { useLinkPreview } from "get-link-preview"; 

Using the hook


const { getLinkPreviewData, loading, error, data } = useLinkPreview("https://npmjs.com");

data will include (Example response):

{ 
  "success":true,
  "title":"siddhigate - Overview",
  "description":"Full stack developer. siddhigate has 49 repositories available. Follow their code on GitHub.",
  "image":"https://avatars.githubusercontent.com/u/80971056?v=4?s=400",
  "sitename":"GitHub",
  "ogUrl":"https://github.com/siddhigate",
  "type":"profile",
  "domain":"github.com",
  "favicon":"https://github.githubassets.com/favicons/favicon.svg"}
}

About

Generate link preview using our app, API or our NPM package.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 47.8%
  • CSS 47.8%
  • HTML 4.4%