get-youtube-id
get-youtube-id
stole RegEx from https://gist.github.com/niquepa/4c59b7d52a15dde2367a
Installation
-
Add the dependency to your
shard.yml
:dependencies: get-youtube-id: github: iomcr/get-youtube-id
-
Run
shards install
Usage
require "get-youtube-id"
# get first youtube_id as String | Nil from a string where you expect exactly 0 or 1 youtube ids.
puts Iom::GetYoutubeId::get_youtube_id "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# "dQw4w9WgXcQ"
# get youtube_id as Set{String} from a string where you expect 0 or more youtube ids.
puts Iom::GetYoutubeId::get_youtube_ids "string with list of videos https://www.youtube.com/watch?v=dQw4w9WgXcQ https://www.youtube.com/watch?v=qEkB_SQXl20"
# Set{"dQw4w9WgXcQ","qEkB_SQXl20"}
Contributing
- Fork it (https://github.com/iomcr/get-youtube-id/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Pass tests (
crystal spec --error-trace
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- IOM - creator and maintainer
Repository
get-youtube-id
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- about 3 years ago
- January 30, 2020
License
MIT License
Links
Synced at
Sun, 17 Nov 2024 19:40:07 GMT
Languages