All Projects → JohnnyTheTank → angular-youtube-api-factory

JohnnyTheTank / angular-youtube-api-factory

Licence: MIT license
AngularJS Factory for Youtube JSON REST API requests

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to angular-youtube-api-factory

angular-github-api-factory
AngularJS Factory for GitHub v3 JSON REST API requests
Stars: ✭ 13 (-38.1%)
Mutual labels:  angularjs, factory, angular-factory
angular-footballdata-api-factory
AngularJS Factory for the football-data.org JSON REST API
Stars: ✭ 48 (+128.57%)
Mutual labels:  angularjs, factory, angular-factory
social-post-api
Social Media API: Automate Posting and Analytics to Social Networks like Instagram, TikTok, Twitter, Facebook, LinkedIn, Reddit, YouTube, and Telegram
Stars: ✭ 38 (+80.95%)
Mutual labels:  youtube-api
pydantic-factories
Simple and powerful mock data generation using pydantic or dataclasses
Stars: ✭ 380 (+1709.52%)
Mutual labels:  factory
yt-dislikes-viewer
A browser extension that allows you to see dislikes on a youtube video after the youtube update
Stars: ✭ 291 (+1285.71%)
Mutual labels:  youtube-api
laravel-factory-classes
A Package to easy create Factory Classes for your tests with a fluent api and automatic auto completion
Stars: ✭ 16 (-23.81%)
Mutual labels:  factory
youtube-sr
Simple library for Node, Deno & Bun to make YouTube search easily
Stars: ✭ 68 (+223.81%)
Mutual labels:  youtube-api
youcount.github.io
YouCount allows you to see the subscriber count of any YouTube user in realtime. It has been designed using the Material Design language and is optimized for mobile devices and older browsers.
Stars: ✭ 27 (+28.57%)
Mutual labels:  youtube-api
angular-simple-slider
An AngularJS directive providing a simple slider functionality
Stars: ✭ 15 (-28.57%)
Mutual labels:  angularjs
youtubly-android
An android app to download 📹 videos and 🎶 songs from youtube to phone internal storage. In a nutshell NewPipe for just audio.
Stars: ✭ 24 (+14.29%)
Mutual labels:  youtube-api
YoutubeLiveChannelRecorder
Records YouTube live streams and Semi-Working TWITCH live streams for given channels automatically.
Stars: ✭ 15 (-28.57%)
Mutual labels:  youtube-api
FactoryOrchestrator
A cross-platform system service which provides a simple way to run and manage factory line validation, developer inner-loop, diagnostics, and fault analysis workflows.
Stars: ✭ 36 (+71.43%)
Mutual labels:  factory
statamic-video-embed
A field type for embedding YouTube and Vimeo Videos
Stars: ✭ 16 (-23.81%)
Mutual labels:  youtube-api
Discord-Music-Turret-Bot
A standalone Discord music bot, made with DSharpPlus, using Lavalink.
Stars: ✭ 14 (-33.33%)
Mutual labels:  youtube-api
eucaconsole
Eucalyptus Management Console
Stars: ✭ 15 (-28.57%)
Mutual labels:  angularjs
design-pattern
🌴 Detail design pattern and give many demos in Java.
Stars: ✭ 28 (+33.33%)
Mutual labels:  factory
yt-restore-dislikes
👎 A browser extension for restoring the dislike count on YouTube videos.
Stars: ✭ 24 (+14.29%)
Mutual labels:  youtube-api
interface-forge
Graceful mock-data and fixtures generation using TypeScript
Stars: ✭ 58 (+176.19%)
Mutual labels:  factory
angular-crypto
angular-crypto provides standard and secure cryptographic algorithms for Angular.js with support for: MD5, SHA-1, SHA-256, RC4, Rabbit, AES, DES, PBKDF2, HMAC, OFB, CFB, CTR, CBC, Base64
Stars: ✭ 30 (+42.86%)
Mutual labels:  angularjs
AngularJS-ES6
No description or website provided.
Stars: ✭ 25 (+19.05%)
Mutual labels:  angularjs

angular-youtube-api-factory is an angularjs module with a youtube api factory.

npm version Bower version

Author: Jonathan Hornung (JohnnyTheTank)

Usage

  1. Install via either bower, npm or downloaded files:

    1. bower install --save angular-youtube-api-factory
    2. npm install --save angular-youtube-api-factory
    3. download angular-youtube-api-factory.zip
  2. Include dependencies in your HTML.

    1. When using bower:
    <script src="bower_components/angular-youtube-api-factory/dist/angular-youtube-api-factory.min.js"></script>
    1. When using npm:
    <script src="node_modules/angular-youtube-api-factory/dist/angular-youtube-api-factory.min.js"></script>
    1. when using downloaded files
    <script src="angular-youtube-api-factory.min.js"></script>
  3. Add jtt_youtube to your application's module dependencies

    angular.module('app', ['jtt_youtube']);
  4. Use the factory youtubeFactory

    angular.module('app')
        .controller('appController', function($scope, youtubeFactory){
        
            youtubeFactory.getVideosFromSearchByParams({
                q: 'fcbayern',
                key: '<YOUR_API_KEY>'
            }).then(function (data) {
                console.info('videos from search by query', data);
            });
            
        });

factory methods

getVideo

//docs: https://developers.google.com/youtube/v3/docs/videos/list
youtubeFactory.getVideoById({
    videoId: "<VIDEO_ID>",
    part: "<YOUR_PART>", // (optional) default: 'id,snippet,contentDetails,statistics'
    key: "<YOUR_API_KEY>",
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});

getVideos

//docs: https://developers.google.com/youtube/v3/docs/channels/list
youtubeFactory.getVideosFromChannelById({
    channelId: "<CHANNEL_ID>", // converter: http://johnnythetank.github.io/youtube-channel-name-converter/
    q: "<SEARCH_STRING>", // (optional) search string
    location: "<SEARCH_LOCATION>", // (optional) The parameter value is a string that specifies latitude/longitude coordinates e.g. '37.42307,-122.08427'.
    locationRadius: "<LOCATION_RADIUS>", // (optional) valid values e.g. '1500m', '5km', '10000ft', and '0.75mi' | default: '5000m'
    order: "<ORDER_TYPE>", // (optional) valid values: 'date', 'rating', 'relevance', 'title', 'videoCount', 'viewCount' | default: 'date'
    maxResults: "<MAX_RESULTS>", // (optional) valid values: 0-50 | default: 5
    publishedAfter: "<PUBLISHED_AFTER>", // (optional) RFC 3339 formatted date-time value (1970-01-01T00:00:00Z)
    publishedBefore: "<PUBLISHED_AFTER>", // (optional) RFC 3339 formatted date-time value (1970-01-01T00:00:00Z)
    regionCode: "<REGION_CODE>", // (optional) ISO 3166-1 alpha-2 country code
    relevanceLanguage: "<RELEVANCE_LANGUAGE>", // (optional) ISO 639-1 two-letter language code
    safeSearch: "<SAFE_SEARCH>", // (optional) valid values: 'moderate','none','strict' | defaut: 'moderate'
    maxResults: "<MAX_RESULTS>", // (optional) valid values: 0-50 | default: 5
    videoEmbeddable: "<VIDEO_EMBEDDABLE>", // (optional) valid values: 'true', 'any' | default: 'true'
    videoLicense: "<VIDEO_LICENSE>", // (optional) valid values: 'any','creativeCommon','youtube'
    videoSyndicated: "<VIDEO_SYNDICATED>", // (optional) restrict a search to only videos that can be played outside youtube.com. valid values: 'any','true' | default: 'any'
    fields: "<FIELDS>", // (optional) Selector specifying which fields to include in a partial response
    nextPageToken: "<NEXT_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    prevPageToken: "<PREV_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    part: "<PART>", // (optional) default: 'id,snippet'
    key: "<YOUR_API_KEY>",
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
//docs: https://developers.google.com/youtube/v3/docs/search/list
youtubeFactory.getVideosFromSearchByParams({
    q: "<SEARCH_STRING>", // (optional) search string
    location: "<SEARCH_LOCATION>", // (optional) The parameter value is a string that specifies latitude/longitude coordinates e.g. '37.42307,-122.08427'.
    locationRadius: "<LOCATION_RADIUS>", // (optional) valid values e.g. '1500m', '5km', '10000ft', and '0.75mi' | default: '5000m'
    order: "<ORDER_TYPE>", // (optional) valid values: 'date', 'rating', 'relevance', 'title', 'videoCount', 'viewCount' | default: 'date'
    maxResults: "<MAX_RESULTS>", // (optional) valid values: 0-50 | default: 5
    publishedAfter: "<PUBLISHED_AFTER>", // (optional) RFC 3339 formatted date-time value (1970-01-01T00:00:00Z)
    publishedBefore: "<PUBLISHED_AFTER>", // (optional) RFC 3339 formatted date-time value (1970-01-01T00:00:00Z)
    regionCode: "<REGION_CODE>", // (optional) ISO 3166-1 alpha-2 country code
    relevanceLanguage: "<RELEVANCE_LANGUAGE>", // (optional) ISO 639-1 two-letter language code
    safeSearch: "<SAFE_SEARCH>", // (optional) valid values: 'moderate','none','strict' | defaut: 'moderate'
    maxResults: "<MAX_RESULTS>", // (optional) valid values: 0-50 | default: 5
    videoEmbeddable: "<VIDEO_EMBEDDABLE>", // (optional) valid values: 'true', 'any' | default: 'true'
    videoLicense: "<VIDEO_LICENSE>", // (optional) valid values: 'any','creativeCommon','youtube'
    videoSyndicated: "<VIDEO_SYNDICATED>", // (optional) restrict a search to only videos that can be played outside youtube.com. valid values: 'any','true' | default: 'any'
    fields: "<FIELDS>", // (optional) Selector specifying which fields to include in a partial response
    nextPageToken: "<NEXT_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    prevPageToken: "<PREV_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    part: "<PART>", // (optional) default: 'id,snippet'
    key: "<YOUR_API_KEY>",
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});
//docs: https://developers.google.com/youtube/v3/docs/playlists/list
youtubeFactory.getVideosFromPlaylistById({
    playlistId: "<PLAYLIST_ID>",
    maxResults: "<MAX_RESULTS>", // (optional) valid values: 0-50 // default: 5
    nextPageToken: "<NEXT_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    prevPageToken: "<PREV_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    part: "<PART>", // (optional) default: 'id,snippet'
    key: "<YOUR_API_KEY>",
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});

getChannel

// docs: https://developers.google.com/youtube/v3/docs/search/list
youtubeFactory.getChannelById({
    channelId: "<CHANNEL_ID>", // converter: http://johnnythetank.github.io/youtube-channel-name-converter/
    nextPageToken: "<NEXT_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    prevPageToken: "<PREV_PAGE_TOKEN>", // (optional) either 'nextPageToken' or 'prevPageToken'
    part: "<PART>", // (optional) default: 'id,snippet'
    key: "<YOUR_API_KEY>",
}).then(function (_data) {
    //on success
}).catch(function (_data) {
    //on error
});

Youtube Data JSON API

More angular-api-factories

bandsintown - dailymotion - facebook - flickr - footballdata - github - openweathermap - tumblr - vimeo - wikipedia - youtube

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].