-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration guide from seamapi Ruby gem #3
Comments
Migration guide from seamapi to seamLearn how to migrate from the The new SDK has fewer dependencies and is generated daily to ensure methods and types are always up-to-date with the latest API changes. It is mostly a drop-in replacement, however some method signatures and options have changed to improve overall consistency with the Seam API. This guide includes descriptions of all breaking changes. Please refer to the README for updated usage instructions and a complete list of new features. New Ruby gem nameChanged the gem name from - bundle add seamapi
+ bundle add seam Simplified main class initializationThe main class has been renamed from seam = Seam.new(api_key: "my-api-key") Updated API method signaturesKeyword argumentsAPI method signatures now only accept keyword arguments. - seam.access_codes.get("my_access_code_id")
+ seam.access_codes.get(access_code_id: "my_access_code_id") - seam.locks.get("my_lock_device_id")
+ seam.locks.get(device_id: "my_lock_device_id") Standardized resource ID argumentsChanged from accepting both resource objects and resource ID strings to accepting only resource ID strings. Includes a renaming scheme for clarity. - def unlock_door(device_or_id)
+ def unlock_door(device_id:) Usage- seam.locks.get(device: my_device)
+ seam.locks.get(device_id: my_device.device_id) Removed methodsRemoved - seam.locks.unlock_door(device_id: "my_device_id").wait_until_finished
+ seam.locks.unlock_door(device_id: "my_device_id", wait_for_action_attempt: true) Removed constructor argumentRemoved the Renamed constructor argumentRenamed the Deprecated methods
|
@razor-x here's the first version of migration guide. Some things are still not implemented, like:
|
@andrii-balitskyi We don't need to add more top level name, we can keep |
Migration guideLearn how to migrate from the The new SDK has fewer dependencies and is generated daily to ensure methods and types are always up-to-date with the latest API changes. It is mostly a drop-in replacement, however some method signatures and options have changed to improve overall consistency with the Seam API. This guide includes descriptions of all breaking changes. Please refer to the README for updated usage instructions and a complete list of new features. New Ruby gem nameChanged the gem name from - bundle add seamapi
+ bundle add seam Simplified main class initializationThe main class has been renamed from seam = Seam.new(api_key: "your-api-key") Specify Updated API method signaturesKeyword argumentsAPI method signatures now only accept keyword arguments. - seam.access_codes.get("your-access-code-id")
+ seam.access_codes.get(access_code_id: "your-access-code-id") - seam.devices.get("your-device-id")
+ seam.devices.get(device_id: "your-device-id") Standardized resource ID argumentsChanged from accepting both resource objects and resource ID strings to accepting only resource ID strings. Includes a renaming scheme for clarity. - def unlock_door(device_or_id)
+ def unlock_door(device_id:) Usage- seam.devices.get(device: your_device)
+ seam.devices.get(device_id: your_device.device_id) Removed methodsRemoved - seam.locks.unlock_door(device_id: "your-device-id").wait_until_finished
+ seam.locks.unlock_door(device_id: "your-device-id", wait_for_action_attempt: true) Removed constructor argumentRemoved the Renamed constructor argumentRenamed the Deprecated methods
|
See for reference seamapi/javascript#1 or seamapi/python#7
The text was updated successfully, but these errors were encountered: