tkhwang / readable

anti-social social bookmark and much more...
5 stars 1 forks source link

✨ (server): [bookmark] Extract ogtag info from url #56

Closed tkhwang closed 3 years ago

tkhwang commented 3 years ago

Description

GrpahQL

query {
  urlInfo(getUrlInfoInput: {
    url: "https://dev.to/xurxodev/moving-away-from-reactjs-and-vuejs-on-front-end-using-clean-architecture-3olk"
  }) {
    siteName
    title
    type
    url
    urlHash
    description
    image {
        url
        type
        width
        height
    }
    generatedImage
  }
}

REST

POST  /bookmarks/urlInfo

{
    "url": "https://dev.to/xurxodev/moving-away-from-reactjs-and-vuejs-on-front-end-using-clean-architecture-3olk"
}

Response

{
    "data": {
        "urlInfo": {
            "siteName": "DEV Community",
            "title": "Moving away from ReactJs and VueJs on front-end using Clean Architecture",
            "type": "article",
            "url": "https://dev.to/xurxodev/moving-away-from-reactjs-and-vuejs-on-front-end-using-clean-architecture-3olk",
            "urlHash": null,
            "description": "This article is an English translation of the original in my blog: Alejándonos de ReactJs y VueJs en...",
            "image": {
                "url": "https://res.cloudinary.com/practicaldev/image/fetch/s--Jq0hzPje--/c_imagga_scale,f_auto,fl_progressive,h_500,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lsimic4s7m0k14qpinv9.png",
                "type": "png",
                "width": "",
                "height": ""
            },
            "generatedImage": null
        }
    }
}

Type of change

Further to-do lists

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tkhwang/readable/baNTLVNLnSKCEwmWatMLxYumc75u
✅ Preview: https://readable-git-feat-server-0715-bookmark-tkhwang.vercel.app

[Deployment for 3598819 failed]