{"id":27999037,"url":"https://github.com/dnsimple/dnsimple-csharp","last_synced_at":"2025-05-08T22:55:54.527Z","repository":{"id":38241618,"uuid":"259939620","full_name":"dnsimple/dnsimple-csharp","owner":"dnsimple","description":"The DNSimple API client for C#.","archived":false,"fork":false,"pushed_at":"2025-05-01T02:53:06.000Z","size":666,"stargazers_count":12,"open_issues_count":1,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-08T22:55:44.974Z","etag":null,"topics":["api","api-client","csharp","dnsimple","dnsimple-api","dnsimple-policy-eng","dnsimple-policy-group-apiclient","dnsimple-policy-triage-application"],"latest_commit_sha":null,"homepage":"https://developer.dnsimple.com/","language":"C#","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/dnsimple.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-29T13:55:44.000Z","updated_at":"2025-04-30T07:40:01.000Z","dependencies_parsed_at":"2023-01-31T11:30:28.143Z","dependency_job_id":"c81d3177-5315-45e3-a4b0-01150226a9e8","html_url":"https://github.com/dnsimple/dnsimple-csharp","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnsimple","download_url":"https://codeload.github.com/dnsimple/dnsimple-csharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160797,"owners_count":21863627,"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":["api","api-client","csharp","dnsimple","dnsimple-api","dnsimple-policy-eng","dnsimple-policy-group-apiclient","dnsimple-policy-triage-application"],"created_at":"2025-05-08T22:55:53.955Z","updated_at":"2025-05-08T22:55:54.520Z","avatar_url":"https://github.com/dnsimple.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DNSimple C# Client\n\nA C# client for the [DNSimple API v2](https://developer.dnsimple.com/v2/).\n\n[![Build Status](https://github.com/dnsimple/dnsimple-csharp/actions/workflows/ci.yml/badge.svg)](https://github.com/dnsimple/dnsimple-csharp/actions/workflows/ci.yml)\n[![NuGet version](https://badge.fury.io/nu/dnsimple.svg)](https://badge.fury.io/nu/dnsimple)\n\n## Installation\n\nWhere `\u003cversion\u003e` denotes the version of the client you want to install.\n\n### Package Manager\n\n```shell\nPM\u003e Install-Package DNSimple -Version \u003cversion\u003e\n```\n\n## Usage\n\nThis library is a C# client you can use to interact with the [DNSimple API v2](https://developer.dnsimple.com/v2/). Here are some examples.\n\n```c#\nusing dnsimple;\n\nvar client = new Client();\nvar credentials = new OAuth2Credentials(\"...\");\nclient.AddCredentials(credentials);\n\n// Fetch your details\nvar response = client.Identity.Whoami();   // execute the call\nvar account = response.Data.Account;       // extract the relevant data from the response or\nclient.Identity.Whoami().Data.Account;     // execute the call and get the data in one line\n\n// You can also fetch it from the whoami response\n// as long as you authenticate with an Account access token\nvar whoami = client.Identity.Whoami().Data;\nvar accountId = whoami.Account.Id;\n```\n\n### List your domains\n\n```c#\nusing dnsimple;\n\nvar client = new Client();\nclient.AddCredentials(new OAuth2Credentials(\"...\"));\n\nvar accountId = client.Identity.Whoami().Data.Account.Id;\nvar domains = client.Domains.ListDomains(accountId).Data;\n```\n\n### Create a domain\n\n```c#\nusing dnsimple;\n\nvar client = new Client();\nclient.AddCredentials(new OAuth2Credentials(\"...\"));\n\nvar accountId = client.Identity.Whoami().Data.Account.Id;\nvar domain = client.Domains.CreateDomain(accountId, new Domain{ Name = \"example.com\" }).Data;\n```\n\n### Retrieve a domain\n\n```c#\nusing dnsimple;\n\nvar client = new Client();\nclient.AddCredentials(new OAuth2Credentials(\"...\"));\n\nvar accountId = client.Identity.Whoami().Data.Account.Id;\nvar domainId = client.Domains.ListDomains(accountId).Data.First().Id;\nvar domain = client.Domains.GetDomain(accountId, domainId).Data;\n```\n\n## Sandbox Environment\n\nWe highly recommend testing against our [sandbox environment](https://developer.dnsimple.com/sandbox/) before using our production environment.\nThis will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.\n\nThe client supports both the production and sandbox environment.\nTo switch to sandbox pass the sandbox API host using the `ChangeBaseUrlTo(...)` method when you construct the client:\n\n```c#\nvar client = new Client();\nclient.ChangeBaseUrlTo(\"https://api.sandbox.dnsimple.com\");\n\nvar credentials = new OAuth2Credentials(\"...\");\nclient.AddCredentials(credentials);\n```\n\nYou will need to ensure that you are using an access token created in the sandbox environment. Production tokens will *not* work in the sandbox environment.\n\n## Setting a custom `User-Agent` header\n\nYou can customize the `User-Agent` header for the calls made to the DNSimple API:\n\n```c#\nvar client = new Client();\nclient.SetUserAgent(\"my-app/1.0\");\n```\n\nThe value you provide will be prepended to the default `User-Agent` the client uses. For example, if you use `my-app/1.0`, the final header value will be `my-app/1.0 dnsimple-csharp/0.14.0` (note that it will vary depending on the client version).\n\nWe recommend to customize the user agent. If you are building a library or integration on top of the official client, customizing the client will help us to understand what is this client used for, and allow to contribute back or get in touch.\n\n## License\n\nCopyright (c) 2025 DNSimple Corporation. This is Free Software distributed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsimple%2Fdnsimple-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnsimple%2Fdnsimple-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsimple%2Fdnsimple-csharp/lists"}