{"id":13800607,"url":"https://github.com/LightTable/fetch","last_synced_at":"2025-05-13T09:31:46.778Z","repository":{"id":2389533,"uuid":"3355500","full_name":"LightTable/fetch","owner":"LightTable","description":"A ClojureScript library for Client/Server interaction ⛺","archived":true,"fork":false,"pushed_at":"2020-10-25T07:46:03.000Z","size":23,"stargazers_count":206,"open_issues_count":6,"forks_count":30,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-18T15:54:12.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/LightTable.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-04T21:21:32.000Z","updated_at":"2024-08-22T14:30:00.000Z","dependencies_parsed_at":"2022-07-08T22:16:58.958Z","dependency_job_id":null,"html_url":"https://github.com/LightTable/fetch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightTable%2Ffetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightTable%2Ffetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightTable%2Ffetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightTable%2Ffetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LightTable","download_url":"https://codeload.github.com/LightTable/fetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253913197,"owners_count":21983273,"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":"2024-08-04T00:01:14.217Z","updated_at":"2025-05-13T09:31:45.567Z","avatar_url":"https://github.com/LightTable.png","language":"Clojure","funding_links":[],"categories":["Awesome ClojureScript"],"sub_categories":["Client/Server Communication"],"readme":"# fetch\n\nA ClojureScript library that makes client/server interaction painless.\n\n## Usage\n\n### Remotes\n\nRemotes let you make calls to a noir server without having to think about XHR. On the client-side you simply have code that looks like this:\n\n```clojure\n(ns playground.client.test\n  (:require [fetch.remotes :as remotes])\n  (:require-macros [fetch.macros :as fm]))\n\n(fm/remote (adder 2 5 6) [result]\n  (js/alert result))\n\n(fm/remote (get-user 2) [{:keys [username age]}]\n  (js/alert (str \"Name: \" username \", Age: \" age)))\n\n;; for a much nicer experience, use letrem\n(fm/letrem [a (adder 3 4)\n            b (adder 5 6)]\n    (js/alert (str \"a: \" a \" b: \" b)))\n```\n\nNote that the results we get are real Clojure datastructures and so we use them just as we would in normal Clojure code. No JSON here.\n\nThe noir side of things is just as simple. All you do is declare a remote using defremote.\n\n```clojure\n(use 'noir.fetch.remotes)\n\n(defremote adder [\u0026 nums]\n           (apply + nums))\n\n(defremote get-user [id]\n           {:username \"Chris\"\n            :age 24})\n\n(server/start 8080)\n```\n\n## License\n\nCopyright (c) 2014 Kodowa, Inc. \u0026 Light Table contributors\n\nDistributed under the MIT License. See LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLightTable%2Ffetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLightTable%2Ffetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLightTable%2Ffetch/lists"}