{"id":23380598,"url":"https://github.com/agility/agilitycms-dotnet-sync","last_synced_at":"2025-04-08T07:43:12.908Z","repository":{"id":97728283,"uuid":"488233748","full_name":"agility/agilitycms-dotnet-sync","owner":"agility","description":"Agility CMS Sync SDK for Dotnet","archived":false,"fork":false,"pushed_at":"2024-12-02T19:45:25.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T04:51:13.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","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":"2022-05-03T14:03:52.000Z","updated_at":"2024-12-02T19:45:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"258af5f6-5758-4ae3-9d27-2e2466c935cf","html_url":"https://github.com/agility/agilitycms-dotnet-sync","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/agility%2Fagilitycms-dotnet-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agility%2Fagilitycms-dotnet-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agility%2Fagilitycms-dotnet-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agility%2Fagilitycms-dotnet-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agility","download_url":"https://codeload.github.com/agility/agilitycms-dotnet-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801198,"owners_count":20998331,"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:01.602Z","updated_at":"2025-04-08T07:43:12.884Z","avatar_url":"https://github.com/agility.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agility CMS \u0026 .NET Sync SDK\n\nTo start using the Agility CMS \u0026 .NET 5 Starter, [sign up](https://agilitycms.com/free) for a FREE account and create a new Instance using the Blog Template.\n\n[Introduction to .NET and Agility CMS](https://help.agilitycms.com/hc/en-us/articles/4404089239693)\n\n## About the Sync SDK\n\n- Uses the latest version of .NET, with greatly improved performance across many components, Language improvements to C# and F#, and much more.\n- Provides a facility to developers to sync their Pages, Items and Lists in their local file system.\n- Provides methods to clear the sync if you want to delete the generated files.\n- Supports generation of files in live and preview mode with the specified locale.\n- Ability to generate the objects from the extracted files of Pages, Items and Lists based on their respective Id's.\n\n## Getting Started\n\n🚨 Before you dive into the code, it's important that you have the latest version of the [.NET SDK](https://dotnet.microsoft.com/download) installed on your machine (\u003e=v6.0), as the project will _not_ run without this. Install the Nuget Packages Newtonsoft.Json (13.0.1) \u0026 RestSharp (106.11.7).\n\n### Generating/Syncing Pages, Items and Lists from your Agility Instance\n\n1. Clone the solution AgilityCMS.Net.Sync.SDK.\n2. Add namespaces AgilityCMS.Net.Sync \u0026 AgilityCMS.Net.Sync.SDK to make use of the SyncOptions class.\n3. Create an object of SyncOptions class to provide values of -\n   - rootPath -\u003e This will be the path where the output will be stored. This should be a physical path on your local file system.\n   - locale -\u003e The locale under which your application is hosted. Example en-us.\n4. Create string variables of Guid (your Instance Guid) and APIKey (either defaultlive or defaultpreview value). These values can be found under Settings -\u003e API Keys section of your organization.\n5. Create a boolean variable as IsPreview. A true value specifies that the application will run in preview mode else live mode. Make sure the API Key value should correspond the value of IsPreview variable.\n6. Create an object of SyncClient class and you may call following methods -\n   - SyncPages -\u003e To sync pages.\n   - SyncContent -\u003e To sync items and lists.\n   - ClearSync -\u003e To delete the generated files from the application.\n   - GetPage -\u003e Provide the pageId and the path where the page is generated to create an object of PageItems class. Use the store property of the object of SyncClient class to call the method.\n   - GetContentItem -\u003e Provide the contentID and the path where an item is generated to create an object of ContentItems class. Use the store property of the object of SyncClient class to call the method.\n   - GetContentList -\u003e Provide the referenceName and the path where a list is generated to create an object of List\u003cContentItems\u003e. Use the store property of the object of SyncClient class to call the method.\n7. Check out the Test project to see the functionality. Supply the values and run the tests. Refer the AgilityCMS.Net.Sync.Tests project.\n   - Make sure you have a `.runsettings` file with the proper configuration\n   - `dotnet test -s .runsettings`\n\n## Running the SDK Locally\n\n- `dotnet build` =\u003e Builds your .NET project.\n- `dotnet run` =\u003e Builds \u0026 runs your .NET project.\n- `dotnet clean` =\u003e Cleans the build outputs of your .NET project.\n\n## How It Works\n\n- [How Pages Work](https://help.agilitycms.com/hc/en-us/articles/4404222849677)\n- [How Page Modules Work](https://help.agilitycms.com/hc/en-us/articles/4404222989453)\n- [How Page Templates Work](https://help.agilitycms.com/hc/en-us/articles/4404229108877)\n\n## Resources\n\n### Agility CMS\n\n- [Official site](https://agilitycms.com)\n- [Documentation](https://help.agilitycms.com/hc/en-us)\n\n### .NET 6\n\n- [Official site](https://dotnet.microsoft.com/)\n- [Documentation](https://docs.microsoft.com/en-us/dotnet/)\n\n### Community\n\n- [Official Slack](https://join.slack.com/t/agilitycommunity/shared_invite/enQtNzI2NDc3MzU4Njc2LWI2OTNjZTI3ZGY1NWRiNTYzNmEyNmI0MGZlZTRkYzI3NmRjNzkxYmI5YTZjNTg2ZTk4NGUzNjg5NzY3OWViZGI)\n- [Blog](https://agilitycms.com/resources/posts)\n- [GitHub](https://github.com/agility)\n- [Forums](https://help.agilitycms.com/hc/en-us/community/topics)\n- [Facebook](https://www.facebook.com/AgilityCMS/)\n- [Twitter](https://twitter.com/AgilityCMS)\n\n## Feedback and Questions\n\nIf you have feedback or questions about this starter, please use the [Github Issues](https://github.com/agility/agilitycms-dotnet-sync/issues) on this repo, join our [Community Slack Channel](https://join.slack.com/t/agilitycommunity/shared_invite/enQtNzI2NDc3MzU4Njc2LWI2OTNjZTI3ZGY1NWRiNTYzNmEyNmI0MGZlZTRkYzI3NmRjNzkxYmI5YTZjNTg2ZTk4NGUzNjg5NzY3OWViZGI) or create a post on the [Agility Developer Community](https://help.agilitycms.com/hc/en-us/community/topics).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagility%2Fagilitycms-dotnet-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagility%2Fagilitycms-dotnet-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagility%2Fagilitycms-dotnet-sync/lists"}