2017 © Pedro Peláez
 

library faker-youtube

Faker provider for generating fake YouTube video URLs

image

aalaap/faker-youtube

Faker provider for generating fake YouTube video URLs

  • Thursday, February 15, 2018
  • by aalaap
  • Repository
  • 1 Watchers
  • 1 Stars
  • 381 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 90 % Grown

The README.md

YouTube Provider for Faker

This package will allow Faker to generate fake, but technically valid, YouTube URLs in various formats as well as an embed HTML., (*1)

YouTube's hashing algorithm ensures that the possibility of collisions is really low, so the chances of a random URI generated by this packge being a real video is also really low, but not impossible., (*2)

Build Status, (*3)

Upgrading to the new Faker?

Since the original Faker was sunsetted, this package was updated to 2.0 to work with the new Faker, bringing along updated version requirements, which now apply to this package as well., (*4)

  • php: ^7.1 || ^8.0
  • phpunit/phpunit: ^7.5.20 || ^8.5.8 || ^9.4.2

If you are still using the original Faker, you can continue to use versions 1.x of this package., (*5)

Install

To install, use composer:, (*6)

composer require aalaap/faker-youtube

Use

# When installed via composer
require_once 'vendor/autoload.php';

$faker = \Faker\Factory::create();
$faker->addProvider(new \Faker\Provider\Youtube($faker));
echo $faker->youtubeUri();
// https://www.youtube.com/watch?v=KyXYWQ-B3zO

echo $faker->youtubeShortUri();
// https://youtu.be/watch?v=rsPyiZSzj3g

echo $faker->youtubeEmbedUri();
// https://www.youtube.com/embed/aUgKvcNS6en

echo $faker->youtubeEmbedCode();
// 





echo $faker->youtubeRandomUri();
// https://youtu.be/watch?v=lctkDb05MKT

License

This package is under the WTFPL license. Do whatever you want with it., (*7)

LICENSE, (*8)

Reporting an issue or a feature request

Fork it, send a PR. Issues and feature requests are tracked in the GitHub issue tracker., (*9)

The Versions

15/02 2018

dev-master

9999999-dev

Faker provider for generating fake YouTube video URLs

  Sources   Download

WTFPL

The Requires

 

The Development Requires

by Aalaap Ghag

faker provider youtube

15/02 2018

1.2.1

1.2.1.0

Faker provider for generating fake YouTube video URLs

  Sources   Download

WTFPL

The Requires

 

The Development Requires

by Aalaap Ghag

faker provider youtube

15/02 2018

1.2.0

1.2.0.0

Faker provider for generating fake YouTube video URLs

  Sources   Download

WTFPL

The Requires

 

The Development Requires

by Aalaap Ghag

faker provider youtube