Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active November 11, 2018 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/54d827228d8eb9abf36cf8ee8cfeeba4 to your computer and use it in GitHub Desktop.
Save productioncoder/54d827228d8eb9abf36cf8ee8cfeeba4 to your computer and use it in GitHub Desktop.
Youtube in React: Redux state with channels
{
"api": {
"libraryLoaded": true
},
"videos": {
"byId": {
"videoId1": {
"snippet": {
"channelId": "channelId1"
},
"thumbnails": {}
},
"videoId2": {
"snippet": {
"channelId": "channelId2"
},
"thumbnails": {}
}
},
"mostPopular": {
"items": ["videoId1"],
"totalResults": 200,
"nextPageToken": "asdfasdfasdfasdfddd"
},
"categories": {
"1": "Film & Animation",
"2": "Music"
},
"byCategory": {
"categoryId1": {
"totalResults": 200,
"nextPageToken": "some-token",
"items": ["videoId1"]
}
},
"related": {
"videoId1": {
"totalResults": 200,
"nextPageToken": "some-page-token",
"items": ["videoId2"]
}
}
},
"channels": {
"byId": {
"channelId1": {
"id": "channelId1",
"snippet": {},
"statistics": {}
},
"channelId2": {
"id": "channelId2",
"snippet": {},
"statistics": {}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment