{"id":21540018,"url":"https://github.com/robinpowered/robin-js-sdk-public","last_synced_at":"2025-04-10T03:26:54.792Z","repository":{"id":30232042,"uuid":"33783160","full_name":"robinpowered/robin-js-sdk-public","owner":"robinpowered","description":"Robin Javascript SDK","archived":false,"fork":false,"pushed_at":"2020-03-25T00:33:17.000Z","size":1494,"stargazers_count":1,"open_issues_count":3,"forks_count":3,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-24T04:43:40.769Z","etag":null,"topics":["javascript","robin","sdk"],"latest_commit_sha":null,"homepage":"https://docs.robinpowered.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robinpowered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-11T16:26:53.000Z","updated_at":"2022-05-20T17:55:04.000Z","dependencies_parsed_at":"2022-08-30T05:32:13.716Z","dependency_job_id":null,"html_url":"https://github.com/robinpowered/robin-js-sdk-public","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinpowered%2Frobin-js-sdk-public","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinpowered%2Frobin-js-sdk-public/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinpowered%2Frobin-js-sdk-public/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinpowered%2Frobin-js-sdk-public/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robinpowered","download_url":"https://codeload.github.com/robinpowered/robin-js-sdk-public/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248150084,"owners_count":21055854,"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":["javascript","robin","sdk"],"created_at":"2024-11-24T04:17:01.420Z","updated_at":"2025-04-10T03:26:54.768Z","avatar_url":"https://github.com/robinpowered.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robin JavaScript SDK\n\nA JavaScript SDK to communicate with the [Robin](http://getrobin.com/) platform.\n\nThis SDK provides the ability to communicate both with the Robin API and the Robin Grid.\n\n### Installation\n\n##### node\n\n`npm install git@github.com:robinpowered/robin-js-sdk.git --save` will save this to the `dependencies` section of your `package.json`\n\nYou may then `require` this `sdk` as follows:\n\n````javascript\nvar Robin = require('robin-js-sdk');\n````\n\n##### browser\n\nInclude the script from `https://static.robinpowered.com/js/sdk/$version/robin.browser.min.js`, where `$version` is the npm version number in `package.json`. `robin-js-sdk` will be automatically attached to the `window` object as `window.Robin`.\n\n### Instantiation\n\n`robin-js-sdk` is instantiated with two arguments, the first is a Robin Access Token. The second is an optional argument that can be `null`, a `string`, an `object` or `undefined`.\n\n##### Options\n\nIf the second argument is `undefined` or `null`, this `SDK` will be instantiated with endpoints pointing to `production`.\n\nIf it is a string, it must be a valid `robin` endpoint. Valid values are `test`, `staging` or `production`. Otherwise an error is thrown.\n\nIf it is an object:\n\n* An empty object will result in all endpoints defaulting to production.\n* If it contains an `env` property, all endpoints will default to that env. Values other than string types for this property will throw errors.\n* If it has a `urls` property, then values for `core`, `grid` or `places` will override the default endpoint for any of those apps. Types for this property other than `object` will throw errors. Properties of this object other than `core`, `grid` or `places` will throw errors.\n\n\n### Robin API\n\nThe Robin API is a REST based API. Calls to the API return a `promise`.\n\nCore API Routes:\n\n| Route  | Source   |\n| ------ | -------- |\n| Accounts | [accounts.js](lib/api/modules/accounts.js) |\n| Apps | [apps.js](lib/api/modules/apps.js) |\n| Auth | [auth.js](lib/api/modules/auth.js) |\n| Channels | [channels.js](lib/api/modules/channels.js) |\n| DeviceManifests | [devicemanifests.js](lib/api/modules/devicemanifests.js) |\n| Devices | [devices.js](lib/api/modules/devices.js) |\n| Identifiers | [identifiers.js](lib/api/modules/identifiers.js) |\n| Locations | [locations.js](lib/api/modules/locations.js) |\n| Me | [me.js](lib/api/modules/me.js) | [testMe.js](test/testMe.js)\n| Organizations | [organizations.js](lib/api/modules/organizations.js) |\n| Projects | [projects.js](lib/api/modules/projects.js) |\n| Spaces | [spaces.js](lib/api/modules/spaces.js) |\n| Triggers | [triggers.js](lib/api/modules/triggers.js) |\n| Users | [users.js](lib/api/modules/users.js) |\n\n\nPlaces API Routes:\n\n| Route  | Source   |\n| ------ | -------- |\n| Events | [events.js](lib/api/modules/events.js) |\n\n### Robin Grid\n\n\u003csub\u003e_TODO: Improve this section in a future PR_\u003c/sub\u003e\n\nThe Grid is a websocket server that allows PubSub between clients and devices through configured channels. The Grid module is an `EventEmitter`, to allow real-time updates.\n\nThe Grid exposes several modules, which allow you to connect and listen:\n\n* `join` - Allows clients to listen to updates from channels\n* `leave` - Disconnects the client from receiving updates for a particular channel\n* `send` - Allows a client to send messages to a channel.\n\n## Development Roadmap\n\nThe following should be implemented:\n\n* [x] Support for use in browsers, as well as node.js\n* ~~[ ] Add winston for logging - will this work in browsers?~~\n* [x] Handle scope of access tokens for extended functionality (such as retrieving all API items)\n* [ ] Adhere to Robin Javascript Coding Standards - this is TBD.\n* [x] Implement API function arguments based on API documentation\n* [ ] Expand documentation to include all API modules\n* [ ] Can we autogenerate API module functions based on a object template?\n\n## Browserify\n\nRunning `grunt browser` generates two files in the `browser/` folder.\n\n* `browser/robin.browser.js` is the full file after being run through browserify.\n* `browser/robin.browser.min.js` is the minified version.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinpowered%2Frobin-js-sdk-public","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinpowered%2Frobin-js-sdk-public","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinpowered%2Frobin-js-sdk-public/lists"}