{"id":16805477,"url":"https://github.com/dewski/wink","last_synced_at":"2025-06-21T18:04:30.468Z","repository":{"id":21729706,"uuid":"25051400","full_name":"dewski/wink","owner":"dewski","description":"A Ruby wrapper for the Wink Hub API.","archived":false,"fork":false,"pushed_at":"2015-05-14T05:02:08.000Z","size":232,"stargazers_count":18,"open_issues_count":1,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T00:46:24.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/dewski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-10T20:11:52.000Z","updated_at":"2018-11-28T03:46:59.000Z","dependencies_parsed_at":"2022-08-17T17:15:40.615Z","dependency_job_id":null,"html_url":"https://github.com/dewski/wink","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dewski/wink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fwink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fwink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fwink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fwink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dewski","download_url":"https://codeload.github.com/dewski/wink/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewski%2Fwink/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261170422,"owners_count":23119511,"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-13T09:48:21.657Z","updated_at":"2025-06-21T18:04:25.430Z","avatar_url":"https://github.com/dewski.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wink\n\nA Ruby wrapper for the [Wink Hub](http://www.winkapp.com/) [API](http://docs.wink.apiary.io/)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'wink'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install wink\n\n## Usage\n\n```ruby\nWink.configure do |wink|\n  wink.client_id     = ENV['WINK_CLIENT_ID']\n  wink.client_secret = ENV['WINK_CLIENT_SECRET']\n  wink.access_token  = ENV['WINK_ACCESS_TOKEN']\n  wink.refresh_token = ENV['WINK_REFRESH_TOKEN']\nend\n```\n\nFinding your connected devices:\n\n```ruby\nclient = Wink::Client.new\nclient.devices\n```\n\nFinding a subset of your devices:\n\n```ruby\nclient.light_bulbs\nclient.binary_switches\nclient.garage_doors\n```\n\nControlling binary switch:\n\n```ruby\nlight_bulb = client.light_bulbs.find(400)\nlight_bulb.powered?\nlight_bulb.off\nlight_bulb.off? # =\u003e true\nlight_bulb.on\nlight_bulb.on? # =\u003e true\nlight_bulb.toggle\nlight_bulb.off? # =\u003e true\n```\n\nControlling garage doors:\n\n```ruby\ndoor = client.garage_doors.find(1)\ndoor.position # =\u003e 0\ndoor.open\ndoor.open?\ndoor.closed?\ndoor.close\ndoor.opening?\n```\n\nList groups of devices:\n\n```ruby\nclient = Wink::Client.new\nclient.groups\n```\n\nFind a group:\n\n```ruby\nclient = Wink::Client.new\n\n# find by name\ngroup = client.group('Living Room')\ngroup.name\ngroup.id\n\n# find by id\ngroup = client.group(2322322)\ngroup.name\ngroup.id\n```\n\nAdjust a group:\n\n```ruby\nclient = Wink::Client.new\n\ngroup = client.group('Living Room')\ngroup.on\ngroup.off\ngroup.dim(0.05)\n```\n\nList scenes (Shortcuts in the Wink App):\n\n```ruby\nclient = Wink::Client.new\nclient.scenes\n```\n\nFind a scene:\n\n```ruby\nclient = Wink::Client.new\n\n# find by name\nscene = client.scene('Good Night')\nscene.name\nscene.id\n\n# find by id\nscene = client.scene(34322)\nscene.name\nscene.id\n```\n\nActivate a scene:\n\n```ruby\nclient = Wink::Client.new\n\nscene = client.scene('Good Night')\nscene.activate\n```\n\nList subscriptions for each device:\n\n```\nlight_bulb.subscriptions\n```\n\nCreate subscription for device:\n\n```ruby\nlight_bulb.subscriptions.create(:secret =\u003e \"1\", :callback =\u003e \"http://requestb.in/\")\n```\n\nParse incoming subscription payload from Wink API:\n\n```\nWink::Subscription.parse(params[:payload])\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/dewski/wink/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewski%2Fwink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdewski%2Fwink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewski%2Fwink/lists"}