YouTube API - Wikipedia
文章推薦指數: 80 %
References YouTubeAPI FromWikipedia,thefreeencyclopedia Jumptonavigation Jumptosearch ApplicationprogramminginterfaceusedinYouTube Thisarticleiswrittenlikeapersonalreflection,personalessay,orargumentativeessaythatstatesaWikipediaeditor'spersonalfeelingsorpresentsanoriginalargumentaboutatopic.Pleasehelpimproveitbyrewritingitinanencyclopedicstyle.(May2018)(Learnhowandwhentoremovethistemplatemessage) TheYouTubeApplicationProgrammingInterface(YouTubeAPI)allowsdeveloperstoaccessvideostatisticsandYouTubechannelsdataviatwotypesofcalls,RESTandXML-RPC.GoogledescribeYouTube'sAPIresourcesas"APIsandToolsthatletyoubringtheYouTubeexperiencetoyourwebpage,applicationordevice."[1] Contents 1PlayersandPlayerAPIs 1.1PlayerAPIsandtools 1.1.1Android 1.1.2iOS 2DataandAnalyticsAPIs 2.1YouTubeAPIV3 3Buttons,Widgets,andTools 4HowToUseYouTube'sAPI 5Advantages 6Disadvantages 7Seealso 8References 9Externallinks PlayersandPlayerAPIs[edit] ThePlayersandPlayerAPIssectionidentifieswaysyoucanletyouruserswatchYouTubevideosinyourapplicationandcontroltheplaybackexperience.WithanembeddedYouTubeplayer,youcanintegratetheYouTubevideoplaybackexperiencedirectlyinyourwebpageorapplication.Youcanuseplayerparameterstocustomizetheplayer'sappearance,andyoucanalsousePlayerAPIstocontroltheplayerdirectlyfromyourwebpageorapp.[2] PlayerAPIsandtools[edit] Android[edit] PlayerAPI PlayerAPIsampleapp PlayerAPIReference YouTubeDirectsampleapp TheminimumversionsupportedofAndroidforthemostrecentversionsoftheAPI'siscurrentlyversion2.2.TheAndroiddevicemustberunningtheYouTubeappversion4.2.16.Thenusingawebkey,itispossibletouseGooglesAPI'sthroughadeveloperenabledAndroidphone.[3] iOS[edit] PlayerIFrameAPI YouTubeDirectSampleApp UsingtheiOSversionsoftheAPIsisverysimilartotheAndroidexplanation.HoweveritinvolvesusingtheGoogleCloudConsole.FromthereyouareabletocontroltheAPIsandsetuptheAPIstoworkwithyourvideos.YouwillalsoneedaClientIDandaClientSecret;whichcanbothbedownloadedfromGoogle'sAPISite.Afterthis,itisasimpleprocessofrunningthesampleandtheAPIsshouldthenbeproperlyintegrated.[4] OtherAPIsincluderesourcesthatcanbeimplementedintoa3rdpartywebsite.ThesearetheusualsocialnetworkintegratedAPIsthatweregularlycomeacrosssuchastheFacebooklikebuttonortheTwitterfollowbutton.YouTubewidgetAPIsinclude: SubscribeButton UploadWidget PlayerAPIDemo PlayerAPICodePlayground DataandAnalyticsAPIs[edit] TheDataandAnalyticsAPIssectionbrieflydescribesAPIsthatletyourapplicationaccessfeaturesanddatanormallyavailableontheYouTubewebsite.[5] YouTubeAPIV3[edit] TheYouTubeDataAPI(v3)letsyouincorporateYouTubefunctionalityintoyourownapplication.YoucanusetheAPItofetchsearchresultsandtoretrieve,insert,update,anddeleteresourceslikevideosorplaylists. InconjunctionwiththeYouTubePlayerAPIsandtheYouTubeAnalyticsAPI,theAPIletsyourapplicationprovideafull-fledgedYouTubeexperiencethatincludessearchanddiscovery,contentcreation,videoplayback,accountmanagement,andviewerstatistics. youtube.activities.insert Postsabulletinforaspecificchannel.(Theusersubmittingtherequestmustbeauthorizedtoactonthechannel'sbehalf.) Note:Eventhoughanactivityresourcecancontaininformationaboutactionslikeauserratingavideoormarkingavideoasafavorite,youneedtouseotherAPImethodstogeneratethoseactivityresources.Forexample,youwouldusetheAPI'svideos.rate()methodtorateavideoandtheplaylistItems.insert()methodtomarkavideoasafavorite. youtube.activities.list Returnsalistofchannelactivityeventsthatmatchtherequestcriteria.Forexample,youcanretrieveeventsassociatedwithaparticularchannel,eventsassociatedwiththeuser'ssubscriptionsandGoogle+friends,ortheYouTubehomepagefeed,whichiscustomizedforeachuser. youtube.channelBanners.insert UploadsachannelbannerimagetoYouTube.Thismethodrepresentsthefirsttwostepsinathree-stepprocesstoupdatethebannerimageforachannel: -CallthechannelBanners.insertmethodtouploadthebinaryimagedatatoYouTube.Theimagemusthavea16:9aspectratioandbeatleast2120x1192pixels. -Extracttheurlproperty'svaluefromtheresponsethattheAPIreturnsforstep1. -Callthechannels.updatemethodtoupdatethechannel'sbrandingsettings.SetthebrandingSettings.image.bannerExternalUrlproperty'svaluetotheURLobtainedinstep2. youtube.channelSections.delete DeletesachannelSection. youtube.channelSections.insert AddsachannelSectionfortheauthenticateduser'schannel. youtube.channelSections.list ReturnschannelSectionresourcesthatmatchtheAPIrequestcriteria. youtube.channelSections.update UpdateachannelSection. youtube.channels.list Returnsacollectionofzeroormorechannelresourcesthatmatchtherequestcriteria. youtube.channels.update Updatesachannel'smetadata. youtube.guideCategories.list ReturnsalistofcategoriesthatcanbeassociatedwithYouTubechannels. youtube.i18nLanguages.list Returnsalistofsupportedlanguages. youtube.i18nRegions.list Returnsalistofsupportedregions. youtube.liveBroadcasts.bind BindsaYouTubebroadcasttoastreamorremovesanexistingbindingbetweenabroadcastandastream.Abroadcastcanonlybeboundtoonevideostream. youtube.liveBroadcasts.control Controlsthesettingsforaslatethatcanbedisplayedinthebroadcaststream. youtube.liveBroadcasts.delete Deletesabroadcast. youtube.liveBroadcasts.insert Createsabroadcast. youtube.liveBroadcasts.list ReturnsalistofYouTubebroadcaststhatmatchtheAPIrequestparameters. youtube.liveBroadcasts.transition ChangesthestatusofaYouTubelivebroadcastandinitiatesanyprocessesassociatedwiththenewstatus.Forexample,whenyoutransitionabroadcast'sstatustotesting,YouTubestartstotransmitvideotothatbroadcast'smonitorstream.Beforecallingthismethod,youshouldconfirmthatthevalueofthestatus.streamStatuspropertyforthestreamboundtoyourbroadcastisactive. youtube.liveBroadcasts.update Updatesabroadcast.Forexample,youcouldmodifythebroadcastsettingsdefinedintheliveBroadcastresource'scontentDetailsobject. youtube.liveStreams.delete Deletesavideostream. youtube.liveStreams.insert Createsavideostream.ThestreamenablesyoutosendyourvideotoYouTube,whichcanthenbroadcastthevideotoyouraudience. youtube.liveStreams.list ReturnsalistofvideostreamsthatmatchtheAPIrequestparameters. youtube.liveStreams.update Updatesavideostream.Ifthepropertiesthatyouwanttochangecannotbeupdated,thenyouneedtocreateanewstreamwiththepropersettings. youtube.playlistItems.delete Deletesaplaylistitem. youtube.playlistItems.insert Addsaresourcetoaplaylist. youtube.playlistItems.list ReturnsacollectionofplaylistitemsthatmatchtheAPIrequestparameters.YoucanretrievealloftheplaylistitemsinaspecifiedplaylistorretrieveoneormoreplaylistitemsbytheiruniqueIDs. youtube.playlistItems.update Modifiesaplaylistitem.Forexample,youcouldupdatetheitem'spositionintheplaylist. youtube.playlists.delete Deletesaplaylist. youtube.playlists.insert Createsaplaylist. youtube.playlists.list ReturnsacollectionofplayliststhatmatchtheAPIrequestparameters.Forexample,youcanretrieveallplayliststhattheauthenticateduserowns,oryoucanretrieveoneormoreplaylistsbytheiruniqueIDs. youtube.playlists.update Modifiesaplaylist.Forexample,youcouldchangeaplaylist'stitle,description,orprivacystatus. youtube.search.list ReturnsacollectionofsearchresultsthatmatchthequeryparametersspecifiedintheAPIrequest.Bydefault,asearchresultsetidentifiesmatchingvideo,channel,andplaylistresources,butyoucanalsoconfigurequeriestoonlyretrieveaspecifictypeofresource. youtube.subscriptions.delete Deletesasubscription. youtube.subscriptions.insert Addsasubscriptionfortheauthenticateduser'schannel. youtube.subscriptions.list ReturnssubscriptionresourcesthatmatchtheAPIrequestcriteria. youtube.thumbnails.set UploadsacustomvideothumbnailtoYouTubeandsetsitforavideo. youtube.videoCategories.list ReturnsalistofcategoriesthatcanbeassociatedwithYouTubevideos. youtube.videos.delete DeletesaYouTubevideo. youtube.videos.getRating Retrievestheratingsthattheauthorizedusergavetoalistofspecifiedvideos. youtube.videos.insert UploadsavideotoYouTubeandoptionallysetsthevideo'smetadata. youtube.videos.list ReturnsalistofvideosthatmatchtheAPIrequestparameters. youtube.videos.rate Addalikeordislikeratingtoavideoorremovearatingfromavideo. youtube.videos.update Updatesavideo'smetadata. youtube.watermarks.set UploadsawatermarkimagetoYouTubeandsetsitforachannel. youtube.watermarks.unset Deletesawatermark. Buttons,Widgets,andTools[edit] TheButtons,Widgets,andToolssectiondescribesothertoolsyoucanusetoaddYouTubefunctionalitytoyourapportotestYouTubeAPIs.[6] HowToUseYouTube'sAPI[edit] TouseYouTube'sAPI,adevelopermustacquireaDeveloperID-thisisanadditionalpropertythatisattachedtothedeveloper'sYouTubeaccount.TheinformationthatisavailabletodevelopersissimilartotheinformationthatcanbeacquiredbyaccessingYouTube'smanyRSSfeeds.SincetheintegrationofGoogleandYouTubeitispossibletologintoYouTubeusinganexistingGoogleaccount.AneasytousetutorialcanbefoundasaYouTubevideo.[7] TheAPI'shavesincebeenextendedandarenowcompatiblewithmanymobileoperatingplatformssuchasAndroidandiOS.QuiteobviouslytheAndroidAPI'saremorecompletewiththeiOSresourcessomewhatlacking.AlistofthisAPI'savailableforbothplatformsarebelow: OtherYouTubeAPI's(thetraditionalAPI's)include: AnalyticsAPI's GettingStarted CodeSamples APIReference SampleRequests SampleApplication DataAPI GettingStarted SampleRequests GuidesandTutorials APIReference APIExplorer Advantages[edit] AgreatadvantageofusingYouTube'sAPI'sisthat3rdpartycompaniesareabletoarrangepayperclickcoupledwithadvertisingforyourvideos.Thisallowsthevideouploadertoreceivemoneyfortheworktheyhaveputintotheirvideos.[8] YouTubeAPI'salsoallowatighterintegrationofthevideoserviceintoa3rdpartywebsite.ThisessentiallymeansthattheuserdoesnotneedtoclickalinktogototheYouTubevideo.Instead,theyareabletoviewthevideointhesamepagethattheyarevisiting.[9] AnotheradvantageofusingtheYouTubeAPIsisthatitiseasiertoselectthespecificdataandvideostobestoredona3rdpartysite.[10] Disadvantages[edit] DuringaperiodthatincludedMarch2006,APIcallsfromFlashweredisabledduetosecurityconcerns.These,however,havesincebeenre-enabled.[11] Therearealsoproblemscurrently(October2014)withtheorientationonAndroiddevices.EvenbyaddingthefullscreentotheAndroidManifest,itstilldoesnotloadproperlyinthecorrectfullscreenorientation.[12] YouTubealsodoesnotallowvideostorunwhilsttheAndroiddeviceissleeping.Thiscanbeseenasanannoyanceforsomeusers.ParticularlyiftheuseristryingtouseYouTubeasareplacementmusicplayer.[13] Quotaslimittheactivityofsomeusers[14] Overall,theYouTubeAPI'shelptheuserwithcertainpiecesofcode.Ifthecodesnippetisalreadypresent,thereisnoneedforeachusertorecreatethiscodeasithasbeensuppliedbyYouTubethemselves.[15] Seealso[edit] Comparisonofvideoservices Viralvideo YouTube References[edit] ^"APIResources".YouTubeAPI.Retrieved7October2014. ^"PlayersandPlayerAPIs".Retrieved28November2014. ^Francis,William."UsingGoogle'sAPIInYourAndroidApps".TechRepublicUK.Retrieved24October2014. ^"YouTubeDirectLiteforiOS".GitHub.GitHubInc.Retrieved24October2014. ^"DataandAnalyticsAPIs".Retrieved28November2014. ^"Buttons,Widgets,andTools".Retrieved28November2014. ^"ObtainingasimpleAPIkeyforusewiththeYouTubeAPI".ZixMp4.GoogleDevelopers.Retrieved25October2014. ^Litt,Michael."HowTo:BenefitFromUsingYouTube".VidYard.VidYard.Retrieved24October2014. ^Wagner,Janet."TheIncreasingImportanceofAPIsInWebDevelopment".Tuts+.Tuts+.Retrieved24October2014. ^Arno,Christian(16October2014)."TheAdvantagesofSocialMediaAPIs".SearchEngineJournal.SearchEngineJournal.Retrieved27October2014. ^"FirsttimeusingYouTube'sAPi".Retrieved2007-03-17. ^"whattheadvantageordisadvantagesifiusedyoutube-APIorpresentthevideoinawebview".StackOverflow.StackOverflow.Retrieved24October2014. ^bh6712121."WhySteamMusicWon'tReplaceMyMusicPlayer".YouTube.bh6712121.Archivedfromtheoriginalon2015-07-20.Retrieved25October2014. ^"YouTubeDataAPI(V3)-QuotaCalculator". ^Purifier,HTML."EmbeddingYouTubeVideos".HTMLPurifier.HTMLPurifier.Retrieved27October2014. Externallinks[edit] YouTube'sRSSsystem YouTube'sDeveloperhome vteYouTube Google History Socialimpact PeopleCurrent SusanWojcicki(CEO) LyorCohen SusanneDaniels JohnFarrell RobertKyncl Former SteveChen(Founder) ChadHurley(Founder) SalarKamangar JawedKarim(Founder) UdiManber YuPan Channels Most-subscribedchannels Musicartists Most-viewedchannels Multi-channelnetwork(list) Officialchannel Originalchannels Cultureandvideos Beauty BookTube BreadTube CharlieBitMyFinger CreatorAwards DrawMyLife Let'sPlay Meatthezoo PewDiePievsT-Series Replygirl Viralvideo YouTubePoop YouTubeRewind 2018 2019 YouTuber list VTuber Lists Most-viewedvideos 24hours Arabicmusicvideos Frenchmusicvideos Indianvideos Pakistanivideos Most-likedvideos Most-dislikedvideos Criticism Censorship Copyrightissues ContentID Copyrightstrike Elsagate FantasticAdventuresscandal Garciav.Google,Inc. Kohistanvideocase Koreanbackdooradvertisementcontroversy Lenzv.UniversalMusicCorp. Privacy ReactionstoInnocenceofMuslims Sloveniangovernmentincident ViacomInternationalInc.v.YouTube,Inc. Appsandservices Kids Music Premium(originalprogramming) Shorts TV Events Awards CNN/YouTubepresidentialdebates ComedyWeek KSIvs.LoganPaul rematch Live MusicAwards 2013 2015 PlaylistLive ProjectforAwesome SocialintheCity SpaceLab SymphonyOrchestra InternetSymphonyNo.1 Mothership Tubecon VidCon Related API CensorshipofYouTube Germany GooglePreferred Vevo YouTubeHQshooting YouTubeineducation YouTubeInstant YouTubeSpace YouTubesuspensions YouTubeTheater Category Retrievedfrom"https://en.wikipedia.org/w/index.php?title=YouTube_API&oldid=1099242864" Categories:YouTubeApplicationprogramminginterfacesHiddencategories:ArticleswithshortdescriptionShortdescriptionisdifferentfromWikidataWikipediaarticleswithstyleissuesfromMay2018Allarticleswithstyleissues Navigationmenu Personaltools NotloggedinTalkContributionsCreateaccountLogin Namespaces ArticleTalk English Views ReadEditViewhistory More Search Navigation MainpageContentsCurrenteventsRandomarticleAboutWikipediaContactusDonate Contribute HelpLearntoeditCommunityportalRecentchangesUploadfile Tools WhatlinkshereRelatedchangesUploadfileSpecialpagesPermanentlinkPageinformationCitethispageWikidataitem Print/export DownloadasPDFPrintableversion Languages BahasaIndonesiaBahasaMelayuTürkçe Editlinks
延伸文章資訊
- 1Good documentation - the YouTube Data API - LinkedIn
Recently, I wanted to get some information about a few YouTube channels and ended up exploring th...
- 2API Guide — youtube-data-api 0.0.17 documentation
The YouTube Data API has a single class YouTubeDataAPI , which authenticates your API key and pro...
- 3YouTube Data API - Google Developers
With the YouTube Data API, you can add a variety of YouTube features to your application. Use the...
- 4What functionality is available through the YouTube API?
The API provides the ability to retrieve feeds related to videos, users, and playlists. ... Pleas...
- 5API Reference | YouTube Data API - Google Developers
The YouTube Data API lets you incorporate functions normally executed on the YouTube website into...