New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-youtube-data-model

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-youtube-data-model

Ember Data adapters, serializers, and model for youtube api v3 (which, btw, is godawful)

  • 0.0.2-beta
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Ember-youtube-data-model

Very, very, very light and minimal feature wrapper over youtube api/v3 (which I would not pay to use).

Ships with the following 3 models and associated adapters, serializers, and transform:

# youtube/channel
YoutubeChannel = DS.Model.extend
  title: DS.attr "string"
  description: DS.attr "string"
  thumbnails: DS.attr "thumbnails"
  publishedAt: DS.attr "date"  
  uploadId: DS.attr "string"
  uploads: Ember.computed "uploadId", -> # your upload playlist
    return if Ember.isBlank @get "uploadId"
    @store.find "youtube/playlist", @get("uploadId")

TODO: add more generalized playlists to channel

# youtube/playlist

YoutubePlaylist = DS.Model.extend
  videos: DS.hasMany "youtube/video", embedded: true
# youtube/video
YoutubeVideo = DS.Model.extend
  title: DS.attr "string"
  description: DS.attr "string"
  thumbnails: DS.attr "thumbnails"
  position: DS.attr "number"
  publishedAt: DS.attr "date"

You'll need to setup your own API key onto the YoutubeAdapter, I will probably provide a blueprint installer to do this sometime in future, but I'm already sick and tired of working on youtube's horseshit api, so will put that off for another day. For now, probably write your own initializer and reopen the YoutubeAdapter to include something like:

YoutubeAdapter.reopen
  key: 'ajfslasjdfoajsdlfjalsdkfjlkasdf'

After that, things should work, and you should be able to do things like:

chan = store.find "youtube/channel", "teamcoco" # finds you Conan O'Brien's channel
chan.get("uploads.videos") # gets you the videos 

TODO: add pagination to hasMany to get more than 5 videos (lol)

Installation

  • git clone this repository
  • npm install
  • bower install

Running

  • ember server
  • Visit your app at http://localhost:4200.

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Keywords

FAQs

Package last updated on 17 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc