{"id":18885714,"url":"https://github.com/dlutton/usps","last_synced_at":"2026-02-23T08:30:26.940Z","repository":{"id":57541403,"uuid":"77083392","full_name":"dlutton/usps","owner":"dlutton","description":"A Go client to validate ZIP Codes using the USPS API","archived":false,"fork":false,"pushed_at":"2018-02-16T00:06:15.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-19T22:43:02.967Z","etag":null,"topics":["appengine-go","go"],"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/dlutton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-21T20:20:51.000Z","updated_at":"2022-05-17T18:37:27.000Z","dependencies_parsed_at":"2022-09-26T18:30:46.769Z","dependency_job_id":null,"html_url":"https://github.com/dlutton/usps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlutton%2Fusps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlutton%2Fusps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlutton%2Fusps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlutton%2Fusps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlutton","download_url":"https://codeload.github.com/dlutton/usps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859003,"owners_count":19708857,"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":["appengine-go","go"],"created_at":"2024-11-08T07:21:13.674Z","updated_at":"2026-02-23T08:30:26.168Z","avatar_url":"https://github.com/dlutton.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# usps\n[![CircleCI](https://circleci.com/gh/dlutton/usps.svg?style=svg)](https://circleci.com/gh/dlutton/usps)\n[![GoDoc](https://godoc.org/github.com/gopher/gopher?status.svg)](https://godoc.org/github.com/dlutton/usps)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dlutton/usps)](https://goreportcard.com/report/github.com/dlutton/usps)\n\nZip Code validation using the USPS API in Go.\n\n## Examples\n\n### Authentication\n\nIf you already have the USERID, creating the client is simple:\n\n```go\nclient := usps.New(\"USERID\")\n```\n\n### Google App Engine settings\n\n```go\nclient := usps.NewClient(\"USERID\", usps.WithHTTPClient(\u0026http.Client{\n\tTransport: \u0026urlfetch.Transport{Context: appengine.NewContext(r)},\n}))\n```\n\n### Full Example\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"log\"\n\n\t\"github.com/dlutton/usps\"\n)\n\nfunc main() {\n\tclient := usps.NewClient(\"USERID\")\n\n\tresults, err := client.ValidateZip(\"91362\")\n\tif err != nil {\n\t\tif apiErr, ok := err.(*usps.APIError); ok {\n\t\t\tlog.Fatalf(\"number: %s, source: %s; %s\", apiErr.Number, apiErr.Source, apiErr.Description)\n\t\t}\n\t\tlog.Fatal(err)\n\t}\n\n\toutput, err := json.Marshal(results)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Print(string(output))\n}\n```\n\n### Development\n\n```\ngo get -v -u github.com/dlutton/usps\n```\n\n### License\n\nThis software is created under Apache v2 License. For the full license text, please see License.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlutton%2Fusps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlutton%2Fusps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlutton%2Fusps/lists"}