{"id":16687225,"url":"https://github.com/redth/nestsharp","last_synced_at":"2025-04-10T00:17:46.203Z","repository":{"id":31015230,"uuid":"34573701","full_name":"Redth/NestSharp","owner":"Redth","description":"A Portable NEST API Client for C#/.NET","archived":false,"fork":false,"pushed_at":"2018-10-09T17:49:50.000Z","size":239,"stargazers_count":7,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T00:17:39.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Redth.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}},"created_at":"2015-04-25T15:24:20.000Z","updated_at":"2022-08-28T07:27:42.000Z","dependencies_parsed_at":"2022-09-08T17:22:30.753Z","dependency_job_id":null,"html_url":"https://github.com/Redth/NestSharp","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/Redth%2FNestSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redth%2FNestSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redth%2FNestSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redth%2FNestSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Redth","download_url":"https://codeload.github.com/Redth/NestSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131318,"owners_count":21052820,"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-10-12T15:08:15.864Z","updated_at":"2025-04-10T00:17:46.179Z","avatar_url":"https://github.com/Redth.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NestSharp\n\nThis is a feeble attempt at creating a C#/.NET Portable Library to consume data from and interact with NEST devices.\n\n**This is a work in progress**! \nCurrently some of the basics work, you can get information about devices, and you can adjust the temperature of a thermostat.  The groundwork is there, and the rest just needs to be added.\n\n## Authorization\nNEST uses OAUTH to authorize.  Currently only the PIN (no Callback URI specified in your client) is supported.  When you create a NEST Client in the developer portal, be sure to specify no callback URI.\n\nTo authorize using the API, first get the authorization URI:\n\n```csharp\nvar authUrl = nest.GetAuthorizationUrl ();\n```\n\nYou'll need to display this to the user in a web browser of some sort, they will accept the permissions they are authorizing, login, and finally be shown a PIN which they'll need to enter back in the application.\n\nWhen you have the PIN, get an access token:\n\n```csharp\nawait nest.GetAccessToken (pin);\n```\nNOTE: Obtaining an access token will return an expiry time for the token, however NEST states that the expiry time is so long-lived that it can be considered indefinite, and as such, there is no refresh-token API to keep the access token current.  You should probably check for HTTP 401 errors on API calls just to be safe.\n\n## NEST APIs\n\nOnce you have received your access token, you can start to make requests to the API methods.\n\n```csharp\n// Fetch devices \nvar devices = await nest.GetDevicesAsync ();\n\n// Loop through the devices\nforeach (var t in devices.Thermostats) {\n\n\t// Set the temperature on our thermostats\n\tawait nest.AdjustTemperatureAsync (\n\t\t\tt.DeviceId,\n\t\t\t21.5f,\n\t\t\tTemperatureScale.C);                \n}\n```\n\n\n## // TODO:\n\n - More object data models (*ahem* Company)\n - OAuth with a non-empty callback url\n - Actually write some tests for that nice little NUNit project\n - Moar API coverage\n - Sample app!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredth%2Fnestsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredth%2Fnestsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredth%2Fnestsharp/lists"}