{"id":23380614,"url":"https://github.com/agility/agility-content-fetch-js-sdk","last_synced_at":"2025-04-10T22:42:59.388Z","repository":{"id":34296502,"uuid":"174748829","full_name":"agility/agility-content-fetch-js-sdk","owner":"agility","description":"JS SDK for the Agility Fetch API (node and browser)","archived":false,"fork":false,"pushed_at":"2024-12-13T20:26:28.000Z","size":1418,"stargazers_count":4,"open_issues_count":23,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T19:39:41.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://agilitydocs.netlify.com/agility-content-fetch-js-sdk/","language":"TypeScript","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/agility.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-09T21:36:03.000Z","updated_at":"2024-09-25T15:26:06.000Z","dependencies_parsed_at":"2024-01-09T17:42:38.212Z","dependency_job_id":"d7f9149d-0ff7-4a2d-b2ab-e6d166053855","html_url":"https://github.com/agility/agility-content-fetch-js-sdk","commit_stats":{"total_commits":122,"total_committers":10,"mean_commits":12.2,"dds":0.4426229508196722,"last_synced_commit":"f4a801fa7fb003ec42346e3c48274ee394f1be1c"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agility%2Fagility-content-fetch-js-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agility%2Fagility-content-fetch-js-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agility%2Fagility-content-fetch-js-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agility%2Fagility-content-fetch-js-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agility","download_url":"https://codeload.github.com/agility/agility-content-fetch-js-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103910,"owners_count":21048246,"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-12-21T20:17:05.646Z","updated_at":"2025-04-10T22:42:59.367Z","avatar_url":"https://github.com/agility.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://agility.visualstudio.com/Agility%20CMS/_apis/build/status/Fetch%20API/Agility%20Content%20Fetch%20JS%20SDK?branchName=master)](https://agility.visualstudio.com/Agility%20CMS/_build/latest?definitionId=59\u0026branchName=master)\n[![Netlify Status](https://api.netlify.com/api/v1/badges/c45f5d6e-923b-4019-820e-826e6185017d/deploy-status)](https://app.netlify.com/sites/agilitydocs/deploys)\n\n# Agility Content Fetch JS SDK\n\nThis is the official JavaScript/TypeScript library for accessing live and preview content from your [Agility CMS](https://agilitycms.com) instance.\n\nYou can use this in both node and browser based JS apps.\n\nDon't have an Agility CMS instance? Sign up for [Free Trial](https://agilitycms.com/free) today!\n\n## Features\n\n- Queries the high-availability, CDN backed Agility Fetch REST API\n- Get a sitemap for a given channel\n- Get a page, including its content zones, modules, and their content\n- Get a content item\n- Query a content list using a filter syntax\n- Get the details of a media gallery\n- Keep track of syncing content to your app\n\n## Getting Started\n\nIn order to use this sdk, you'll need to install the `@agility/content-fetch` package and you'll also need to authenticate your requests.\n\n### Prerequisites\n\nYou must have access to an Agility instance to retrieve the _guid_ and generate your _apiKey_. Or, you must have these values provided to you.\n\n### Installation\n\n**npm**\n\n```\nnpm install @agility/content-fetch\n```\n\n**yarn**\n\n```\nyarn add @agility/content-fetch\n```\n\n### Making a Request\n\n```javascript\nimport agility from \"@agility/content-fetch\"\n\n//initialize the api client\nconst api = agility.getApi({\n\tguid: \"[guid]\",\n\tapiKey: \"[your-api-key]\",\n})\n\n//make the request: get a content item with the ID 22 in locale 'en-us'\nconst contentItems = await api.getContentItem({\n\tcontentID: 22,\n\tlocale: \"en-us\",\n})\n```\n\n## Documentation\n\nFull documentation for this SDK can be found in our [Agility Fetch JS SDK Reference Doc](https://agilitydocs.netlify.com/agility-content-fetch-js-sdk/).\n\nFor docs \u0026 help around Agility CMS, please see [Agility CMS Documentation](https://help.agilitycms.com/hc/en-us)\n\n## Tutorials\n\n[About the Content Fetch API](https://help.agilitycms.com/hc/en-us/articles/360031985112-About-the-Content-Fetch-API)\n\n[Authenticating your Content Fetch API Calls](https://help.agilitycms.com/hc/en-us/articles/360032225191-Authenticating-your-Content-Fetch-API-Calls)\n\n[Retrieving your API Key(s), Guid, and API URL](https://help.agilitycms.com/hc/en-us/articles/360031919212-Retrieving-your-API-Key-s-Guid-and-API-URL-)\n\n[Making your First Call with the Content Fetch API](https://help.agilitycms.com/hc/en-us/articles/360031918152-Making-your-First-API-Call-with-the-Content-Fetch-API)\n\n[Calilng the Content Fetch API using the Javascript SDK](https://help.agilitycms.com/hc/en-us/articles/360031945912-Calling-the-Content-Fetch-API-using-the-JavaScript-SDK)\n\n[Page Management in a Headless CMS](https://help.agilitycms.com/hc/en-us/articles/360032554331-Page-Management-in-a-Headless-CMS)\n\n[Using Agility CMS with Create React App](https://help.agilitycms.com/hc/en-us/articles/360031121692-Using-Agility-CMS-with-Create-React-App-CRA-)\n\n[Creating a Module for the Agility CMS Create React App](https://help.agilitycms.com/hc/en-us/articles/360031590791-Creating-a-Module-for-the-Agility-CMS-Create-React-App)\n\n[Creating a Page Template for the Agility CMS Create React App](https://help.agilitycms.com/hc/en-us/articles/360032611011-Creating-a-Page-Template-for-the-Agility-CMS-Create-React-App)\n\n[Deploying your Agility CMS Create React App](https://help.agilitycms.com/hc/en-us/articles/360032203552-Deploying-your-Agility-CMS-Create-React-App)\n\n[Content Webhooks](https://help.agilitycms.com/hc/en-us/articles/360035934911)\n\n## Contributing\n\nIf you would like to contribute to this SDK, you can fork the repository and submit a pull request. We'd love to include your updates.\n\n### Running the Tests\n\nAn essential part of contributing to this SDK is adding and running unit tests to ensure the stability of the project.\n\n```\n\u003e npm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagility%2Fagility-content-fetch-js-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagility%2Fagility-content-fetch-js-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagility%2Fagility-content-fetch-js-sdk/lists"}