seamapi / csharp Goto Github PK
View Code? Open in Web Editor NEWCSharp SDK autogenerated from nextlove types.
CSharp SDK autogenerated from nextlove types.
Missing the following:
seam.Locks.Get()
seam.Devices.Get()
As this page describes, the code snippet here should return a 404 because the specified access code has already been deleted successfully, but this code does not return anything.
Affected device: 6aae9d08-fed6-4ca5-8328-e36849ab48fe
Deleted code ID: fe372cb9-1fa5-492f-9494-ea01c5558333
try
{
seam.AccessCodes.Get(accessCodeId: "fe372cb9-1fa5-492f-9494-ea01c5558333");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
We will probably need to tweak our configuration for renovate.json
.
It should track @seamapi/types
and merge on green. Not sure how versioning is supposed to work (major version bumps to underlying needs to reflect in released version...)
It seems like there might not yet be a way to delete a climate setting schedule for a thermostat in the C# SDK.
I'm assuming that it would be something like this...
var deletion = seam.ClimateSettingSchedulesThermostats.Delete(climateSettingScheduleId: "ef800068-9e0a-4a76-97f6-7e54b8b22bd2");
Console.WriteLine(deletion);
We should bring almost all typescript code to the codegen repository
cc @seveibar
In this code, the output form the last line does not include the set customMetadata, but if I get the same object using the HTTP API, it does show the set customMetadata. Is this the correct behavior, or should the create response include the set customMetadata?
var userId = "user1";
var customMetadata = new Dictionary<string, string>()
{
{"id", userId}
};
var createdConnectWebview = seam.ConnectWebviews.Create(
providerCategory: Seam.Api.ConnectWebviews.CreateRequest.ProviderCategoryEnum.Stable,
customMetadata: customMetadata
);
Console.WriteLine(createdConnectWebview);
There does not seem to be a C# equivalent to https://connect.getseam.com/devices/update
.
HTTP API:
curl -X 'POST' \
'https://connect.getseam.com/devices/update' \
-H 'accept: application/json' \
-H 'Authorization: Bearer ${API_KEY}' \
-H 'Content-Type: application/json' \
-d '{
"device_id": "30fd243b-3054-4384-a713-5487076a3826",
"name": "My Lock"
}'
Python:
device_id = "30fd243b-3054-4384-a713-5487076a3826"
device_update = seam.devices.update(
device = device_id,
name = "My Lock"
)
pprint(device_update)
Currently this:
Console.WriteLine(seam.Devices.List());
Outputs this:
System.Collections.Generic.List`1[Seam.Model.Device]
When we really want it to do something like this (from Ruby, exclude the pound signs):
# [
# <Seam::Device:0x00764f8
# device_id="e002825a-27ee-4d74-9be3-45564b14c931"
# device_type="smartthings_lock"
# properties={
# "locked"=>true,
# "online"=>true,
# "battery_level"=>1,
# "manufacturer"=>"yale",
# "smartthings_metadata"=>{
# "device_id"=>"83b32603-e36a-416b-a06e-78215223df98",
# "device_name"=>"Yale Door Lock"},
# "max_active_codes_supported": 100,
# "supported_code_lengths": [
# 6
# ],
# "name"=>"Yale Door Lock"}>
# ]
Might not be possible with lists, but would be great to have it for resources directly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.