# Print output for @column tags ?> AbstractMessageParser.YouTubeVideo - Android SDK | Android Developers

Most visited

Recently visited

AbstractMessageParser.YouTubeVideo

public static class AbstractMessageParser.YouTubeVideo
extends AbstractMessageParser.Token

java.lang.Object
   ↳ com.google.android.util.AbstractMessageParser.Token
     ↳ com.google.android.util.AbstractMessageParser.YouTubeVideo


Represents a link to a YouTube video.

Summary

Inherited fields

Public constructors

YouTubeVideo(String docid, String text)

Public methods

String getDocID()
List<String> getInfo()

Get the relevant information about a token

static String getPrefixedURL(boolean http, String prefix, String docid, String extraParams)

(For testing purposes:) Returns a video URL with the given parts.

static String getRssUrl(String docid)

Returns the URL for the RSS description of the given video.

static String getURL(String docid)

(For testing purposes:) Returns a video URL with the given parts.

static String getURL(String docid, String extraParams)

(For testing purposes:) Returns a video URL with the given parts.

boolean isHtml()
boolean isMedia()
static AbstractMessageParser.YouTubeVideo matchURL(String url, String text)

Returns a Video object if the given url is to a video.

Inherited methods

Public constructors

YouTubeVideo

public YouTubeVideo (String docid, 
                String text)

Parameters
docid String

text String

Public methods

getDocID

public String getDocID ()

Returns
String

getInfo

public List<String> getInfo ()

Get the relevant information about a token

Returns
List<String> a list of strings representing the token, not null The first item is always a string representation of the type

getPrefixedURL

public static String getPrefixedURL (boolean http, 
                String prefix, 
                String docid, 
                String extraParams)

(For testing purposes:) Returns a video URL with the given parts.

Parameters
http boolean: If true, includes http://

prefix String: If non-null/non-blank, adds to URL before youtube.com. (e.g., prefix="br." --> "br.youtube.com")

docid String

extraParams String

Returns
String

getRssUrl

public static String getRssUrl (String docid)

Returns the URL for the RSS description of the given video.

Parameters
docid String

Returns
String

getURL

public static String getURL (String docid)

(For testing purposes:) Returns a video URL with the given parts.

Parameters
docid String

Returns
String

getURL

public static String getURL (String docid, 
                String extraParams)

(For testing purposes:) Returns a video URL with the given parts.

Parameters
docid String

extraParams String

Returns
String

isHtml

public boolean isHtml ()

Returns
boolean

isMedia

public boolean isMedia ()

Returns
boolean

matchURL

public static AbstractMessageParser.YouTubeVideo matchURL (String url, 
                String text)

Returns a Video object if the given url is to a video.

Parameters
url String

text String

Returns
AbstractMessageParser.YouTubeVideo