{"id":37132724,"url":"https://github.com/ninesl/scryball","last_synced_at":"2026-01-14T15:29:10.350Z","repository":{"id":312784565,"uuid":"1047144324","full_name":"ninesl/scryball","owner":"ninesl","description":"Golang Magic The Gathering Scryfall API with SQLite persistent caching","archived":false,"fork":false,"pushed_at":"2025-09-30T14:49:13.000Z","size":1505,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-30T16:31:18.506Z","etag":null,"topics":["golang","magic-the-gathering","scryfall-api","sqlc","sqlite"],"latest_commit_sha":null,"homepage":"https://scryfall.com/docs/api","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ninesl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T20:15:06.000Z","updated_at":"2025-09-30T14:49:16.000Z","dependencies_parsed_at":"2025-09-02T02:26:17.726Z","dependency_job_id":"864205b6-a13d-4dcd-9c53-4ddcc505494e","html_url":"https://github.com/ninesl/scryball","commit_stats":null,"previous_names":["ninesl/scryball"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ninesl/scryball","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninesl%2Fscryball","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninesl%2Fscryball/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninesl%2Fscryball/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninesl%2Fscryball/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninesl","download_url":"https://codeload.github.com/ninesl/scryball/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninesl%2Fscryball/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","magic-the-gathering","scryfall-api","sqlc","sqlite"],"created_at":"2026-01-14T15:29:09.759Z","updated_at":"2026-01-14T15:29:10.342Z","avatar_url":"https://github.com/ninesl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scryball\n\nThread-safe Go client for the Scryfall Magic: The Gathering API with SQLite caching.\n\n```bash\ngo get github.com/ninesl/scryball\n```\n\n## Why?\n\n- **Cache lookups:** Cards are automatically cached to avoid redundant API calls\n- **Simple syntax:** Use Scryfall's search syntax directly: `\"color:red power\u003e=3\"`\n- **Simplified configuration:** Works out of the box, persist to disk optionally\n\n## Quick Start\n\n```go\nimport \"github.com/ninesl/scryball\"\n\ncards, err := scryball.Query(\"color:red power\u003e=3\")\ncard, err := scryball.QueryCard(\"Lightning Bolt\")\ncard, err := scryball.QueryCardByOracleID(\"4457ed35-7c10-48c8-9776-456485fdf070\")\n```\n\n## Persistent Cache\n\nBy default, cards are cached in memory. Set a database path to persist across restarts:\n\n```go\nscryball.SetConfig(scryball.ScryballConfig{\n    DBPath: \"./cards.db\",\n})\n\ncards, _ := scryball.Query(\"set:neo rarity:mythic\")\n```\n\nMultiple instances need separate database files:\n\n```go\nsb1, _ := scryball.NewWithConfig(scryball.ScryballConfig{DBPath: \"./app1.db\"})\nsb2, _ := scryball.NewWithConfig(scryball.ScryballConfig{DBPath: \"./app2.db\"})\n```\n\n## Card Data\n\nAll Scryfall API fields are available. Nullable fields are pointers:\n\nBased on: [https://scryfall.com/docs/api/cards](https://scryfall.com/docs/api/cards)\n\n```go\ncard, _ := scryball.QueryCard(\"Sol Ring\")\n\nfmt.Println(card.Name)        // \"Sol Ring\"\nfmt.Println(*card.ManaCost)   // \"{1}\"\nfmt.Println(*card.OracleText) // \"Add {C}{C}.\"\n\nfor _, printing := range card.Printings {\n    fmt.Printf(\"%s (%s)\\n\", printing.SetName, printing.SetCode)\n}\n```\n\n## Decklist Parsing\n\n```go\ndeckText := `\n4 Lightning Bolt\n20 Mountain\n\nSideboard\n3 Pyroblast\n`\n\ndeck, err := scryball.ParseDecklist(deckText)\nfmt.Printf(\"%d cards, %d sideboard\\n\", deck.NumberOfCards(), deck.NumberOfSideboardCards())\n```\n\n## Context Support\n\n```go\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)\ndefer cancel()\n\ncards, err := scryball.QueryWithContext(ctx, \"set:one\")\n```\n\n## Thread Safety\n\nAll operations are thread-safe:\n\n```go\nvar wg sync.WaitGroup\nfor _, color := range []string{\"red\", \"blue\", \"green\"} {\n    wg.Add(1)\n    go func(c string) {\n        defer wg.Done()\n        cards, _ := scryball.Query(\"set:neo r:rare c:\" + c)\n        fmt.Printf(\"%s: %d cards\\n\", c, len(cards))\n    }(color)\n}\nwg.Wait()\n```\n\n---\n\n**Full query syntax:** https://scryfall.com/docs/syntax  \n**Complete API reference:** [docs/API_REFERENCE.md](docs/API_REFERENCE.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninesl%2Fscryball","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninesl%2Fscryball","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninesl%2Fscryball/lists"}