Coder Social home page Coder Social logo

csharp's People

Contributors

mxsdev avatar razor-x avatar seambot avatar seveibar avatar

Watchers

 avatar  avatar  avatar

csharp's Issues

Error handling for deleted access codes

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);
}

Setup automerge for `seam-connect` changes

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...)

Missing ClimateSettingSchedulesThermostats.Delete()

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);

Response from create Connect Webview does not include set customMetadata.

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);

Missing Devices.Update

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)

Stringify Resources Better in C# SDK

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.