{"id":18000118,"url":"https://github.com/kiosion/sanity-ex","last_synced_at":"2025-04-04T07:44:00.924Z","repository":{"id":175944565,"uuid":"654698684","full_name":"kiosion/sanity-ex","owner":"kiosion","description":"Primitive Sanity.io client for Elixir applications","archived":false,"fork":false,"pushed_at":"2023-07-23T19:23:57.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T19:14:13.410Z","etag":null,"topics":["elixir","elixir-lang","elixir-library","sanity","sanity-cms","sanity-io"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/sanity_ex/","language":"Elixir","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/kiosion.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-16T18:13:24.000Z","updated_at":"2023-10-01T16:30:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"2201c4e3-7bf6-4c36-a1d4-1ab000df875a","html_url":"https://github.com/kiosion/sanity-ex","commit_stats":null,"previous_names":["kiosion/sanity-ex"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Fsanity-ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Fsanity-ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Fsanity-ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Fsanity-ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiosion","download_url":"https://codeload.github.com/kiosion/sanity-ex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142043,"owners_count":20890652,"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":["elixir","elixir-lang","elixir-library","sanity","sanity-cms","sanity-io"],"created_at":"2024-10-29T23:09:43.226Z","updated_at":"2025-04-04T07:44:00.905Z","avatar_url":"https://github.com/kiosion.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SanityEx\n\nA client for interacting with the Sanity API and constructing GROQ queries from Elixir applications.\n\nThis is a very primitive implementation, built mostly for practice \u0026 my own use, and only supports _some_ of GROQ's syntax. Please feel free to contribute!\n\n## Installation\n\nAdd `sanity_ex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n[\n  {:sanity_ex, \"~\u003e 0.1.0\"}\n]\n```\n\nand run `$ mix deps.get`.\n\n## Usage\n\nAdd the Client to your supervision tree:\n\n```elixir\ndefmodule MyApp.Application do\n  use Application\n\n  def start(_type, _args) do\n    children = [\n      {\n        SanityEx.Client,\n        project_id: \"your_project_id\",\n        dataset: \"production\",\n        api_version: \"v2021-03-25\",\n        token: \"your_token\"\n      }\n    ]\n\n    opts = [strategy: :one_for_one, name: MyApp.Supervisor]\n    Supervisor.start_link(children, opts)\n  end\nend\n```\n\nThen you can use the Client to interact with the Sanity API:\n\n```elixir\nSanityEx.Client.query(\"*[_type == 'movie']{title, releaseYear}\")\n```\n\n### Options\n\nThe following options are required when configuring the client:\n\n- `project_id` - The project ID for your Sanity project.\n- `api_version` - The dated version of the Sanity API to use.\n- `token` - The API token for making authorized requests.\n\nThe following are optional:\n- `dataset` - The dataset to query against. Defaults to `production`.\n- `asset_url` - The base asset URL to use. Defaults to `cdn.sanity.io/images/{project_id}/{dataset}/`.\n\n## Documentation\n\nDocumentation can be found at [https://hexdocs.pm/sanity_ex](https://hexdocs.pm/sanity_ex).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiosion%2Fsanity-ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiosion%2Fsanity-ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiosion%2Fsanity-ex/lists"}