There are no complete ways of importing all YouTube gdata api information in a flexible way. This feature does that as it doesnt provide any custom code, it is a clean and simple feature taking advantage of the excellent feeds and feeds_jsonpath_parser.

This feature will check for all necessary dependencies required to import ALL information provided by the jsonc format of the YouTube gdata API, from any of the video feeds (user favorites/uploads, all the YouTube standard video feeds or a specific playlist) as supported and shown in the YouTube json responses. The json responses tool can also be used for assisting you in getting the right url when building your feeds.

The feature will install two new content types with all associated fields (YouTube Importer and YouTube Video) and one Feeds Importer (YT Importer).

The feature has some dependencies:

  • date
  • features
  • feeds
  • feeds_jsonpath_parser
  • feeds_tamper
  • job_scheduler

To use, just simply create a new YouTube Importer node with the jsonc feed you grabbed from the json responses tool. Periodic import/update is set to off by default and YouTube only allow 50 items per feed. Create more nodes using the start-index feature of gdata api to import more than 50.

You can see my original blog post on the feature here and a live demo of the end result here.

Link to sandbox: http://drupal.org/sandbox/7wonders/1354216

Git clone: git clone --branch master 7wonders@git.drupal.org:sandbox/7wonders/1354216.git

Drupal version: 7.x

Comments

patrickd’s picture

Status: Needs review » Needs work

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:

  • README.txt is missing, see the guidelines for in-project documentation.
  • Remove "version" from the info file, it will be added by drupal.org packaging automatically.
  • Remove "project" from the info file, it will be added by drupal.org packaging automatically.
  • Bad line endings were found, always use unix style terminators. See http://drupal.org/coding-standards#indenting
    
    youtube_importer_feature.feeds_tamper_default.inc
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

Source: http://ventral.org/pareview - PAReview.sh online service

7wonders’s picture

All changes have been made and 7.x-1.x branch has been added.

patrickd’s picture

You should switch back to 'needs review' after you fixed all issues.

7wonders’s picture

Status: Needs work » Needs review

Shortened README.txt to 80 character lines also.

patrickd’s picture

Status: Needs review » Needs work

Review of the 7.x-1.x branch:

  • Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards):
    
    FILE: ...temp/test_candidate/youtube_importer_feature.feeds_importer_default.inc
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     13 | ERROR | Calling class constructors must always include parentheses
    --------------------------------------------------------------------------------
    
    
    FILE: ...w_temp/test_candidate/youtube_importer_feature.feeds_tamper_default.inc
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     13 | ERROR | Calling class constructors must always include parentheses
    --------------------------------------------------------------------------------
    
    
    FILE: ...ll/modules/pareview_temp/test_candidate/youtube_importer_feature.module
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     7 | ERROR | "include_once" is a statement not a function; no parentheses are
       |       | required
    --------------------------------------------------------------------------------
    
  • All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting
    ./README.txt
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

Source: http://ventral.org/pareview - PAReview.sh online service

7wonders’s picture

Status: Needs work » Needs review

All done!

7wonders’s picture

Any news on this?

mitchell’s picture

Status: Needs review » Reviewed & tested by the community

Looks really cool! I'm really glad to see this.

Code export looks to be in order. +1. Please make sure to include the "Features Package" tag in "Module Categories."

Side note: #5 should really be be an issue for Features. ... The joys of generated code!

Btw, if you want to "page" past 50 results, you can use Feeds Crawler to auto_increment the start-index field. It's demo'd in Example Web Scraper, but the docs and code need work.

7wonders’s picture

Thx Mitchell. Module categories now added. Not really experimented with the crawler functionality yet. Will check it out.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:

  • Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards).
    FILE: ...pace/drupal-7/sites/all/modules/pareview_temp/test_candidate/README.txt
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     40 | ERROR | Files must end in a single new line character
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.

Thanks for your contribution, 7wonders! Welcome to the community of project contributors on drupal.org.

I've promoted your feature to a full project: http://drupal.org/project/youtube_importer_feature
Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.