I want to get the value of description in Title(textview)
Here is json :
{
"kind": "youtube#videoListResponse",
"etag": "HCuE2tlv6pL-pkBXCa6_p5vmZGc",
"items": [
{
"kind": "youtube#video",
"etag": "yDMBbFsSFuOYTDqCooA3YoiGb_0",
"id": "omHuhbtWIY0",
"snippet": {
"publishedAt": "2022-03-11T12:40:37Z",
"channelId": "UCIjzLN8bj7Qv5daGJqj9rHA",
"title": "HTML creator master",
"description": "App Link - https://technical-studio-develop-7a3b1.web.app/\n\n00:00 Intro\n00:08 Introducing to app\n\n\n-----------------------------------------------\nCopyright Disclaimer under Section 107 of the copyright act 1976, allowance is made for fair use for purposes such as criticism, comment, news reporting, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/omHuhbtWIY0/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/omHuhbtWIY0/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/omHuhbtWIY0/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/omHuhbtWIY0/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/omHuhbtWIY0/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "Dream Programmers",
"categoryId": "22",
"liveBroadcastContent": "none",
"localized": {
"title": "HTML creator master",
"description": "App Link - https://technical-studio-develop-7a3b1.web.app/\n\n00:00 Intro\n00:08 Introducing to app\n\n\n-----------------------------------------------\nCopyright Disclaimer under Section 107 of the copyright act 1976, allowance is made for fair use for purposes such as criticism, comment, news reporting, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use."
}
}
}
],
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
}
}
My Java code:
_youtube_data_request_listener = new RequestNetwork.RequestListener() {
#Override
public void onResponse(String _param1, String _param2, HashMap<String, Object> _param3) {
final String _tag = _param1;
final String _response = _param2;
final HashMap<String, Object> _responseHeaders = _param3;
/*
= new Gson().fromJson("", new TypeToken<ArrayList<String>>(){}.getType());
*/
_processdialog(false, "");
ytData = new HashMap<>();
ytData = new Gson().fromJson(_response, new TypeToken<HashMap<String, Object>>(){}.getType());
title.setText(ytData.get("items")[].snippet.title);
ytData.clear();
}
#Override
public void onErrorResponse(String _param1, String _param2) {
final String _tag = _param1;
final String _message = _param2;
}
};
I want to get the value in title and set it in title textview.
Related
I have my json:
{
"title": "Regular Python Developer",
"street": "Huston 10",
"city": "Miami",
"country_code": "USA",
"address_text": "Huston 10, Miami",
"marker_icon": "python",
"workplace_type": "remote",
"company_name": "Merixstudio",
"company_url": "http://www.merixstudio.com",
"company_size": "200+",
"experience_level": "mid",
"latitude": "52.4143773",
"longitude": "16.9610657",
"published_at": "2020-04-21T10:00:07.446Z",
"remote_interview": true,
"id": "merixstudio-regular-django-developer",
"employment_types": [
{
"type": "b2b",
"salary": {
"from": 8000,
"to": 13500,
"currency": "usd"
}
},
{
"type": "permanent",
"salary": {
"from": 6500,
"to": 11100,
"currency": "usd"
}
}
],
"company_logo_url": "https://bucket.justjoin.it/offers/company_logos/thumb/07dd4eaf9a6ffb6b85bd03c5bd5c95016d5804ce.png?1628853121",
"skills": [
{
"name": "REST",
"level": 4
},
{
"name": "Python",
"level": 4
},
{
"name": "Django",
"level": 4
}
],
"remote": true
}
Online json to pojo converter splits this to 4 Classes. I have a problem with Salary.
I need Salary class to be not separated from Rootit's needs to be insideRoot class.
How should Root class looks like?
In Java you can nest classes:
class Root {
String title;
List<EmpType> employmentTypes;
class EmpType {
String type;
Salary salary;
class Salary {
int from;
int to;
}
}
}
In practice the difference to creating separate files for each class is often neglegible. The main purpose is to have stronger encapsulation or to group classes that belong together.
You could look at the source code of for example java.util.ImmutableCollections for a scenario where this makes sense. There are several nested classes that belong together and should not be accessible from anywhere else.
EDIT: Filter by salary.from:
// given:
List<EmpType> employmentTypes = ...;
List<EmpType> filtered = employmentTypes.stream()
.filter(et -> et.salary.from > 3000);
.collect(Collectors.toList());
EDIT 2:
// given:
List<Root> roots = ...;
List<Root> filtered = roots.stream()
.filter(r -> r.employmentTypes.stream()
.anyMatch(e -> e.salary.from > 3000))
.collect(Collectors.toList());
I am working on an android project that parses JSON from a file on a server and converting the data into java objects to display the data using text views.
The JSON file that I am parsing is based on a collection of books. Within each book entry is an author which has nested child elements for the last and first name of that author. Some entries can have multiple authors.
JSON file:
{
"bib": {
"book": [
{
"year": "1994",
"title": "TCP/IP Illustrated",
"author": {
"last": "Stevens",
"first": "W."
},
"publisher": "Addison-Wesley",
"price": "65.95"
},
{
"year": "1992",
"title": "Advanced Programming in the Unix environment",
"author": {
"last": "Stevens",
"first": "W."
},
"publisher": "Addison-Wesley",
"price": "65.95"
},
{
"year": "2000",
"title": "Data on the Web",
"author": [
{
"last": "Abiteboul",
"first": "Serge"
},
{
"last": "Buneman",
"first": "Peter"
},
{
"last": "Suciu",
"first": "Dan"
}
],
"publisher": "Morgan Kaufmann Puslishers",
"price": "39.95"
},
{
"year": "2012",
"title": "Professional Android 4 application development",
"author": {
"last": "Meier",
"first": "Reto"
},
"publisher": "ndianapolis : John Wiley and Sons",
"price": "33.47"
},
{
"year": "2017",
"title": "Java Programming for Beginners: Learn the fundamentals of programming with Java",
"author": {
"last": "Lassoff",
"first": "Mark"
},
"publisher": "Packt Publishing",
"price": "23.99"
},
{
"year": "2005",
"title": "Head First Java",
"author": [
{
"last": "Sierra",
"first": "Kathy"
},
{
"last": "Bates",
"first": "Bert"
},
],
"publisher": "MO'Reilly Media; 2 edition",
"price": "21.25"
},
{
"year": "2013",
"title": "XML for Dummies",
"author": {
"last": "Tittel",
"first": "Ed"
},
"publisher": "Wiley; 4th edition",
"price": "14.99"
},
{
"year": "2019",
"title": "Java XML and JSON: Document Processing for Java SE",
"author": {
"last": "Friesen",
"first": "Jeff"
},
"publisher": "Apress; 2nd ed. edition",
"price": "65.95"
},
{
"year": "2016",
"title": "Java Programming for Android Developers For Dummies (For Dummies (Computers))",
"author": {
"last": "Burd",
"first": "Barry A."
},
"publisher": "John Wiley and Sons; 2nd edition",
"price": "16.99"
}
]
}
}
JSON Parser:
private class parseJSON extends AsyncTask<Void, Void, List<Book>> {
private final String TAG = parseJSON.class.getSimpleName();
#Override
protected List<Book> doInBackground(Void... voids) {
Log.i(TAG, "Start Async to get books.");
ArrayList<Book> bookArray = new ArrayList<>(0);
String jsonUrl = getApplication().getString(R.string.json_feed);
HttpHandler httpHandler = new HttpHandler();
String jsonString = httpHandler.makeJsonServiceCall(jsonUrl);
Log.i(TAG, "Response from url: " + jsonString);
if( jsonString != null) {
try {
JSONObject root = new JSONObject(jsonString);
// Get JSON array node.
JSONArray books = root.getJSONObject("bib").getJSONArray("book");
// Looping through all the books.
for (int i = 0; i < books.length(); i++) {
JSONObject jsonBook = books.getJSONObject(i);
String year = jsonBook.getString("year");
String title = jsonBook.getString("title");
String author = jsonBook.getString("author");
String publisher = jsonBook.getString("publisher");
String price = "£" + jsonBook.getString("price");
final Book bookObject = new Book(year, title, author, publisher, price);
//Add the new books to our result array.
bookArray.add(bookObject);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
return bookArray;
}
#Override
protected void onPostExecute( List<Book> books) {
super.onPostExecute(books);
Log.e(TAG, "Populate UI recycler view with json converted data.");
bookList.setValue(books);
}
}
What is the best way I can accomplish this?
Use Gson by google, in your gradle add:
implementation 'com.google.code.gson:gson:2.8.6'
and you get it like:
Book bookObject = new Gson().fromJson("json", Book.class);
Good afternoon dear Stack-overflowees!
I've got the following youtube response for a query for videos from a HTTPRequest:
null{ "kind": "youtube#searchListResponse", "etag": "\"5g01s4- S2b4VpScndqCYc5Y-8k/MnX_l4A0-CoCz7AqTuwYbZZ8Eos\"", "nextPageToken": "CAoQAA","regionCode": "NL", "pageInfo": { "totalResults": 1000000, "resultsPerPage": 10 }, "items": [ { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/3x0aJRM9h33YMFvqksUj6alhFqU\"", "id": { "kind": "youtube#video", "videoId": "_nws2egRR1w" }, "snippet": { "publishedAt": "2015-06-26T19:00:00.000Z", "channelId": "UCY30JRSgfhYXA6i6xX1erWg", "title": "GODS IN REAL LIFE", "description": "Thank you to Smite for sponsoring this video! SMITE is an online battleground where the Gods of Old wage war in the name of conquest, glory, and most of all, ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/_nws2egRR1w/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/_nws2egRR1w/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/_nws2egRR1w/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "Smosh", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/K_ZgSkXsMidzJqa-m1IoLJU6UBE\"", "id": { "kind": "youtube#video", "videoId": "UiPZFPYhmzs" }, "snippet": { "publishedAt": "2014-03-22T18:02:28.000Z", "channelId": "UCo_IB5145EVNcf8hw1Kku7w", "title": "Game Theory: Are SMITE's Goddesses TOO SEXY?", "description": "Become a Theorist! ▻ http://.com/mrd2ntg SMITE is a MOBA with fast-paced action, terrific game modes, and well-endowed goddesses. In fact, the ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/UiPZFPYhmzs/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/UiPZFPYhmzs/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/UiPZFPYhmzs/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "The Game Theorists", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/wITeN0CQk1zT1C9k6Pm4BpvN3Jk\"", "id": { "kind": "youtube#video", "videoId": "5mVYnfJS73U" }, "snippet": { "publishedAt": "2016-01-05T14:00:01.000Z", "channelId": "UCLB_2GSFGa4Unb5fjq49SOw", "title": "SMITE Cinematic Trailer - 'To Hell & Back'", "description": "Welcome to SMITE, the online Battleground of the Gods. Play free at www.SmiteGame.com and seize victory in intense battles of strategic action, each fueled by ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/5mVYnfJS73U/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/5mVYnfJS73U/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/5mVYnfJS73U/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "SMITE by Hi-Rez Studios", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/e5NJ3_X-R_m5PEqxSbN26lIAsJo\"", "id": { "kind": "youtube#video", "videoId": "Chu1XqxoQio" }, "snippet": { "publishedAt": "2015-07-16T17:03:55.000Z", "channelId": "UCWeg2Pkate69NFdBeuRFTAw", "title": "LE DIEU DE LA LOOSE ! (Smite)", "description": "On a pas l'habitude de jouer à ce genre de jeux, mais ça change un peu ! Par contre on se fait défoncer ça ça changera jamais :') Les règles : 10 Dieux ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/Chu1XqxoQio/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/Chu1XqxoQio/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/Chu1XqxoQio/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "SQUEEZIE", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/j2Z6NrL6kZ7BqCqLC9T-iDIwVMo\"", "id": { "kind": "youtube#video", "videoId": "vAnVb_oBF7I" }, "snippet": { "publishedAt": "2014-06-07T19:00:02.000Z", "channelId": "UC-lHJZR3Gqxm24_Vd_AJ5Yw", "title": "3 HEROES, 3 QUESTIONS! - Smite: Tournament", "description": "Will they get good? Will Cry find love? Will they get a kill? Find out here!: http://ly/1p1xH05 http://youtu.be/lrXsGQO6Hrs I edited the first part of this video, Cry ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/vAnVb_oBF7I/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/vAnVb_oBF7I/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/vAnVb_oBF7I/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "PewDiePie", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/9_S9Q9n9KHeFGuPeBIlxzFHp8hc\"", "id": { "kind": "youtube#video", "videoId": "CSFibeWqXaM" }, "snippet": { "publishedAt": "2015-08-02T16:01:42.000Z", "channelId": "UCLB_2GSFGa4Unb5fjq49SOw", "title": "SCL Spring Split Week 1 Day 4", "description": "", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/CSFibeWqXaM/default_live.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/CSFibeWqXaM/mqdefault_live.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/CSFibeWqXaM/hqdefault_live.jpg", "width": 480, "height": 360 } }, "channelTitle": "SMITE by Hi-Rez Studios", "liveBroadcastContent": "live" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/_HsRcEb5SgSrO7KDYGVcWnM-IyE\"", "id": { "kind": "youtube#video", "videoId": "4I7kDcRdM2Q" }, "snippet": { "publishedAt": "2012-06-02T07:31:19.000Z", "channelId": "UCTy_oLoGaQnV7LeiOkxx3qw", "title": "SMITE Gameplay (Part 1) - First Look HD", "description": "http://mmohuts.com/preview/smite for SMITE reviews, videos, screenshots and more. SMITE is a third person MOBA published by Hi-Rez Studios . MMOHuts has ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/4I7kDcRdM2Q/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/4I7kDcRdM2Q/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/4I7kDcRdM2Q/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "MMOHuts", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/NFvQY8IZQap1sIr8ovsni7HsLAI\"", "id": { "kind": "youtube#video", "videoId": "OwAC1VD1608" }, "snippet": { "publishedAt": "2015-04-12T23:00:00.000Z", "channelId": "UCda7Fl9Q4wmqDqASRDqrVbA", "title": "COCIELO TESTE, O CRACUDO - DetonaTHOR Smite [2/2]", "description": "BAIXE E JOGUE SMITE DE GRAÇA: http://lup.vc/JogueSmite_Muca PARTE 1 DO EVENTO: https://youtu.be/DHtOrB63DD0 Instagram: ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/OwAC1VD1608/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/OwAC1VD1608/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/OwAC1VD1608/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "Muca Muriçoca", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"5g01s4-wS2b4VpScndqCYc5Y-8k/_QFud2t95zRYczOqcudKnUHL4r8\"", "id": { "kind": "youtube#video", "videoId": "6q0uAevwQ2Q"
Only the first part is actually relevent, seeing as how the response starts off with a 'null'.
Now i've tried using the following code to parse the json using GSON.(result being the aforementioned JSON as a String.
JsonElement jelement = new JsonParser().parse(result);
JsonObject jobject = jelement.getAsJsonObject();
JsonArray jarray = jobject.getAsJsonArray("items");
However, Gson cannot work around the 'null' at the front of the json string. It converts the entire object in the first line not into a JsonElement but JsonNull.
Is there any way to try and get the array called 'items' from the string directly?
I've tried replacing the null with another word, i've tried several other things such as GsonBuilder.serializeNulls() and several other stackoverflow entried, yet I cannot work around this.
Any help/tips would be very much appreciated.
--edit--
following java code is used to call the api:
private String baseUrl = "https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=10&order=viewCount&q=";
String output;
String result = "";
URL url = new URL(this.baseUrl + q + "&type=video&key=" + key);
Gson gson = new Gson();
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("GET");
conn.setRequestProperty("Content-Type", "application/json");
BufferedReader br = new BufferedReader(new InputStreamReader(
(conn.getInputStream())));
System.out.println("Output from Server .... \n");
while ((output = br.readLine()) != null) {
result += output;
}
System.out.println(result);
I would guess your'e result is initiated with null so "result+=output" will be null"output" cause a NullPointer results in "null" in "+" string concatenation. Think thats your problem. Either init it with empty String or check in your while loop for null.
I want Slice title in two line such as Czech Republic I need
Czech
Republic
I have tried but it seems to be not working in my case. I have small space to display chart
var chart = AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "none",
"legend": {
"markerType": "circle",
"position": "right",
"marginRight": 80,
"autoMargins": false
},
"dataProvider": [{
"country": "Czech Republic",
"litres": 256.9
}, {
"country": "Ireland",
"litres": 131.1
}, {
"country": "Germany",
"litres": 115.8
}, {
"country": "Australia",
"litres": 109.9
}, {
"country": "Austria",
"litres": 108.3
}, {
"country": "UK",
"litres": 65
}, {
"country": "Belgium",
"litres": 40
}],
"valueField": "litres",
"titleField": "country",
"titleField": "country"
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
"exportConfig": {
"menuTop":"0px",
"menuItems": [{
"icon": '/lib/3/images/export.png',
"format": 'png'
}]
}
});
You can either define the line break in your data-provider like this:
"dataProvider": [{
"country": "Czech<br>Republic",
"litres": 256.9
}
or you just could get the labels inside the pie using the labeladius-property:
"labelRadius": -35
You can play around with the labelRadius in this JSFiddle and see how it works.Docs for this is here.
I am using java in programming with youtube api library. as written in title I want to get source link for youtube channel logo (image in top left corner beside channel name). for example: http://www.youtube.com/user/NationalGeographic here it's my try:
YouTubeService service = new YouTubeService("NationalGeographic");
String feedUrl = http://gdata.youtube.com/feeds/api/users/NationalGeographic/uploads;
VideoFeed videoFeed = service.getFeed(new URL(feedUrl), VideoFeed.class);
String title = videoFeed.getTitle().getPlainText();
so I got channel name but I can't get channel logo. please any help.
With the new v3 API, you can get it by listing the channel:
https://developers.google.com/youtube/v3/docs/channels/list
They retrieve the logo in different sizes
Here is the output of Joe Rogan Experience :
{
"kind": "youtube#channelListResponse",
"etag": "\"Fznwjl6JEQdo1MGvHOGaz_YanRU/_RZUfBijoiFpUwyyBzSuSJbKOi8\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#channel",
"etag": "\"Fznwjl6JEQdo1MGvHOGaz_YanRU/zhDVFVQYUTKigur2_WU6BMjm2Qo\"",
"id": "UCzQUP1qoWDoEbmsQxvdjxgQ",
"snippet": {
"title": "PowerfulJRE",
"description": "The Joe Rogan Experience podcast",
"customUrl": "joerogan",
"publishedAt": "2013-01-12T01:40:14.000Z",
"thumbnails": {
"default": {
"url": "https://yt3.ggpht.com/a/AGF-l78OfG5OxzCfyyoFqw-dKeiFNGzTIT4YgpMK4Q=s88-c-k-c0xffffffff-no-rj-mo",
"width": 88,
"height": 88
},
"medium": {
"url": "https://yt3.ggpht.com/a/AGF-l78OfG5OxzCfyyoFqw-dKeiFNGzTIT4YgpMK4Q=s240-c-k-c0xffffffff-no-rj-mo",
"width": 240,
"height": 240
},
"high": {
"url": "https://yt3.ggpht.com/a/AGF-l78OfG5OxzCfyyoFqw-dKeiFNGzTIT4YgpMK4Q=s800-c-k-c0xffffffff-no-rj-mo",
"width": 800,
"height": 800
}
},
"localized": {
"title": "PowerfulJRE",
"description": "The Joe Rogan Experience podcast"
}
},
"contentDetails": {
"relatedPlaylists": {
"uploads": "UUzQUP1qoWDoEbmsQxvdjxgQ",
"watchHistory": "HL",
"watchLater": "WL"
}
},
"statistics": {
"viewCount": "1783605586",
"commentCount": "0",
"subscriberCount": "7180000",
"hiddenSubscriberCount": false,
"videoCount": "2305"
}
}
]
}
I don't think you can get it with the v2 API (although I hope you can), but the link structure for these images is somewhat similar:
http://i2.ytimg.com/i/UHW94eEFW7hkUMVaZz4eDg/1.jpg?v=d69778
http://i4.ytimg.com/i/7-BWdwziR8LozMCBD1Ei7w/1.jpg?v=d8170b
Wonder where those ids come from...