Hi, everyone.
Welcome to another edition of YouTube Developers Live.
My name is Ikai Lan, and today we're
going to be talking about how to keep up
to date on the Java API Client Library.
So those of you who have been following the show
will know that we have moved our samples away
from code.google.com to github.com.
So why don't we go ahead and switch to my computer.
Now, if you're going to code.google.com/p/youtube-api-samples,
hopefully you're seeing a warning that says hey,
we've moved to GitHub.
Check us out.
And this is what some of our GitHub samples look like.
Right here, that's a Java sample.
This is the right page you should be looking at.
So if we click through to the Java sample,
one thing that you usually want to keep up to date-- if you
want to keep up to date with new APIs--
is the version of the Java API client that you're using.
So one way you can do this is by looking in Maven
and looking at palm.xml.
And I'm going to blow this up real quick.
You'll see that there's a YouTube version and a YouTube
Analytics version.
And this is a really good way to make sure
that you download code that will definitely work,
is by copying the samples.
But what if we're not always keeping the samples up to date?
What if we release a new API-- and the samples,
they might lag a few days, but you need that API right away--
how do you know what the newest version of the API client
library is?
Well, it's not on the Java Code Samples page,
but there's a page we have on developers.google.com
for the API client libraries.
This is the API Client Library Home.
And you can get here by going to developers.google.com/API-client-library.
And again, you can always search for this
in your favorite search engine and it'll
take you to this page.
And what you want to do is you want to click through to Java,
Supported Google APIs-- let's scroll all the way down--
and you'll see that there's the YouTube Analytics API, as well
as the Data API.
So I'm going to go ahead and open these in a new tab.
OK, so I'm on the Data API Client for Java.
I'm going to scroll down and you can download the client
library, but usually the best way
is probably to use a build system like Maven or Gradle
because there's lots of dependencies
that the library depends on.
So click on the Maven tab, and you'll
see what the Palm configuration is, so palm.xml configurations.
Now we look here, it's rev79-1-17-0.
Good, our sample's up to date on that.
Now let's just make sure our Analytics API sample's also
up to date.
Click on Maven.
So rev24.1.17.
24.1.17.
Good.
So this means that all of our samples
are currently up to date.
And again, as you're watching the show,
there's probably going to be a newer version of the API client
libraries out.
Don't copy these exact numbers.
Instead, you should go to developers.google.com/API-client-libraries/java
and this will be the right place to look for what the most
current version is.
And this is only something you have
to do if you're using a statically-typed language
such as Java.
If you're using a language such as Python or Ruby,
you don't need to do this.
The Python library automatically generates the API document.
It automatically generates the methods
that you use to make API calls.
So you won't need to keep as up to date,
but do check periodically for major releases.
Well, that's all I have for you guys today.
Thank you for tuning in for this very short show.
Just wanted to share some tricks with you
for all the other fellow Java developers out there.
All right, take care and have a great day.