Page no: F94
Object Mapping
Object | Youtube API Object | Feed WordPress RSS Syntax |
Physical WordPress Table | |
Video | WP_POSTS | |||
Channel | snippet |
<channel><channelId> | ||
Author | <author> | |||
Tag | ||||
Category | pre-defined by Youtube |
….. |
Video fields mapped to WP fields
Youtube Attribute |
Youtube Purpose | Youtube name | RSS Field | Example | WP table | WP name | WP type of field | Issues………………………… |
ID | Id of the video | id |
<id> | nmYZcacm_zY | posts_meta | video_id | ||
Title | Title of the video | snippet. |
<title> | Corona Crash 2 | posts | title | ||
Description | Description of the video | snippet. |
<content:encoded> |
<![CDATA[
Während wir noch Anfan
]]>
|
posts | text | ||
Excerpt | Short description of the video | snippet. |
<excerpt> |
<![CDATA[
Während wir noch Anfan
]]>
|
posts | excerpt | ||
Date | Publication date of the video | snippet. |
<pubDate> | 2020-03-19T09:00:12.000Z | posts | published_date | When WP publish post, published date gets overriden. | |
Feature image | Thumbnail of the video as a Featured image in the | snippet. |
<image> | >https://i.ytimg.com/vi/nmYZcacm_zY/mqdefault.jpg | posts_meta | _wp_attachment.* | ||
Tags | Tags of the post | snippet. |
<tags> | fintool does not have tags | terms | many fields | ||
Categories | Youtube categories of the video | snippet. |
<categoryId> | 27, details on Youtube categories | terms | many fields | ||
Author Categories | Does not exist | We take the author | terms
Terms_Rel |
|||||
Channel id | ID needed for taking info about the channel | snippet. |
<channelId> | UCn8aVW6QGQcRjhF3Znt35mg | posts_meta | video_channel_id | ||
Channel name | Name of the channel | snippet.channelName | <channelTitle> | Fintool | posts_meta | video_channel_name | ||
Default lang | Default language of the video | snippet. |
<defaultLanguage> | de | posts_meta | video_lang | ||
Subtitles | Information about subtitles of the video | contentDetails. |
<subtitles> | false | posts_meta | video_caption | ||
License | License of the video | contentDetails. |
<license> | 1 | posts_meta | video_license | ||
Views | Views statistic | statistics. |
<views> | 321 | posts_meta | video_views | ||
Likes | Likes statistic | statistics. |
<likes> | 321 | posts_meta | video_likes | ||
Dislikes | Dislike statistic | statistics. |
<dislikes> | 2 | posts_meta | video_dislike | ||
Player | Player iframe code | player. |
<player> |
<![CDATA[
<iframe width=”480″ height=”270″ src=”//www.youtube.com/embed/nmYZcacm_zY” frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>
]]>
|
posts_meta | video_player | ||
Channel fields mapped to WP fields
Currently these fields are mapped to authors, but they can easily be mapped to categories, tags or custom post types
Field | Purpose | Youtube API name | WP type of field | WP table | WP name |
Channel category ID | ID of the category of the channel | categoryId |
custom field | usermeta | channel_category_id |
Username | Username of the channel | forUsername |
custom field | usermeta | channel_username |
Title | Title generated from the owner of the channel | snippet. |
custom field | usermeta | channel_title |
Description | Description of the channel | snippet. |
custom field | usermeta | channel_description |
URL | Url of the channel | snippet. |
custom field | usermeta | channel_url |
Creation date | Date when the channel started | snippet. |
custom field | usermeta | channel_start_date |
Avatar | Channel avatar | snippet. |
custom field | usermeta | channel_avatar |
Language | Default language of the channel | snippet. |
custom field | usermeta | channel_lang |
Country | Country of the channel | snippet. |
custom field | usermeta | channel_country |
Playlists | List with all public playlists of the channel | contentDetails. |
custom field | usermeta | channel_playlists |
Views | Views statistic | statistics. |
custom field | usermeta | channel_views |
Comments | Comments statistic | statistics. |
custom field | usermeta | channel_comments |
Subscribers | Subscribers statistic | statistics. |
custom field | usermeta | channel_subscriber |