{"id":22505231,"url":"https://github.com/azer/require-sdk","last_synced_at":"2025-08-03T11:32:58.419Z","repository":{"id":10933503,"uuid":"13238310","full_name":"azer/require-sdk","owner":"azer","description":"JavaScript library for making sure given SDK is loaded and executed. Designed for popular APIs like Youtube, Rdio, Soundcloud etc.","archived":false,"fork":false,"pushed_at":"2013-11-26T00:41:35.000Z","size":116,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-16T02:14:38.379Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-01T08:17:34.000Z","updated_at":"2021-05-07T14:09:24.000Z","dependencies_parsed_at":"2022-07-14T01:40:35.066Z","dependency_job_id":null,"html_url":"https://github.com/azer/require-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Frequire-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Frequire-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Frequire-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Frequire-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azer","download_url":"https://codeload.github.com/azer/require-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228540836,"owners_count":17934031,"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-12-07T00:16:33.035Z","updated_at":"2024-12-07T00:16:33.708Z","avatar_url":"https://github.com/azer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## require-sdk\n\nJavaScript library for making sure given SDK is loaded and executed. Designed for popular APIs like Youtube, Rdio, Soundcloud etc.\n\nSee `tests.js` for examples.\n\n## Install\n\n```bash\n$ npm install require-sdk\n```\n\n## Usage\n\n```js\nrequireSDK = require('require-sdk')\n\nyoutube = requireSDK('http://foo.com/api.js', 'YT') // Path to load, global variable to check\n\nyoutube(function () {\n  // youtube.com/api.js loaded\n  YT.do.something()\n})\n\nyoutube(function () {\n  // you can add multiple callbacks.\n  // it lets you easily wrap all your SDK dependent code\n  // and all callbacks will be called in order\n})\n```\n\nCheck if it's already loaded:\n\n```js\nyoutube = requireSDK('https://www.youtube.com/iframe_api', 'YT') // Doesn't attempt to load if window.YT is defined\n```\n\nManually trigger the load event if custom conditions required:\n\n```js\nyoutube = requireSDK('https://youtube.com/iframe_api', 'YT')\nwindow.onYouTubeIframeAPIReady = youtube.trigger() // load event delays until onYouTubeIframeAPIReady is called\n```\n\n## Libraries Based On It\n\n* [rdio-js-api](http://github.com/azer/rdio-js-api)\n* [soundcloud-stream](http://github.com/azer/soundcloud-stream)\n* [youtube-video](http://github.com/azer/youtube-video)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Frequire-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazer%2Frequire-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Frequire-sdk/lists"}