Class consists of some useful methods for working with YouTube.
- Copyright:
- Kozalo.Ru, 2016
- Source:
Methods
(static) durationToString(duration) → {String}
Converts duration from YouTube format into human-readable string: PT3M54S => 03:54
Parameters:
Name | Type | Description |
---|---|---|
duration |
String |
- Source:
Throws:
KozExceptions.missingArgument, KozExceptions.invalidArgument, or their string equivalents.
Returns:
- Type
- String
(static) parseId(text) → {String|Boolean}
Parses received text and returns only the ID of the first found video. Returns false if found nothing.
Parameters:
Name | Type | Description |
---|---|---|
text |
String |
- Source:
Throws:
KozExceptions.missingArgument, KozExceptions.invalidArgument, or their string equivalents.
Returns:
- Type
- String | Boolean