Create post viewer

This commit is contained in:
Cadence Fish
2020-01-19 04:38:14 +13:00
parent 693c083a99
commit 59d891b94b
19 changed files with 479 additions and 84 deletions

View File

@@ -8,6 +8,11 @@
* @type {{edges: {node: {text: string}}[]}}
*/
/**
* @typedef GraphEdgesChildren
* @type {{edges: {node: GraphChild}[]}}
*/
/**
* @typedef PagedEdges<T>
* @property {number} count
@@ -46,6 +51,7 @@
/**
* @typedef GraphImage
* @property {string} __typename
* @property {string} id
* @property {GraphEdgesText} edge_media_to_caption
* @property {string} shortcode
@@ -55,10 +61,39 @@
* @property {GraphEdgeCount} edge_media_preview_like
* @property {{width: number, height: number}} dimensions
* @property {string} display_url
* @property {{id: string, username: string}} owner
* @property {BasicOwner|ExtendedOwner} owner
* @property {string} thumbnail_src
* @property {Thumbnail[]} thumbnail_resources
* @property {string} accessibility_caption
* @property {GraphEdgesChildren} edge_sidecar_to_children
*/
/**
* @typedef GraphChild
* @property {string} __typename
* @property {string} id
* @property {string} shortcode
* @property {{width: number, height: number}} dimensions
* @property {string} display_url
* @property {Thumbnail[]} display_resources
* @property {string} accessibility_caption
* @property {boolean} is_video
*/
/**
* @typedef BasicOwner
* From user HTML response.
* @property {string} id
* @property {string} username
*/
/**
* @typedef ExtendedOwner
* From post API response.
* @property {string} id
* @property {string|null} profile_pic_url
* @property {string} username
* @property {string} full_name
*/
module.exports = {}