{"id":15015972,"url":"https://github.com/mileszim/ember-particle","last_synced_at":"2026-01-04T23:09:30.041Z","repository":{"id":57224119,"uuid":"112409499","full_name":"mileszim/ember-particle","owner":"mileszim","description":"Ember service for the Particle API","archived":false,"fork":false,"pushed_at":"2018-10-18T08:08:03.000Z","size":239,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-21T09:30:39.488Z","etag":null,"topics":["api","ember","ember-addon","ember-cli-addon","iot","particle","particle-io","spark"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mileszim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-29T01:19:36.000Z","updated_at":"2018-10-18T08:03:51.000Z","dependencies_parsed_at":"2022-08-30T02:40:42.778Z","dependency_job_id":null,"html_url":"https://github.com/mileszim/ember-particle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mileszim%2Fember-particle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mileszim%2Fember-particle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mileszim%2Fember-particle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mileszim%2Fember-particle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mileszim","download_url":"https://codeload.github.com/mileszim/ember-particle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244981293,"owners_count":20542288,"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":["api","ember","ember-addon","ember-cli-addon","iot","particle","particle-io","spark"],"created_at":"2024-09-24T19:48:13.802Z","updated_at":"2026-01-04T23:09:29.923Z","avatar_url":"https://github.com/mileszim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-particle #\n[![Build Status](https://travis-ci.org/mileszim/ember-particle.svg?branch=master)](https://travis-ci.org/mileszim/ember-particle) [![npm version](https://badge.fury.io/js/ember-particle.svg)](https://badge.fury.io/js/ember-particle) [![Ember Observer Score](https://emberobserver.com/badges/ember-particle.svg)](https://emberobserver.com/addons/ember-particle)\n\n`ember-particle` is an addon for Ember.js providing an injectable service that acts as a wrapper around the [Particle](https://particle.io/) API.\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install ember-particle\n```\n\n\nUsage\n------------------------------------------------------------------------------\n\n`ember-particle` enables all functions identical to their API as it is just a wrapper.\n\n#### API Documentation ####\nComplete API docs for all Particle.io methods are available at the JS SDK doc site https://docs.particle.io/reference/javascript/\n\n### Examples ###\n\n##### *login(username, password)* ####\n\nLogin a user with a username and password:\n```javascript\n//...\nimport { inject as service } from '@ember/service';\n\nexport default Controller.extend({\n  particle: service('particle'),\n\n  actions: {\n    loginToParticle(username, password) {\n      this.get('particle')\n        .login(username, password)\n        .then((success) =\u003e {\n          alert('you logged into particle! huzzah!');\n        })\n        .catch((error) =\u003e {\n          alert('Something went terribly wrong', error);\n        });\n    }\n  }\n});\n```\n\n\n#### Device Info ####\n\n##### *listDevices()* ####\n\nList devices for a user\n```javascript\n//...\nimport { inject as service } from '@ember/service';\n\nexport default Controller.extend({\n  particle: service('particle'),\n  devices: this.get('particle').listDevices()\n});\n```\n\n##### *getDevice(deviceId)* ####\n\nGets all attributes for a device\n```javascript\n//...\nimport { inject as service } from '@ember/service';\n\nexport default Controller.extend({\n  particle: service('particle'),\n  device: this.get('particle').getDevice('asdf1234')\n});\n```\n\n\nContributing\n------------------------------------------------------------------------------\n\nI'm always happy to take on PRs. Here is how to get up and running:\n\n## Installation ##\n\n* `git clone https://github.com/mileszim/ember-particle` this repository\n* `cd ember-particle`\n* `yarn install`\n\n## Running ##\n\n* `npm run lint:hbs`\n* `npm run lint:js`\n* `npm run lint:js -- --fix`\n\n### Running tests\n\n* `ember test` – Runs the test suite on the current Ember version\n* `ember test --server` – Runs the test suite in \"watch mode\"\n* `ember try:each` – Runs the test suite against multiple Ember versions\n\n### Running the dummy application\n\n* `ember serve`\n* Visit the dummy application at [http://localhost:4200](http://localhost:4200).\n\nFor more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).\n\nLicense\n------------------------------------------------------------------------------\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmileszim%2Fember-particle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmileszim%2Fember-particle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmileszim%2Fember-particle/lists"}