{"id":28546393,"url":"https://github.com/ulule/picfit-go","last_synced_at":"2025-07-07T06:31:53.794Z","repository":{"id":52715413,"uuid":"44519918","full_name":"ulule/picfit-go","owner":"ulule","description":"A Go client library for generating URLs with picfit","archived":false,"fork":false,"pushed_at":"2021-04-20T11:08:45.000Z","size":22,"stargazers_count":15,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-09T23:43:57.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ulule.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-19T08:07:30.000Z","updated_at":"2025-03-04T10:40:02.000Z","dependencies_parsed_at":"2022-08-22T09:21:38.607Z","dependency_job_id":null,"html_url":"https://github.com/ulule/picfit-go","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ulule/picfit-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulule%2Fpicfit-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulule%2Fpicfit-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulule%2Fpicfit-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulule%2Fpicfit-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ulule","download_url":"https://codeload.github.com/ulule/picfit-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulule%2Fpicfit-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264027618,"owners_count":23546109,"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":[],"created_at":"2025-06-09T23:39:17.210Z","updated_at":"2025-07-07T06:31:53.788Z","avatar_url":"https://github.com/ulule.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# picfit-go\n\n[![Build Status](https://travis-ci.org/ulule/picfit-go.svg)](https://travis-ci.org/ulule/picfit-go)\n\nA Go client library for generating URLs with [picfit](https://github.com/thoas/picfit)\n\n## Installation\n\n```bash\n$ go get github.com/ulule/picfit-go\n```\n\n## Usage\n\nFirst, import the package:\n\n```go\nimport \"github.com/ulule/picfit-go\"\n```\n\nNow, you can access the package through `picfit` namespace.\n\n## API\n\n### BuildURL()\n\nThe `BuildURL()` function returns a pre-formatted URL for picfit server.\n\nThis function takes three required parameters:\n\n* `path` - your original image path\n* `geometry` - width and height formatted like this: `widthxheight` (example: \"20x30\")\n* `options` - picfit options\n\nSupported options are:\n\n* `Ops` - see [Operations](https://github.com/thoas/picfit#operations)\n* `Quality` - see [General Parameters](https://github.com/thoas/picfit#general-parameters)\n* `Upscale` - see [General Parameters](https://github.com/thoas/picfit#general-parameters)\n* `DefaultMethod` - see [Methods](https://github.com/thoas/picfit#methods) (defaults to `display`)\n* `SecretKey` - your secret key (see [Security](https://github.com/thoas/picfit#security))\n\nOptions is just an instance of `Options` struct:\n\n```go\n// Create your own instance, with your own parameters.\noptions := \u0026picfit.Options{\n\tOp:            \"thumbnail\",\n\tBaseURL:       \"https://img.yourpicfitserver.com\",\n\tDefaultMethod: \"display\",\n\tSecretKey:     \"$ecretkeyplizkeepitseeeecret\"\n}\n\n// Or, use the default ones (same as above) with NewOptions()\noptions := picfit.NewOptions()\n\n// And, of course, you can override everything...\noptions.BaseURL = \"https://img.superserver.com\"\noptions.SecretKey = \"qwerty1234ohitsbad\"\n```\n\nThen, generate your URL:\n\n```go\nurl, err := picfit.BuildURL(\"image.jpg\", \"90x90\", options)\nif err != nil {\n\treturn fmt.Errorf(\"couldn't build picfit URL: %w\", err)\n}\n```\n\n## Contributing\n\n* Ping us on twitter [@thoas](https://twitter.com/thoas), [@oibafsellig](https://twitter.com/oibafsellig)\n* Fork the [project](https://github.com/ulule/picfit-go)\n* Fix [bugs](https://github.com/ulule/picfit-go/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulule%2Fpicfit-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulule%2Fpicfit-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulule%2Fpicfit-go/lists"}