{"id":16701920,"url":"https://github.com/soranoba/googp","last_synced_at":"2025-04-10T04:21:12.860Z","repository":{"id":77321311,"uuid":"264971340","full_name":"soranoba/googp","owner":"soranoba","description":"googp is an OGP (Open Graph protocol) parser library for Golang.","archived":false,"fork":false,"pushed_at":"2023-05-16T07:32:06.000Z","size":40,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:35:48.747Z","etag":null,"topics":["golang","ogp","open-graph"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soranoba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["soranoba"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/soranoba"]}},"created_at":"2020-05-18T14:51:53.000Z","updated_at":"2023-12-22T02:00:32.000Z","dependencies_parsed_at":"2024-06-20T11:04:09.616Z","dependency_job_id":"e0241385-b1ed-4887-833e-6310eb9ee2b3","html_url":"https://github.com/soranoba/googp","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soranoba%2Fgoogp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soranoba%2Fgoogp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soranoba%2Fgoogp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soranoba%2Fgoogp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soranoba","download_url":"https://codeload.github.com/soranoba/googp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248155433,"owners_count":21056638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","ogp","open-graph"],"created_at":"2024-10-12T18:46:10.795Z","updated_at":"2025-04-10T04:21:12.821Z","avatar_url":"https://github.com/soranoba.png","language":"Go","funding_links":["https://github.com/sponsors/soranoba","https://paypal.me/soranoba"],"categories":[],"sub_categories":[],"readme":"# googp\n[![CircleCI](https://circleci.com/gh/soranoba/googp.svg?style=svg\u0026circle-token=4282311988e7373cbc6033771566d912f1f446c9)](https://circleci.com/gh/soranoba/googp)\n[![Go Report Card](https://goreportcard.com/badge/github.com/soranoba/googp)](https://goreportcard.com/report/github.com/soranoba/googp)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/soranoba/googp)](https://pkg.go.dev/github.com/soranoba/googp)\n\ngoogp is an [OGP (Open Graph protocol)](https://ogp.me/) parser library for Golang.\n\n## Overviews\n\n- 💯　Fully compliant with the reference\n- 🔧　Highly customizable\n  - Available your own structs\n  - Available parsing your own OG Tags.\n- 🙌　Supports type conversion\n  - Supports all types that implement [encoding.TextUnmarshaler](https://golang.org/pkg/encoding/#TextUnmarshaler).\n\n## Installation\n\nTo install it, run:\n\n```bash\ngo get -u github.com/soranoba/googp\n```\n\n## Usage\n\n```go\nimport (\n    \"fmt\"\n    \"github.com/soranoba/googp\"\n)\n\ntype Music struct {\n}\n\ntype CustomOGP struct {\n    Title       string   `googp:\"og:title\"`\n    Description string   `googp:\"-\"`        // ignored\n    images      []string                    // private field (ignored)\n    Videos      []string `googp:\"og:video,og:video:url\"`\n    Musics      Music    `googp:\"music\"`    // object type\n}\n\nfunc main() {\n    var ogp1 googp.OGP\n    if err := googp.Fetch(\"https://soranoba.net\", \u0026ogp1); err != nil {\n        return\n    }\n    fmt.Println(ogp1)\n\n    var ogp2 CustomOGP\n    if err := googp.Fetch(\"https://soranoba.net\", \u0026ogp2); err != nil {\n        return\n    }\n    fmt.Println(ogp2)\n}\n```\n\n## Object Mappings\n\n### [Structured Properties](https://ogp.me/#structured)\n\n```go\ntype OGP struct {\n    Image struct {\n        URL       string `googp:\"og:image,og:image:url\"`\n        SecureURL string `googp:\"og:image:secure_url\"`\n    } `googp:\"og:image\"`\n}\n```\n\nYou may collect in a struct by specifying the root tag.\u003cbr\u003e\nIn case of specifying `og:image`, googp collect values which property is `og:image:*`.\n\n### [Arrays](https://ogp.me/#array)\n\n```go\ntype OGP struct {\n    Image []string `googp:\"og:image\"`\n}\n```\n\ngoogp collects values which the same properties.\n\n### [Object Types](https://ogp.me/#types)\n\nIn googp, it same as Structured Properties.\u003cbr\u003e\nYou may define your own type yourself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoranoba%2Fgoogp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoranoba%2Fgoogp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoranoba%2Fgoogp/lists"}