{"id":15024685,"url":"https://github.com/johnnythetank/aping-plugin-youtube","last_synced_at":"2026-01-05T02:05:56.727Z","repository":{"id":57182161,"uuid":"46024377","full_name":"JohnnyTheTank/apiNG-plugin-youtube","owner":"JohnnyTheTank","description":"Youtube Plugin for apiNG ","archived":false,"fork":false,"pushed_at":"2017-09-07T20:00:49.000Z","size":63,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T18:03:55.844Z","etag":null,"topics":["angular","api","aping","aping-plugin","social-wall","youtube"],"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/JohnnyTheTank.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-11-12T02:36:40.000Z","updated_at":"2019-11-25T16:56:27.000Z","dependencies_parsed_at":"2022-09-09T23:25:02.073Z","dependency_job_id":null,"html_url":"https://github.com/JohnnyTheTank/apiNG-plugin-youtube","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-youtube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-youtube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-youtube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-youtube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnnyTheTank","download_url":"https://codeload.github.com/JohnnyTheTank/apiNG-plugin-youtube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937833,"owners_count":20535127,"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":["angular","api","aping","aping-plugin","social-wall","youtube"],"created_at":"2024-09-24T20:00:44.291Z","updated_at":"2026-01-05T02:05:56.693Z","avatar_url":"https://github.com/JohnnyTheTank.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[logo]: http://aping.io/logo/320/aping-plugin.png \"apiNG Plugin\"\n![apiNG][logo]\n\n[![Join the chat at https://gitter.im/JohnnyTheTank/apiNG](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/JohnnyTheTank/apiNG?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![npm version](https://badge.fury.io/js/aping-plugin-youtube.svg)](https://badge.fury.io/js/aping-plugin-youtube)\n[![Bower version](https://badge.fury.io/bo/apiNG-plugin-youtube.svg)](https://badge.fury.io/bo/apiNG-plugin-youtube)\n\n**_apiNG-plugin-youtube_** is a [Youtube Data API v3](https://developers.google.com/youtube/v3/) plugin for [**apiNG**](https://github.com/JohnnyTheTank/apiNG).\n\n# Information\n* **Supported apiNG models: `social`, `video`**\n* This plugin supports the [`get-native-data` parameter](https://aping.readme.io/docs/advanced#parameters)\n* This plugin needs an [api key](#2-api-key) :warning:\n* Used promise library: [angular-youtube-api-factory](https://github.com/JohnnyTheTank/angular-youtube-api-factory) _(included in distribution files)_\n\n# Documentation\n\n1. [INSTALLATION](#1-installation)\n    1. Get file\n    2. Include file\n    3. Add dependency\n    4. Add plugin\n2. [API KEY](#2-api-key)\n    1. Generate your `apiKey`\n    2. Insert your `apiKey` into `aping-config.js`\n3. [USAGE](#3-usage)\n    1. Models\n    2. Requests\n    3. Rate limit\n\n## 1. INSTALLATION\n\n### I. Get file\nInstall via either [bower](http://bower.io/), [npm](https://www.npmjs.com/), CDN (jsDelivr) or downloaded files:\n\n* `bower install apiNG-plugin-youtube --save`\n* `npm install aping-plugin-youtube --save`\n* use [CDN file](https://www.jsdelivr.com/projects/aping.plugin-youtube)\n* download [apiNG-plugin-youtube.zip](https://github.com/JohnnyTheTank/apiNG-plugin-youtube/zipball/master)\n\n### II. Include file\nInclude `aping-plugin-youtube.min.js` in your apiNG application\n\n```html\n\u003c!-- when using bower --\u003e\n\u003cscript src=\"bower_components/apiNG-plugin-youtube/dist/aping-plugin-youtube.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using npm --\u003e\n\u003cscript src=\"node_modules/aping-plugin-youtube/dist/aping-plugin-youtube.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using cdn file --\u003e\n\u003cscript src=\"//cdn.jsdelivr.net/npm/aping-plugin-youtube@latest/dist/aping-plugin-youtube.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using downloaded files --\u003e\n\u003cscript src=\"aping-plugin-youtube.min.js\"\u003e\u003c/script\u003e\n```\n\n### III. Add dependency\nAdd the module `jtt_aping_youtube` as a dependency to your app module:\n```js\nangular.module('app', ['jtt_aping', 'jtt_aping_youtube']);\n```\n\n### IV. Add the plugin\nAdd the plugin's directive `aping-youtube=\"[]\"` to your apiNG directive and [configure your requests](#ii-requests)\n```html\n\u003caping\n    template-url=\"templates/social.html\"\n    model=\"social\"\n    items=\"20\"\n    aping-youtube=\"[{'search':'funny cats'}]\"\u003e\n\u003c/aping\u003e\n```\n\n## 2. API KEY\n\n### I. Generate your `apiKey`\n1. Login on [console.developers.google.com](https://console.developers.google.com/)\n2. Select a project, or create a new one.\n3. In the sidebar on the left, expand APIs \u0026 auth.\n    - Click APIs\n        - In the list of APIs, make sure the status is **ON for the YouTube Data API v3**\n    - Click Credentials\n        - Click New credentials\n        - Choose API key\n        - Choose Browser key\n        - Name and create your API Key\n\n### II. Insert your `apiKey` into `aping-config.js`\nOpen `js/apiNG/aping-config.js` in your application folder. It should be look like this snippet:\n```js\nangular.module('jtt_aping').config(['$provide', function ($provide) {\n    $provide.value(\"apingDefaultSettings\", {\n        apingApiKeys : {\n            youtube : [\n                {'apiKey':'\u003cYOUR_YOUTUBE_API_KEY\u003e'},\n            ]\n            //...\n        }\n    });\n}]);\n```\n\n:warning: Replace `\u003cYOUR_YOUTUBE_API_KEY\u003e` with your youtube `apiKey`\n\n## 3. USAGE\n\n### I. Models\nSupported apiNG models\n\n|  model   | content | support | max items\u003cbr\u003eper request | (native) default items\u003cbr\u003eper request |\n|----------|---------|---------|--------|---------|\n| `social` | **videos** | full    | `50`   | `5`   |\n| `video`  | **videos** | full    | `50`   | `5`   |\n\n**support:**\n* full: _the source platform provides a full list with usable results_ \u003cbr\u003e\n* partly: _the source platfrom provides just partly usable results_\n\n\n### II. Requests\nEvery **apiNG plugin** expects an array of **requests** as html attribute.\n\n#### Requests by Video\n|  parameter  | sample | description |\n|----------|---------|---------|\n| **`videoId`** | `cBLulx9f9vc` | Youtube `videoId` (comma seperated list) |\n\nSample requests:\n* `[{'videoId':'cBLulx9f9vc'}, {'videoId':'tC76tIp0kBk'}]`\n* `[{'videoId':'cBLulx9f9vc,tC76tIp0kBk'}]`\n\n#### Requests by Channel\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`channelId`** | `UCtQMmwBJGvINGU0lZ_GrZKQ` |  | The `channelId` parameter indicates that the API response should only contain resources created by the channel\u003cbr\u003e([Youtube Name to Channel ID Converter](http://johnnythetank.github.io/youtube-channel-name-converter/)) | no |\n| **`items`**  | `20` | `5` | Items per request (`0`-`50`) |  yes  |\n| **`search`** | `happy` |  | The `search` parameter specifies the query term to search for. Your request can also use the Boolean NOT (-) and OR (\u0026#124;) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either \"boating\" or \"sailing\", set the `search` parameter value to boating\u0026#124;sailing. Similarly, to search for videos matching either \"boating\" or \"sailing\" but not \"fishing\", set the `search` parameter value to boating\u0026#124;sailing -fishing | yes |\n| **`order`** | `rating` | `date` | The order parameter specifies the method that will be used to order resources in the API response. Use `date`, `rating`, `relevance`, `title`, `videoCount`, `viewCount`, (`$RANDOM`) | yes |\n\nSample requests:\n* `[{'channelId':'UCtQMmwBJGvINGU0lZ_GrZKQ'}, {'channelId':'UC2pmfLm7iq6Ov1UwYrWYkZA'}]`\n* `[{'channelId':'UC37PFGlxWgx4tU6SlhPCdCw', 'items':10, 'search':'prank'}]`\n\n#### Requests by Playlist\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`playlistId`** | `PLykXdRRd47IX_5gUChdhDjgKmQyZtRrC_` |  | The `playlistId` parameter indicates that the API response should only contain resources containing in the playlist | no |\n| **`items`**  | `20` | `5` | Items per request (`0`-`50`) |  yes  |\n\nSample requests:\n* `[{'playlistId':'PLXkE1kzapj4a9oWMggQ0i682chTam-I98'}, {'playlistId':'PL0XHkAy96suU3u6rx8S-NBEaHBgqsHTck'}]`\n* `[{'playlistId':'PL0XHkAy96suU3u6rx8S-NBEaHBgqsHTck', 'items':10}]`\n\n#### Requests by Search\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`search`** | `music` |  | The `search` parameter specifies the query term to search for. Your request can also use the Boolean NOT (-) and OR (\u0026#124;) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either \"boating\" or \"sailing\", set the `search` parameter value to boating\u0026#124;sailing. Similarly, to search for videos matching either \"boating\" or \"sailing\" but not \"fishing\", set the `search` parameter value to boating\u0026#124;sailing -fishing | no |\n| **`items`**  | `20` | `5` | Items per request (`0`-`50`) |  yes  |\n| **`order`** | `rating` | `date` | The order parameter specifies the method that will be used to order resources in the API response. Use `date`, `rating`, `relevance`, `title`, `videoCount`, `viewCount`, (`$RANDOM`) | yes |\n| **`lat`** | `-13.163333` |  | Defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. | yes |\n| **`lng`** | `-72.545556` |  | Defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. | yes |\n| **`distance`** | `1km` | `5000m` | The parameter value must be a floating point number followed by a measurement unit. Valid measurement units are `m`, `km`, `ft`, and `mi`. (valid values: `1500m`, `5km`, `10000ft`, and `0.75mi`) The API does not support values larger than 1000 kilometers. | yes |\n\nSample requests:\n* `[{'search':'eagles'}, {'search':'Thomas Müller'}, {'search':'prank'}]`\n* `[{'search':'machu picchu', 'lat':'-13.163333', 'lng':'-72.545556', 'distance':'5km'}]`\n\n#### Requests by Coordinates\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`lat`** | `-13.163333` |  | Defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. | no |\n| **`lng`** | `-72.545556` |  | Defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. | no |\n| **`distance`** | `1km` | `5000m` | The parameter value must be a floating point number followed by a measurement unit. Valid measurement units are `m`, `km`, `ft`, and `mi`. (valid values: `1500m`, `5km`, `10000ft`, and `0.75mi`) The API does not support values larger than 1000 kilometers. | yes |\n| **`order`** | `rating` | `date` | The order parameter specifies the method that will be used to order resources in the API response. Use `date`, `rating`, `relevance`, `title`, `videoCount`, `viewCount`, (`$RANDOM`) | yes |\n| **`items`**  | `20` | `5` | Items per request (`0`-`50`) |  yes  |\n\nSample requests:\n* `[{'lat':'-13.163333', 'lng':'-72.545556', 'distance':'5km'}]`\n\n### III. Rate limit\n\nVisit the official Youtube Data API documentations: [Quota usage](https://developers.google.com/youtube/v3/getting-started#quota)\n\n# Licence\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-youtube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnythetank%2Faping-plugin-youtube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-youtube/lists"}