Feature request: Sample Razor code for direct API access
Hi,
I'm looking to set up a page that will display a custom-formatted version of my full YouTube channel, with all of the videos listed automatically. This package looks like it does most of the work needed for this, but it just requires videos to be picked manually before output.
It would be great if the package also came with some sample Razor code to show how the YouTube API can be accessed directly from a Marco or Partial View, without requiring anything to be chosen from a property editor first.
Hello David
You should be able to deconstruct the C# code in the project on GitHub to be create your own method for fetching all of your videos in a channel to be printed out in a Razor view directly.
This is just the Google C# library for YouTube so either use their docs to help build up the request you want to fetch the videos you would like. The sample on their site shows how to loop over a paged request with a while loop.
Unfortunately I do not have the time to implement this myself for you, but gladly look forward to a pull request you may add this so others can benefit from this.
Feature request: Sample Razor code for direct API access
Hi,
I'm looking to set up a page that will display a custom-formatted version of my full YouTube channel, with all of the videos listed automatically. This package looks like it does most of the work needed for this, but it just requires videos to be picked manually before output.
It would be great if the package also came with some sample Razor code to show how the YouTube API can be accessed directly from a Marco or Partial View, without requiring anything to be chosen from a property editor first.
Hello David
You should be able to deconstruct the C# code in the project on GitHub to be create your own method for fetching all of your videos in a channel to be printed out in a Razor view directly.
https://github.com/warrenbuckley/YouTube-Umbraco/blob/master/YouTube/YouTubeHelper.cs
This is just the Google C# library for YouTube so either use their docs to help build up the request you want to fetch the videos you would like. The sample on their site shows how to loop over a paged request with a while loop.
Unfortunately I do not have the time to implement this myself for you, but gladly look forward to a pull request you may add this so others can benefit from this.
Thanks,
Warren
is working on a reply...