diff --git a/astro.config.mjs b/astro.config.mjs index b1266d0..455df1a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -15,7 +15,7 @@ import partytown from "@astrojs/partytown"; import prefetch from "@astrojs/prefetch"; // https://astro.build/config -import vercel from "@astrojs/vercel/static"; +import vercel from "@astrojs/vercel/serverless"; // https://astro.build/config export default defineConfig({ @@ -30,7 +30,7 @@ export default defineConfig({ partytown(), prefetch(), ], - output: "static", + output: "server", adapter: vercel({ analytics: true, }), diff --git a/forem.swagger.json b/forem.swagger.json new file mode 100644 index 0000000..2fa5469 --- /dev/null +++ b/forem.swagger.json @@ -0,0 +1,3554 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Forem API V1", + "version": "1.0.0", + "description": "Access Forem articles, users and other resources via API.\n For a real-world example of Forem in action, check out [DEV](https://www.dev.to).\n All endpoints can be accessed with the 'api-key' header and a accept header, but\n some of them are accessible publicly without authentication.\n\n Dates and date times, unless otherwise specified, must be in\n the [RFC 3339](https://tools.ietf.org/html/rfc3339) format." + }, + "paths": { + "/api/articles": { + "post": { + "summary": "Publish article", + "tags": ["articles"], + "description": "This endpoint allows the client to create a new article.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.", + "operationId": "createArticle", + "parameters": [], + "responses": { + "201": { + "description": "An Article", + "content": { + "application/json": { + "example": { + "type_of": "article", + "id": 607, + "title": "New article", + "description": "New post example", + "readable_publish_date": "Feb 27", + "slug": "new-article-1j5a", + "path": "/username383/new-article-1j5a", + "url": "http://localhost:3000/username383/new-article-1j5a", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": 16, + "published_timestamp": "2023-02-27T10:58:03Z", + "positive_reactions_count": 0, + "cover_image": "https://thepracticaldev.s3.amazonaws.com/i/5wfo25724gzgk5e5j50g.jpg", + "social_image": "https://thepracticaldev.s3.amazonaws.com/i/5wfo25724gzgk5e5j50g.jpg", + "canonical_url": "https://dev.to/fdocr/headless-chrome-dual-mode-tests-for-ruby-on-rails-4p6g", + "created_at": "2023-02-27T10:58:03Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:03Z", + "last_comment_at": "2023-02-27T10:58:03Z", + "reading_time_minutes": 1, + "tag_list": "", + "tags": [], + "body_html": "
New body for the article
\n\n", + "body_markdown": "**New** body for the article", + "user": { + "name": "King \"Kurtis\" \\:/ Hilpert", + "username": "username383", + "twitter_username": "twitter383", + "github_username": "github383", + "user_id": 819, + "website_url": null, + "profile_image": "/uploads/user/profile_image/819/8d11e7ba-593a-4192-8977-14b323d77018.jpeg", + "profile_image_90": "/uploads/user/profile_image/819/8d11e7ba-593a-4192-8977-14b323d77018.jpeg" + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "example": { + "error": "param is missing or the value is empty: article", + "status": 422 + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Article" + } + } + } + } + }, + "get": { + "summary": "Published articles", + "security": [], + "tags": ["articles"], + "description": "This endpoint allows the client to retrieve a list of articles.\n\n\"Articles\" are all the posts that users create on DEV that typically\nshow up in the feed. They can be a blog post, a discussion question,\na help thread etc. but is referred to as article within the code.\n\nBy default it will return featured, published articles ordered\nby descending popularity.\n\nIt supports pagination, each page will contain `30` articles by default.", + "operationId": "getArticles", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Using this parameter will retrieve articles that contain the requested tag. Articles\nwill be ordered by descending popularity.This parameter can be used in conjuction with `top`.", + "schema": { + "type": "string" + }, + "example": "discuss" + }, + { + "name": "tags", + "in": "query", + "required": false, + "description": "Using this parameter will retrieve articles with any of the comma-separated tags.\nArticles will be ordered by descending popularity.", + "schema": { + "type": "string" + }, + "example": "javascript, css" + }, + { + "name": "tags_exclude", + "in": "query", + "required": false, + "description": "Using this parameter will retrieve articles that do _not_ contain _any_\nof comma-separated tags. Articles will be ordered by descending popularity.", + "schema": { + "type": "string" + }, + "example": "node, java" + }, + { + "name": "username", + "in": "query", + "required": false, + "description": "Using this parameter will retrieve articles belonging\n to a User or Organization ordered by descending publication date.\n If `state=all` the number of items returned will be `1000` instead of the default `30`.\n This parameter can be used in conjuction with `state`.", + "schema": { + "type": "string" + }, + "example": "ben" + }, + { + "name": "state", + "in": "query", + "required": false, + "description": "Using this parameter will allow the client to check which articles are fresh or rising.\n If `state=fresh` the server will return fresh articles.\n If `state=rising` the server will return rising articles.\n This param can be used in conjuction with `username`, only if set to `all`.", + "schema": { + "type": "string", + "enum": ["fresh", "rising", "all"] + }, + "example": "fresh" + }, + { + "name": "top", + "in": "query", + "required": false, + "description": "Using this parameter will allow the client to return the most popular articles\nin the last `N` days.\n`top` indicates the number of days since publication of the articles returned.\nThis param can be used in conjuction with `tag`.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 2 + }, + { + "name": "collection_id", + "in": "query", + "required": false, + "description": "Adding this will allow the client to return the list of articles\nbelonging to the requested collection, ordered by ascending publication date.", + "schema": { + "type": "integer", + "format": "int32" + }, + "example": 99 + } + ], + "responses": { + "200": { + "description": "A List of Articles", + "content": { + "application/json": { + "example": [ + { + "type_of": "article", + "id": 610, + "title": "The Wind's Twelve Quarters175", + "description": "Iphone yr etsy goth skateboard sustainable twee direct trade. Freegan cardigan +1 twee blog gastropub...", + "readable_publish_date": "Feb 27", + "slug": "the-winds-twelve-quarters175-p58", + "path": "/username387/the-winds-twelve-quarters175-p58", + "url": "http://localhost:3000/username387/the-winds-twelve-quarters175-p58", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:04Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/10-56ac1726da8a3bcbe4f93b48752287ea41bb79199cd8a8a61a9e4280ce9ae5b8.png", + "social_image": "http://localhost:3000/assets/10-56ac1726da8a3bcbe4f93b48752287ea41bb79199cd8a8a61a9e4280ce9ae5b8.png", + "canonical_url": "http://localhost:3000/username387/the-winds-twelve-quarters175-p58", + "created_at": "2023-02-27T10:58:04Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:04Z", + "last_comment_at": "2023-02-27T10:58:04Z", + "reading_time_minutes": 1, + "tag_list": ["discuss"], + "tags": "discuss", + "user": { + "name": "Boyce \"Jimmy\" \\:/ Ledner", + "username": "username387", + "twitter_username": "twitter387", + "github_username": "github387", + "user_id": 823, + "website_url": null, + "profile_image": "/uploads/user/profile_image/823/265a22f6-a63a-4bae-9f3f-6a5d8d046de5.jpeg", + "profile_image_90": "/uploads/user/profile_image/823/265a22f6-a63a-4bae-9f3f-6a5d8d046de5.jpeg" + }, + "organization": { + "name": "O'Connell, Bosco and Skiles", + "username": "org70", + "slug": "org70", + "profile_image": "/uploads/organization/profile_image/72/0ac6f538-133b-4535-a194-9762e9953ed2.png", + "profile_image_90": "/uploads/organization/profile_image/72/0ac6f538-133b-4535-a194-9762e9953ed2.png" + }, + "flare_tag": { + "name": "discuss", + "bg_color_hex": "#000000", + "text_color_hex": "#ffffff" + } + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + } + } + } + }, + "/api/articles/latest": { + "get": { + "summary": "Published articles sorted by published date", + "security": [], + "tags": ["articles"], + "description": "This endpoint allows the client to retrieve a list of articles. ordered by descending publish date.\n\nIt supports pagination, each page will contain 30 articles by default.", + "operationId": "getLatestArticles", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "200": { + "description": "A List of Articles", + "content": { + "application/json": { + "example": [ + { + "type_of": "article", + "id": 613, + "title": "Absalom, Absalom!178", + "description": "Sartorial photo booth muggle magic chambray occupy umami leggings. Celiac pug paleo yolo...", + "readable_publish_date": "Feb 27", + "slug": "absalom-absalom178-4a5e", + "path": "/username390/absalom-absalom178-4a5e", + "url": "http://localhost:3000/username390/absalom-absalom178-4a5e", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:04Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/24-377bc0861a9a539e8d1875ea9d4eea9e0226d93e1b6e9317e0c73c754699cc14.png", + "social_image": "http://localhost:3000/assets/24-377bc0861a9a539e8d1875ea9d4eea9e0226d93e1b6e9317e0c73c754699cc14.png", + "canonical_url": "http://localhost:3000/username390/absalom-absalom178-4a5e", + "created_at": "2023-02-27T10:58:04Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:04Z", + "last_comment_at": "2023-02-27T10:58:04Z", + "reading_time_minutes": 1, + "tag_list": ["javascript", "html", "discuss"], + "tags": "javascript, html, discuss", + "user": { + "name": "Samantha \"Clemencia\" \\:/ Kemmer", + "username": "username390", + "twitter_username": "twitter390", + "github_username": "github390", + "user_id": 826, + "website_url": null, + "profile_image": "/uploads/user/profile_image/826/dd79a3c7-6da2-4138-ac15-fab1628b409d.jpeg", + "profile_image_90": "/uploads/user/profile_image/826/dd79a3c7-6da2-4138-ac15-fab1628b409d.jpeg" + }, + "flare_tag": { + "name": "discuss", + "bg_color_hex": "#000000", + "text_color_hex": "#ffffff" + } + }, + { + "type_of": "article", + "id": 612, + "title": "If Not Now, When?177", + "description": "Master taxidermy yuccie polaroid tousled 90's street. Green juice helvetica chartreuse listicle banh...", + "readable_publish_date": "Feb 27", + "slug": "if-not-now-when177-4iin", + "path": "/username389/if-not-now-when177-4iin", + "url": "http://localhost:3000/username389/if-not-now-when177-4iin", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:04Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/2-1a96ae446ded018b65b215cce3aecc40a00e701642da521fdd6edd3c593ff6c1.png", + "social_image": "http://localhost:3000/assets/2-1a96ae446ded018b65b215cce3aecc40a00e701642da521fdd6edd3c593ff6c1.png", + "canonical_url": "http://localhost:3000/username389/if-not-now-when177-4iin", + "created_at": "2023-02-27T10:58:04Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:04Z", + "last_comment_at": "2023-02-27T10:58:04Z", + "reading_time_minutes": 1, + "tag_list": ["javascript", "html", "discuss"], + "tags": "javascript, html, discuss", + "user": { + "name": "Brianna \"Gabriel\" \\:/ Mante", + "username": "username389", + "twitter_username": "twitter389", + "github_username": "github389", + "user_id": 825, + "website_url": null, + "profile_image": "/uploads/user/profile_image/825/3bf3e66f-9268-4e22-89d9-431e0a5fa9dc.jpeg", + "profile_image_90": "/uploads/user/profile_image/825/3bf3e66f-9268-4e22-89d9-431e0a5fa9dc.jpeg" + }, + "flare_tag": { + "name": "discuss", + "bg_color_hex": "#000000", + "text_color_hex": "#ffffff" + } + }, + { + "type_of": "article", + "id": 611, + "title": "Have His Carcase176", + "description": "Salvia sartorial carry you probably haven't heard of them try-hard dreamcatcher meggings 8-bit....", + "readable_publish_date": "Feb 27", + "slug": "have-his-carcase176-1phd", + "path": "/username388/have-his-carcase176-1phd", + "url": "http://localhost:3000/username388/have-his-carcase176-1phd", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:04Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/24-377bc0861a9a539e8d1875ea9d4eea9e0226d93e1b6e9317e0c73c754699cc14.png", + "social_image": "http://localhost:3000/assets/24-377bc0861a9a539e8d1875ea9d4eea9e0226d93e1b6e9317e0c73c754699cc14.png", + "canonical_url": "http://localhost:3000/username388/have-his-carcase176-1phd", + "created_at": "2023-02-27T10:58:04Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:04Z", + "last_comment_at": "2023-02-27T10:58:04Z", + "reading_time_minutes": 1, + "tag_list": ["javascript", "html", "discuss"], + "tags": "javascript, html, discuss", + "user": { + "name": "Leeanna \"Miles\" \\:/ Hills", + "username": "username388", + "twitter_username": "twitter388", + "github_username": "github388", + "user_id": 824, + "website_url": null, + "profile_image": "/uploads/user/profile_image/824/50463451-9323-40fc-b439-c7df125a27fa.jpeg", + "profile_image_90": "/uploads/user/profile_image/824/50463451-9323-40fc-b439-c7df125a27fa.jpeg" + }, + "flare_tag": { + "name": "discuss", + "bg_color_hex": "#000000", + "text_color_hex": "#ffffff" + } + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + } + } + } + }, + "/api/articles/{id}": { + "get": { + "summary": "Published article by id", + "security": [], + "tags": ["articles"], + "description": "This endpoint allows the client to retrieve a single published article given its `id`.", + "operationId": "getArticleById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "An Article", + "content": { + "application/json": { + "example": { + "type_of": "article", + "id": 614, + "title": "Cover Her Face179", + "description": "Banjo carry cray vhs swag. Whatever celiac quinoa pabst chillwave. Vice pickled park lumbersexual...", + "readable_publish_date": "Feb 27", + "slug": "cover-her-face179-4gbc", + "path": "/username391/cover-her-face179-4gbc", + "url": "http://localhost:3000/username391/cover-her-face179-4gbc", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:04Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/2-1a96ae446ded018b65b215cce3aecc40a00e701642da521fdd6edd3c593ff6c1.png", + "social_image": "http://localhost:3000/assets/2-1a96ae446ded018b65b215cce3aecc40a00e701642da521fdd6edd3c593ff6c1.png", + "canonical_url": "http://localhost:3000/username391/cover-her-face179-4gbc", + "created_at": "2023-02-27T10:58:04Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:04Z", + "last_comment_at": "2023-02-27T10:58:04Z", + "reading_time_minutes": 1, + "tag_list": "discuss", + "tags": ["discuss"], + "body_html": "Banjo carry cray vhs swag. Whatever celiac quinoa pabst chillwave. Vice pickled park lumbersexual salvia synth. Blog etsy austin mustache.
\n\nBiodiesel forage street thundercats deep v.
\n\n", + "body_markdown": "---\ntitle: Cover Her Face179\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nBanjo carry cray vhs swag. Whatever celiac quinoa pabst chillwave. Vice pickled park lumbersexual salvia synth. Blog etsy austin mustache.\n\n\nBiodiesel forage street thundercats deep v.\n\n", + "user": { + "name": "Von \"Joan\" \\:/ Swaniawski", + "username": "username391", + "twitter_username": "twitter391", + "github_username": "github391", + "user_id": 827, + "website_url": null, + "profile_image": "/uploads/user/profile_image/827/90d87f32-bafb-49f5-8001-c7f1146a84f8.jpeg", + "profile_image_90": "/uploads/user/profile_image/827/90d87f32-bafb-49f5-8001-c7f1146a84f8.jpeg" + }, + "flare_tag": { + "name": "discuss", + "bg_color_hex": "#000000", + "text_color_hex": "#ffffff" + } + }, + "schema": { + "type": "object", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + }, + "404": { + "description": "Article Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + }, + "put": { + "summary": "Update an article by id", + "tags": ["articles"], + "description": "This endpoint allows the client to update an existing article.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.", + "operationId": "updateArticle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the user to unpublish.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 123 + } + ], + "responses": { + "200": { + "description": "An Article", + "content": { + "application/json": { + "example": { + "type_of": "article", + "id": 615, + "title": "Nectar in a Sieve180", + "description": "Humblebrag brooklyn master 3 wolf moon small batch thundercats typewriter chia. Gluten-free direct...", + "readable_publish_date": "Feb 27", + "slug": "nectar-in-a-sieve180-51j6", + "path": "/username392/nectar-in-a-sieve180-51j6", + "url": "http://localhost:3000/username392/nectar-in-a-sieve180-51j6", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:04Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/16-77521848e7b5fcc073ac3e0bb004826e97f737238194e4c79330f662cc946ab2.png", + "social_image": "http://localhost:3000/assets/16-77521848e7b5fcc073ac3e0bb004826e97f737238194e4c79330f662cc946ab2.png", + "canonical_url": "http://localhost:3000/username392/nectar-in-a-sieve180-51j6", + "created_at": "2023-02-27T10:58:04Z", + "edited_at": "2023-02-27T10:58:04Z", + "crossposted_at": null, + "published_at": "2023-02-27T10:58:04Z", + "last_comment_at": "2023-02-27T10:58:04Z", + "reading_time_minutes": 1, + "tag_list": "", + "tags": [], + "body_html": "New body for the article
\n\n", + "body_markdown": "**New** body for the article", + "user": { + "name": "Lyndon \"Kaley\" \\:/ Torphy", + "username": "username392", + "twitter_username": "twitter392", + "github_username": "github392", + "user_id": 828, + "website_url": null, + "profile_image": "/uploads/user/profile_image/828/bd640b77-6394-4cf5-8d72-646c8ef542d5.jpeg", + "profile_image_90": "/uploads/user/profile_image/828/bd640b77-6394-4cf5-8d72-646c8ef542d5.jpeg" + } + } + } + } + }, + "404": { + "description": "Article Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "example": { + "error": "param is missing or the value is empty: article", + "status": 422 + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Article" + } + } + } + } + } + }, + "/api/articles/{username}/{slug}": { + "get": { + "summary": "Published article by path", + "security": [], + "tags": ["articles"], + "description": "This endpoint allows the client to retrieve a single published article given its `path`.", + "operationId": "getArticleByPath", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An Article", + "content": { + "application/json": { + "example": { + "type_of": "article", + "id": 618, + "title": "The Line of Beauty183", + "description": "Synth tote bag venmo vice hoodie disrupt bitters mixtape. Fashion axe goth shoreditch kogi loko...", + "readable_publish_date": "Feb 27", + "slug": "the-line-of-beauty183-33nj", + "path": "/username396/the-line-of-beauty183-33nj", + "url": "http://localhost:3000/username396/the-line-of-beauty183-33nj", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:04Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/3-93b6b57b5a6115cffe5d63d29a22825eb9e65f647bfef57a88244bc2b98186f0.png", + "social_image": "http://localhost:3000/assets/3-93b6b57b5a6115cffe5d63d29a22825eb9e65f647bfef57a88244bc2b98186f0.png", + "canonical_url": "http://localhost:3000/username396/the-line-of-beauty183-33nj", + "created_at": "2023-02-27T10:58:04Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:04Z", + "last_comment_at": "2023-02-27T10:58:04Z", + "reading_time_minutes": 1, + "tag_list": "discuss", + "tags": ["discuss"], + "body_html": "Synth tote bag venmo vice hoodie disrupt bitters mixtape. Fashion axe goth shoreditch kogi loko literally.
\n\nFranzen ramps forage wayfarers thundercats put a bird on it loko.
\n\n", + "body_markdown": "---\ntitle: The Line of Beauty183\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nSynth tote bag venmo vice hoodie disrupt bitters mixtape. Fashion axe goth shoreditch kogi loko literally.\n\n\nFranzen ramps forage wayfarers thundercats put a bird on it loko.\n\n", + "user": { + "name": "Danial \"Charles\" \\:/ Grant", + "username": "username396", + "twitter_username": "twitter396", + "github_username": "github396", + "user_id": 832, + "website_url": null, + "profile_image": "/uploads/user/profile_image/832/80339e58-8c50-4c64-b8a5-0ae9d3bf6d2d.jpeg", + "profile_image_90": "/uploads/user/profile_image/832/80339e58-8c50-4c64-b8a5-0ae9d3bf6d2d.jpeg" + }, + "flare_tag": { + "name": "discuss", + "bg_color_hex": "#000000", + "text_color_hex": "#ffffff" + } + }, + "schema": { + "type": "object", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + }, + "404": { + "description": "Article Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/articles/me": { + "get": { + "summary": "User's articles", + "tags": ["articles", "users"], + "description": "This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nPublished articles will be in reverse chronological publication order.\n\nIt will return published articles with pagination. By default a page will contain 30 articles.", + "operationId": "getUserArticles", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "200": { + "description": "A List of the authenticated user's Articles", + "content": { + "application/json": { + "example": [], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + } + } + } + }, + "/api/articles/me/published": { + "get": { + "summary": "User's published articles", + "tags": ["articles", "users"], + "description": "This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nPublished articles will be in reverse chronological publication order.\n\nIt will return published articles with pagination. By default a page will contain 30 articles.", + "operationId": "getUserPublishedArticles", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "200": { + "description": "A List of the authenticated user's Articles", + "content": { + "application/json": { + "example": [], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + } + } + } + }, + "/api/articles/me/unpublished": { + "get": { + "summary": "User's unpublished articles", + "tags": ["articles", "users"], + "description": "This endpoint allows the client to retrieve a list of unpublished articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nUnpublished articles will be in reverse chronological creation order.\n\nIt will return unpublished articles with pagination. By default a page will contain 30 articles.", + "operationId": "getUserUnpublishedArticles", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "200": { + "description": "A List of the authenticated user's Articles", + "content": { + "application/json": { + "example": [], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + } + } + } + }, + "/api/articles/me/all": { + "get": { + "summary": "User's all articles", + "tags": ["articles", "users"], + "description": "This endpoint allows the client to retrieve a list of all articles on behalf of an authenticated user.\n\n\"Articles\" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.\n\nIt will return both published and unpublished articles with pagination.\n\nUnpublished articles will be at the top of the list in reverse chronological creation order. Published articles will follow in reverse chronological publication order.\n\nBy default a page will contain 30 articles.", + "operationId": "getUserAllArticles", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "200": { + "description": "A List of the authenticated user's Articles", + "content": { + "application/json": { + "example": [], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + } + } + } + }, + "/api/articles/{id}/unpublish": { + "put": { + "summary": "Unpublish an article", + "tags": ["articles"], + "description": "This endpoint allows the client to unpublish an article.\n\nThe user associated with the API key must have any 'admin' or 'moderator' role.\n\nThe article will be unpublished and will no longer be visible to the public. It will remain\nin the database and will set back to draft status on the author's posts dashboard. Any\nnotifications associated with the article will be deleted. Any comments on the article\nwill remain.", + "operationId": "unpublishArticle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the article to unpublish.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 1 + }, + { + "name": "note", + "in": "query", + "required": false, + "description": "Content for the note that's created along with unpublishing", + "schema": { + "type": "string" + }, + "example": "Admin requested unpublishing all articles via API" + } + ], + "responses": { + "204": { + "description": "Article successfully unpublished" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "404": { + "description": "Article Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/comments": { + "get": { + "summary": "Comments", + "security": [], + "tags": ["comments"], + "description": "This endpoint allows the client to retrieve all comments belonging to an article or podcast episode as threaded conversations.\n\nIt will return the all top level comments with their nested comments as threads. See the format specification for further details.", + "operationId": "getCommentsByArticleId", + "parameters": [ + { + "name": "a_id", + "in": "query", + "required": false, + "description": "Article identifier.", + "schema": { + "type": "string" + }, + "example": "321" + }, + { + "name": "p_id", + "in": "query", + "required": false, + "description": "Podcast Episode identifier.", + "schema": { + "type": "string" + }, + "example": "321" + } + ], + "responses": { + "200": { + "description": "A List of Comments", + "content": { + "application/json": { + "example": [ + { + "type_of": "comment", + "id_code": "60", + "created_at": "2023-02-27T10:58:05Z", + "body_html": "Tumblr organic put a bird on it everyday mustache typewriter pug.
\n\n", + "user": { + "name": "Dwight \"Pedro\" \\:/ Parker", + "username": "username410", + "twitter_username": "twitter410", + "github_username": "github410", + "user_id": 846, + "website_url": null, + "profile_image": "/uploads/user/profile_image/846/8af90bef-f000-41c1-a90f-0e364c163a8a.jpeg", + "profile_image_90": "/uploads/user/profile_image/846/8af90bef-f000-41c1-a90f-0e364c163a8a.jpeg" + }, + "children": [] + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Comment" + } + } + } + } + }, + "404": { + "description": "Resource Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/comments/{id}": { + "get": { + "summary": "Comment by id", + "security": [], + "tags": ["comments"], + "description": "This endpoint allows the client to retrieve a comment as well as his descendants comments.\n\n It will return the required comment (the root) with its nested descendants as a thread.\n\n See the format specification for further details.", + "operationId": "getCommentById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Comment identifier.", + "schema": { + "type": "integer" + }, + "example": "321" + } + ], + "responses": { + "200": { + "description": "A List of the Comments", + "content": { + "application/json": { + "example": { + "type_of": "comment", + "id_code": "62", + "created_at": "2023-02-27T10:58:05Z", + "body_html": "Farm-to-table park banjo. Cronut gentrify farm-to-table. Salvia distillery letterpress deep v keffiyeh kickstarter thundercats cray.
\n\n", + "user": { + "name": "Gilbert \"Alverta\" \\:/ Schroeder", + "username": "username414", + "twitter_username": "twitter414", + "github_username": "github414", + "user_id": 850, + "website_url": null, + "profile_image": "/uploads/user/profile_image/850/6976f67a-4df7-4ed1-967f-0a3ea0d52670.jpeg", + "profile_image_90": "/uploads/user/profile_image/850/6976f67a-4df7-4ed1-967f-0a3ea0d52670.jpeg" + }, + "children": [] + } + } + } + }, + "404": { + "description": "Comment Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/display_ads": { + "get": { + "summary": "display ads", + "tags": ["display ads"], + "description": "This endpoint allows the client to retrieve a list of all display ads.", + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": [] + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + } + } + }, + "post": { + "summary": "display ads", + "tags": ["display ads"], + "description": "This endpoint allows the client to create a new display ad.", + "parameters": [], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "id": 10, + "approved": true, + "body_markdown": "# Hi, this is ad\nYep, it's an ad", + "cached_tag_list": "", + "clicks_count": 0, + "created_at": "2023-02-27T21:58:05.881+11:00", + "creator_id": null, + "display_to": "all", + "impressions_count": 0, + "name": "Example Ad", + "organization_id": null, + "placement_area": "post_comments", + "processed_html": "Yep, it's an ad
", + "published": true, + "success_rate": 0.0, + "type_of": "in_house", + "updated_at": "2023-02-27T21:58:05.881+11:00", + "tag_list": "" + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "422": { + "description": "unprocessable", + "content": { + "application/json": { + "example": { + "id": null, + "approved": true, + "body_markdown": "# Hi, this is ad\nYep, it's an ad", + "cached_tag_list": null, + "clicks_count": 0, + "created_at": null, + "creator_id": null, + "display_to": "all", + "impressions_count": 0, + "name": "Example Ad", + "organization_id": null, + "placement_area": "moon", + "processed_html": null, + "published": true, + "success_rate": 0.0, + "type_of": "in_house", + "updated_at": null, + "tag_list": null + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "For internal use, helps distinguish ads from one another" + }, + "body_markdown": { + "type": "string", + "description": "The text (in markdown) of the ad (required)" + }, + "approved": { + "type": "boolean", + "description": "Ad must be both published and approved to be in rotation" + }, + "published": { + "type": "boolean", + "description": "Ad must be both published and approved to be in rotation" + }, + "organization_id": { + "type": "integer", + "description": "Identifies the organization to which the ad belongs" + }, + "display_to": { + "type": "string", + "enum": ["all", "logged_in", "logged_out"], + "default": "all", + "description": "Potentially limits visitors to whom the ad is visible" + }, + "type_of": { + "type": "string", + "enum": ["in_house", "community", "external"], + "default": "in_house", + "description": "Types of the billboards:\nin_house (created by admins),\ncommunity (created by an entity, appears on entity's content),\nexternal ( created by an entity, or a non-entity, can appear everywhere)\n" + }, + "placement_area": { + "type": "string", + "enum": [ + "sidebar_left", + "sidebar_left_2", + "sidebar_right", + "post_sidebar", + "post_comments" + ], + "description": "Identifies which area of site layout the ad can appear in" + }, + "tag_list": { + "type": "string", + "description": "Tags on which this ad can be displayed (blank is all/any tags)" + }, + "creator_id": { + "type": "integer", + "description": "Identifies the user who created the ad." + } + }, + "required": ["name", "body_markdown", "placement_area"] + } + } + } + } + } + }, + "/api/display_ads/{id}": { + "get": { + "summary": "display ad", + "tags": ["display ads"], + "description": "This endpoint allows the client to retrieve a single display ad, via its id.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the user to unpublish.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 123 + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "id": 11, + "approved": false, + "body_markdown": "Hello _hey_ Hey hey 9", + "cached_tag_list": "", + "clicks_count": 0, + "created_at": "2023-02-27T21:58:06.000+11:00", + "creator_id": null, + "display_to": "all", + "impressions_count": 0, + "name": "Display Ad 11", + "organization_id": 73, + "placement_area": "sidebar_left", + "processed_html": "Hello hey Hey hey 9
", + "published": false, + "success_rate": 0.0, + "type_of": "in_house", + "updated_at": "2023-02-27T21:58:06.003+11:00", + "tag_list": "" + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "404": { + "description": "Unknown DisplayAd ID", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + }, + "put": { + "summary": "display ads", + "tags": ["display ads"], + "description": "This endpoint allows the client to update the attributes of a single display ad, via its id.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the user to unpublish.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 123 + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "approved": false, + "body_markdown": "Hello _hey_ Hey hey 10", + "creator_id": null, + "display_to": "all", + "name": "Display Ad 12", + "organization_id": 74, + "placement_area": "sidebar_left", + "published": false, + "type_of": "in_house", + "processed_html": "Hello hey Hey hey 10
", + "cached_tag_list": "", + "id": 12, + "clicks_count": 0, + "created_at": "2023-02-27T21:58:06.134+11:00", + "impressions_count": 0, + "success_rate": 0.0, + "updated_at": "2023-02-27T21:58:06.137+11:00", + "tag_list": "" + } + } + } + }, + "404": { + "description": "not found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "For internal use, helps distinguish ads from one another" + }, + "body_markdown": { + "type": "string", + "description": "The text (in markdown) of the ad (required)" + }, + "approved": { + "type": "boolean", + "description": "Ad must be both published and approved to be in rotation" + }, + "published": { + "type": "boolean", + "description": "Ad must be both published and approved to be in rotation" + }, + "organization_id": { + "type": "integer", + "description": "Identifies the organization to which the ad belongs, required for 'community' type ads" + }, + "display_to": { + "type": "string", + "enum": ["all", "logged_in", "logged_out"], + "default": "all", + "description": "Potentially limits visitors to whom the ad is visible" + }, + "placement_area": { + "type": "string", + "enum": [ + "sidebar_left", + "sidebar_left_2", + "sidebar_right", + "post_sidebar", + "post_comments" + ], + "description": "Identifies which area of site layout the ad can appear in" + }, + "tag_list": { + "type": "string", + "description": "Tags on which this ad can be displayed (blank is all/any tags)" + }, + "creator_id": { + "type": "integer", + "description": "Identifies the user who created the ad." + } + }, + "required": ["name", "body_markdown", "placement_area"] + } + } + } + } + } + }, + "/api/display_ads/{id}/unpublish": { + "put": { + "summary": "unpublish", + "tags": ["display ads"], + "description": "This endpoint allows the client to remove a display ad from rotation by un-publishing it.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the user to unpublish.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 123 + } + ], + "responses": { + "204": { + "description": "no content" + }, + "404": { + "description": "not found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + } + } + } + }, + "/api/follows/tags": { + "get": { + "summary": "Followed Tags", + "tags": ["followed_tags", "tags"], + "description": "This endpoint allows the client to retrieve a list of the tags they follow.", + "operationId": "getFollowedTags", + "responses": { + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "200": { + "description": "A List of followed tags", + "content": { + "application/json": { + "example": [ + { + "id": 1220, + "name": "tag3", + "points": 1.0 + }, + { + "id": 1221, + "name": "tag4", + "points": 1.0 + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FollowedTag" + } + } + } + } + } + } + } + }, + "/api/followers/users": { + "get": { + "summary": "Followers", + "tags": ["followers"], + "description": "This endpoint allows the client to retrieve a list of the followers they have.\n \"Followers\" are users that are following other users on the website.\n It supports pagination, each page will contain 80 followers by default.", + "operationId": "getFollowers", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + }, + { + "name": "sort", + "in": "query", + "required": false, + "description": "Default is 'created_at'. Specifies the sort order for the created_at param of the follow\n relationship. To sort by newest followers first (descending order) specify\n ?sort=-created_at.", + "schema": { + "type": "string" + }, + "example": "created_at" + } + ], + "responses": { + "200": { + "description": "A List of followers", + "content": { + "application/json": { + "example": [ + { + "type_of": "user_follower", + "id": 7, + "created_at": "2023-02-27T10:58:06Z", + "user_id": 871, + "name": "Benjamin \"Sol\" \\:/ Senger", + "path": "/username435", + "username": "username435", + "profile_image": "/uploads/user/profile_image/871/51d055b1-32e3-4ccd-878a-a63e0ab5f69b.jpeg" + }, + { + "type_of": "user_follower", + "id": 6, + "created_at": "2023-02-27T10:58:06Z", + "user_id": 869, + "name": "Christin \"Anthony\" \\:/ Metz", + "path": "/username433", + "username": "username433", + "profile_image": "/uploads/user/profile_image/869/8ba1b0fb-ed63-4d36-a21d-11615b8e42d0.jpeg" + } + ], + "schema": { + "type": "array", + "items": { + "description": "A follower", + "type": "object", + "properties": { + "type_of": { + "description": "user_follower by default", + "type": "string" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "user_id": { + "description": "The follower's user id", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "The follower's name", + "type": "string" + }, + "path": { + "description": "A path to the follower's profile", + "type": "string" + }, + "profile_image": { + "description": "Profile image (640x640)", + "type": "string" + } + } + } + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + } + } + } + }, + "/api/organizations/{username}": { + "get": { + "summary": "An organization", + "tags": ["organizations"], + "security": [], + "description": "This endpoint allows the client to retrieve a single organization by their username", + "operationId": "getOrganization", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An Organization", + "content": { + "application/json": { + "example": { + "type_of": "organization", + "id": 79, + "username": "org77", + "name": "Beatty Inc", + "summary": "Stumptown schlitz umami try-hard blog mumblecore. Typewriter 8-bit five dollar toast neutra locavore put a bird on it farm-to-table tilde.", + "twitter_username": "org8840", + "github_username": "org217", + "url": "http://spinka-armstrong.com/hollis", + "location": null, + "tech_stack": null, + "tag_line": null, + "story": null, + "joined_at": "2023-02-27T10:58:06Z", + "profile_image": "/uploads/organization/profile_image/79/a1244f11-60ba-4f71-8c00-4e3f29ddf7f3.png" + }, + "schema": { + "type": "object", + "items": { + "$ref": "#/components/schemas/Organization" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/organizations/{username}/users": { + "get": { + "summary": "Organization's users", + "tags": ["organizations", "users"], + "security": [], + "description": "This endpoint allows the client to retrieve a list of users belonging to the organization\n\nIt supports pagination, each page will contain `30` users by default.", + "operationId": "getOrgUsers", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "200": { + "description": "An Organization's users", + "content": { + "application/json": { + "example": [ + { + "type_of": "user", + "id": 881, + "username": "username445", + "name": "Jeromy \"Spencer\" \\:/ VonRueden", + "twitter_username": "twitter445", + "github_username": "github445", + "summary": null, + "location": null, + "website_url": null, + "joined_at": "Feb 27, 2023", + "profile_image": "/uploads/user/profile_image/881/66c7cfc8-df38-4758-aad0-3d8b6b225a35.jpeg" + }, + { + "type_of": "user", + "id": 882, + "username": "username446", + "name": "Annabel \"Tisa\" \\:/ Rogahn", + "twitter_username": "twitter446", + "github_username": "github446", + "summary": null, + "location": null, + "website_url": null, + "joined_at": "Feb 27, 2023", + "profile_image": "/uploads/user/profile_image/882/9cc02e02-adbb-4735-85bf-5f336714bb18.jpeg" + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/organizations/{username}/articles": { + "get": { + "summary": "Organization's Articles", + "tags": ["organizations", "articles"], + "security": [], + "description": "This endpoint allows the client to retrieve a list of Articles belonging to the organization\n\nIt supports pagination, each page will contain `30` users by default.", + "operationId": "getOrgArticles", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "200": { + "description": "An Organization's Articles", + "content": { + "application/json": { + "example": [ + { + "type_of": "article", + "id": 630, + "title": "Postern of Fate195", + "description": "Tilde master jean shorts farm-to-table yuccie. Poutine freegan semiotics. Cronut tacos post-ironic...", + "readable_publish_date": "Feb 27", + "slug": "postern-of-fate195-51k4", + "path": "/org81/postern-of-fate195-51k4", + "url": "http://localhost:3000/org81/postern-of-fate195-51k4", + "comments_count": 0, + "public_reactions_count": 0, + "collection_id": null, + "published_timestamp": "2023-02-27T10:58:07Z", + "positive_reactions_count": 0, + "cover_image": "http://localhost:3000/assets/12-f9d673ae4ff98002f782ab82c641f2f26673be728e8f5409bea83f2d1de15323.png", + "social_image": "http://localhost:3000/assets/12-f9d673ae4ff98002f782ab82c641f2f26673be728e8f5409bea83f2d1de15323.png", + "canonical_url": "http://localhost:3000/org81/postern-of-fate195-51k4", + "created_at": "2023-02-27T10:58:07Z", + "edited_at": null, + "crossposted_at": null, + "published_at": "2023-02-27T10:58:07Z", + "last_comment_at": "2023-02-27T10:58:07Z", + "reading_time_minutes": 1, + "tag_list": ["javascript", "html", "discuss"], + "tags": "javascript, html, discuss", + "user": { + "name": "Rowena \"Zack\" \\:/ Howell", + "username": "username453", + "twitter_username": "twitter453", + "github_username": "github453", + "user_id": 889, + "website_url": null, + "profile_image": "/uploads/user/profile_image/889/9d1a2834-1117-4f0d-9e87-aa4f3d3dc525.jpeg", + "profile_image_90": "/uploads/user/profile_image/889/9d1a2834-1117-4f0d-9e87-aa4f3d3dc525.jpeg" + }, + "organization": { + "name": "Schaden-Fritsch", + "username": "org81", + "slug": "org81", + "profile_image": "/uploads/organization/profile_image/83/8d2996b4-f9fb-4947-aea3-17898ab9d7ec.png", + "profile_image_90": "/uploads/organization/profile_image/83/8d2996b4-f9fb-4947-aea3-17898ab9d7ec.png" + } + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/pages": { + "get": { + "summary": "show details for all pages", + "security": [], + "tags": ["pages"], + "description": "This endpoint allows the client to retrieve details for all Page objects.", + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": [ + { + "id": 1, + "title": "This Side of Paradise", + "slug": "push_premium", + "description": "Voluptas ut laboriosam neque.", + "is_top_level_path": false, + "landing_page": false, + "body_html": null, + "body_json": null, + "body_markdown": "Velit autem nisi distinctio.", + "processed_html": "Velit autem nisi distinctio.
\n\n", + "social_image": { + "url": null + }, + "template": "contained" + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Page" + } + } + } + } + } + } + }, + "post": { + "summary": "pages", + "tags": ["pages"], + "description": "This endpoint allows the client to create a new page.", + "parameters": [], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "id": 3, + "title": "Example Page", + "slug": "example1", + "description": "a new page", + "is_top_level_path": false, + "landing_page": false, + "body_html": null, + "body_json": null, + "body_markdown": "# Hi, this is a New Page\nYep, it's an a new page", + "processed_html": "Yep, it's an a new page
\n\n", + "social_image": { + "url": null + }, + "template": "contained" + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "422": { + "description": "unprocessable", + "content": { + "application/json": { + "example": { + "id": null, + "title": "Example Page", + "slug": "example1", + "description": "a new page", + "is_top_level_path": false, + "landing_page": false, + "body_html": null, + "body_json": null, + "body_markdown": "# Hi, this is a New Page\nYep, it's an a new page", + "processed_html": null, + "social_image": { + "url": null + }, + "template": "moon" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page" + }, + "slug": { + "type": "string", + "description": "Used to link to this page in URLs, must be unique and URL-safe" + }, + "description": { + "type": "string", + "description": "For internal use, helps similar pages from one another" + }, + "body_markdown": { + "type": "string", + "description": "The text (in markdown) of the ad (required)" + }, + "body_json": { + "type": "string", + "description": "For JSON pages, the JSON body" + }, + "is_top_level_path": { + "type": "boolean", + "description": "If true, the page is available at '/{slug}' instead of '/page/{slug}', use with caution" + }, + "template": { + "type": "string", + "enum": [ + "contained", + "full_within_layout", + "nav_bar_included", + "json" + ], + "default": "contained", + "description": "Controls what kind of layout the page is rendered in" + } + } + } + } + } + } + } + }, + "/api/pages/{id}": { + "get": { + "summary": "show details for a page", + "security": [], + "tags": ["pages"], + "description": "This endpoint allows the client to retrieve details for a single Page object, specified by ID.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the page.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 1 + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "id": 6, + "title": "In a Glass Darkly", + "slug": "satisfaction-scale", + "description": "Voluptatibus quod dolor dolores.", + "is_top_level_path": false, + "landing_page": false, + "body_html": null, + "body_json": null, + "body_markdown": "Amet rerum nostrum earum.", + "processed_html": "Amet rerum nostrum earum.
\n\n", + "social_image": { + "url": null + }, + "template": "contained" + }, + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + } + } + }, + "put": { + "summary": "update details for a page", + "tags": ["pages"], + "description": "This endpoint allows the client to retrieve details for a single Page object, specified by ID.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the page.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 1 + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "id": 7, + "title": "New Title", + "slug": "corn-premium", + "description": "Ut reiciendis qui iste.", + "is_top_level_path": false, + "landing_page": false, + "body_html": null, + "body_json": null, + "body_markdown": "Qui sed sit dolorem.", + "processed_html": "Qui sed sit dolorem.
\n\n", + "social_image": { + "url": null + }, + "template": "contained" + }, + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "422": { + "description": "unprocessable", + "content": { + "application/json": { + "example": { + "id": 9, + "title": "Dying of the Light", + "slug": "seller_arena", + "description": "Sapiente rerum labore est.", + "is_top_level_path": false, + "landing_page": false, + "body_html": null, + "body_json": null, + "body_markdown": "Dolorum earum quod deleniti.", + "processed_html": "Voluptas illo dolorem nisi.
\n\n", + "social_image": { + "url": null + }, + "template": "moon" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + } + }, + "delete": { + "summary": "remove a page", + "tags": ["pages"], + "description": "This endpoint allows the client to delete a single Page object, specified by ID.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the page.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 1 + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "id": 10, + "title": "The Green Bay Tree", + "slug": "message-premium", + "description": "Est molestias eius voluptas.", + "is_top_level_path": false, + "landing_page": false, + "body_html": null, + "body_json": null, + "body_markdown": "In soluta qui odio.", + "processed_html": "In soluta qui odio.
\n\n", + "social_image": { + "url": null + }, + "template": "contained" + }, + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "422": { + "description": "unprocessable", + "content": { + "application/json": { + "example": { + "doubled_module": { + "const_name": "Page", + "object": "Page" + }, + "__expired": false, + "name": null, + "__sending_message": null + } + } + } + } + } + } + }, + "/api/podcast_episodes": { + "get": { + "summary": "Podcast Episodes", + "security": [], + "tags": ["podcast_episodes"], + "description": "This endpoint allows the client to retrieve a list of podcast episodes.\n \"Podcast episodes\" are episodes belonging to podcasts.\n It will only return active (reachable) podcast episodes that belong to published podcasts available on the platform, ordered by descending publication date.\n It supports pagination, each page will contain 30 articles by default.", + "operationId": "getPodcastEpisodes", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + }, + { + "name": "username", + "in": "query", + "required": false, + "description": "Using this parameter will retrieve episodes belonging to a specific podcast.", + "schema": { + "type": "string" + }, + "example": "codenewbie" + } + ], + "responses": { + "200": { + "description": "A List of Podcast episodes filtered by username", + "content": { + "application/json": { + "example": [ + { + "type_of": "podcast_episodes", + "class_name": "PodcastEpisode", + "id": 4, + "path": "/codenewbie/slug-4", + "title": "20", + "image_url": "/uploads/podcast/image/4/5e637d0a-0446-47a1-a77c-09dd5adaa4b6.jpeg", + "podcast": { + "title": "Delirium Tremens", + "slug": "codenewbie", + "image_url": "/uploads/podcast/image/4/5e637d0a-0446-47a1-a77c-09dd5adaa4b6.jpeg" + } + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PodcastEpisodeIndex" + } + } + } + } + }, + "404": { + "description": "Unknown Podcast username", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/profile_images/{username}": { + "get": { + "summary": "A Users or organizations profile image", + "tags": ["profile images"], + "description": "This endpoint allows the client to retrieve a user or organization profile image information by its\n corresponding username.", + "operationId": "getProfileImage", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "description": "The parameter is the username of the user or the username of the organization.", + "schema": { + "type": "string" + }, + "example": "janedoe" + } + ], + "responses": { + "200": { + "description": "An object containing profile image details", + "content": { + "application/json": { + "example": { + "type_of": "profile_image", + "image_of": "user", + "profile_image": "/uploads/user/profile_image/904/b992f4eb-7fca-49a1-b292-d3f9b013d81c.jpeg", + "profile_image_90": "/uploads/user/profile_image/904/b992f4eb-7fca-49a1-b292-d3f9b013d81c.jpeg" + }, + "schema": { + "type": "object", + "items": { + "$ref": "#/components/schemas/ProfileImage" + } + } + } + } + }, + "404": { + "description": "Resource Not Found", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/reactions/toggle": { + "post": { + "summary": "toggle reaction", + "tags": ["reactions"], + "description": "This endpoint allows the client to toggle the user's reaction to a specified reactable (eg, Article, Comment, or User). For examples:\n * \"Like\"ing an Article will create a new \"like\" Reaction from the user for that Articles\n * \"Like\"ing that Article a second time will remove the \"like\" from the user", + "parameters": [ + { + "name": "category", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "like", + "unicorn", + "exploding_head", + "raised_hands", + "fire" + ] + } + }, + { + "name": "reactable_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "reactable_type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": ["Comment", "Article", "User"] + } + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "result": "create", + "category": "like", + "id": 9, + "reactable_id": 632, + "reactable_type": "Article" + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + } + } + } + }, + "/api/reactions": { + "post": { + "summary": "create reaction", + "tags": ["reactions"], + "description": "This endpoint allows the client to create a reaction to a specified reactable (eg, Article, Comment, or User). For examples:\n * \"Like\"ing an Article will create a new \"like\" Reaction from the user for that Articles\n * \"Like\"ing that Article a second time will return the previous \"like\"", + "parameters": [ + { + "name": "category", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "like", + "unicorn", + "exploding_head", + "raised_hands", + "fire" + ] + } + }, + { + "name": "reactable_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "reactable_type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": ["Comment", "Article", "User"] + } + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "result": "none", + "category": "like", + "id": 11, + "reactable_id": 634, + "reactable_type": "Article" + } + } + } + }, + "401": { + "description": "unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + } + } + } + }, + "/api/readinglist": { + "get": { + "summary": "Readinglist", + "tags": ["readinglist"], + "description": "This endpoint allows the client to retrieve a list of articles that were saved to a Users readinglist.\n It supports pagination, each page will contain `30` articles by default", + "operationId": "getReadinglist", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam30to1000" + } + ], + "responses": { + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "200": { + "description": "A list of articles in the users readinglist", + "content": { + "application/json": { + "example": [], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArticleIndex" + } + } + } + } + } + } + } + }, + "/api/tags": { + "get": { + "summary": "Tags", + "tags": ["tags"], + "security": [], + "description": "This endpoint allows the client to retrieve a list of tags that can be used to tag articles.\n\nIt will return tags ordered by popularity.\n\nIt supports pagination, each page will contain 10 tags by default.", + "operationId": "getTags", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam10to1000" + } + ], + "responses": { + "200": { + "description": "A List of all tags", + "content": { + "application/json": { + "example": [ + { + "id": 1254, + "name": "tag7", + "bg_color_hex": null, + "text_color_hex": null + }, + { + "id": 1253, + "name": "tag6", + "bg_color_hex": null, + "text_color_hex": null + }, + { + "id": 1252, + "name": "tag5", + "bg_color_hex": null, + "text_color_hex": null + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + } + } + } + } + }, + "/api/users/me": { + "get": { + "summary": "The authenticated user", + "tags": ["users"], + "description": "This endpoint allows the client to retrieve information about the authenticated user", + "operationId": "getUserMe", + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "example": { + "type_of": "user", + "id": 916, + "username": "username480", + "name": "Dennis \"Rodger\" \\:/ Gorczany", + "twitter_username": "twitter480", + "github_username": "github480", + "summary": null, + "location": null, + "website_url": null, + "joined_at": "Feb 27, 2023", + "profile_image": "/uploads/user/profile_image/916/fc0d6dd7-6dee-4df6-9720-ac6618f19fd5.jpeg" + }, + "schema": { + "type": "object", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + } + } + } + }, + "/api/users/{id}": { + "get": { + "summary": "A User", + "tags": ["users"], + "description": "This endpoint allows the client to retrieve a single user, either by id\nor by the user's username.\n\nFor complete documentation, see the v0 API docs: https://developers.forem.com/api/v0#tag/users/operation/getUser", + "operationId": "getUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + }, + "/api/users/{id}/unpublish": { + "put": { + "summary": "Unpublish a User's Articles and Comments", + "tags": ["users"], + "description": "This endpoint allows the client to unpublish all of the articles and\ncomments created by a user.\n\nThe user associated with the API key must have any 'admin' or 'moderator' role.\n\nThis specified user's articles and comments will be unpublished and will no longer be\nvisible to the public. They will remain in the database and will set back to draft status\non the specified user's dashboard. Any notifications associated with the specified user's\narticles and comments will be deleted.\n\nNote this endpoint unpublishes articles and comments asychronously: it will return a 204 NO CONTENT\nstatus code immediately, but the articles and comments will not be unpublished until the\nrequest is completed on the server.", + "operationId": "unpublishUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the user to unpublish.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 1 + } + ], + "responses": { + "204": { + "description": "User's articles and comments successfully unpublished" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "404": { + "description": "Unknown User ID (still accepted for async processing)", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/users/{id}/suspend": { + "put": { + "summary": "Suspend a User", + "tags": ["users"], + "description": "This endpoint allows the client to suspend a user.\n\nThe user associated with the API key must have any 'admin' or 'moderator' role.\n\nThis specified user will be assigned the 'suspended' role. Suspending a user will stop the\nuser from posting new posts and comments. It doesn't delete any of the user's content, just\nprevents them from creating new content while suspended. Users are not notified of their suspension\nin the UI, so if you want them to know about this, you must notify them.", + "operationId": "suspendUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the user to suspend.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "example": 1 + } + ], + "responses": { + "204": { + "description": "User successfully unpublished" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "404": { + "description": "Unknown User ID", + "content": { + "application/json": { + "example": { + "error": "not found", + "status": 404 + } + } + } + } + } + } + }, + "/api/admin/users": { + "post": { + "summary": "Invite a User", + "tags": ["users"], + "description": "This endpoint allows the client to trigger an invitation to the provided email address.\n\n It requires a token from a user with `super_admin` privileges.", + "operationId": "postAdminUsersCreate", + "parameters": [], + "responses": { + "200": { + "description": "Successful" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "error": "unauthorized", + "status": 401 + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "example": { + "error": "param is missing or the value is empty: email", + "status": 422 + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInviteParam" + } + } + } + } + } + }, + "/api/videos": { + "get": { + "summary": "Articles with a video", + "tags": ["videos", "articles"], + "security": [], + "description": "This endpoint allows the client to retrieve a list of articles that are uploaded with a video.\n\nIt will only return published video articles ordered by descending popularity.\n\nIt supports pagination, each page will contain 24 articles by default.", + "operationId": "videos", + "parameters": [ + { + "$ref": "#/components/parameters/pageParam" + }, + { + "$ref": "#/components/parameters/perPageParam24to1000" + } + ], + "responses": { + "200": { + "description": "A List of all articles with videos", + "content": { + "application/json": { + "example": [ + { + "type_of": "video_article", + "id": 636, + "path": "/username499/i-know-why-the-caged-bird-sings201-4ncl", + "cloudinary_video_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/thumbs-video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f-00001.png", + "title": "I Know Why the Caged Bird Sings201", + "user_id": 936, + "video_duration_in_minutes": "00:00", + "video_source_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f.m3u8", + "user": { + "name": "Kenneth \"Ardelia\" \\:/ Luettgen" + } + }, + { + "type_of": "video_article", + "id": 637, + "path": "/username500/as-i-lay-dying202-1ba2", + "cloudinary_video_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/thumbs-video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f-00001.png", + "title": "As I Lay Dying202", + "user_id": 937, + "video_duration_in_minutes": "00:00", + "video_source_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f.m3u8", + "user": { + "name": "Fleta \"Alleen\" \\:/ Jerde" + } + } + ], + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VideoArticle" + } + } + } + } + } + } + } + } + }, + "servers": [ + { + "url": "https://dev.to/api", + "description": "Production server" + } + ], + "security": [ + { + "api-key": [] + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "name": "api-key", + "in": "header", + "description": "API Key authentication.\n\nAuthentication for some endpoints, like write operations on the\nArticles API require a DEV API key.\n\nAll authenticated endpoints are CORS disabled, the API key is intended for non-browser scripts.\n\n### Getting an API key\n\nTo obtain one, please follow these steps:\n\n - visit https://dev.to/settings/extensions\n - in the \"DEV API Keys\" section create a new key by adding a\n description and clicking on \"Generate API Key\"\n\n \n\n - You'll see the newly generated key in the same view\n " + } + }, + "parameters": { + "pageParam": { + "in": "query", + "name": "page", + "required": false, + "description": "Pagination page", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1 + } + }, + "perPageParam10to1000": { + "in": "query", + "name": "per_page", + "required": false, + "description": "Page size (the number of items to return per page). The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment variable.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 1000, + "default": 10 + } + }, + "perPageParam24to1000": { + "in": "query", + "name": "per_page", + "required": false, + "description": "Page size (the number of items to return per page). The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment variable.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 1000, + "default": 24 + } + }, + "perPageParam30to1000": { + "in": "query", + "name": "per_page", + "required": false, + "description": "Page size (the number of items to return per page). The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment variable.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 1000, + "default": 30 + } + }, + "perPageParam30to100": { + "in": "query", + "name": "per_page", + "required": false, + "description": "Page size (the number of items to return per page). The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment variable.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100, + "default": 30 + } + }, + "perPageParam80to1000": { + "in": "query", + "name": "per_page", + "required": false, + "description": "Page size (the number of items to return per page). The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment variable.", + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 1000, + "default": 80 + } + }, + "listingCategoryParam": { + "name": "category", + "in": "query", + "description": "Using this parameter will return listings belonging to the\n requested category.", + "schema": { + "type": "string" + }, + "example": "cfp" + } + }, + "schemas": { + "ArticleFlareTag": { + "description": "Flare tag of the article", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "bg_color_hex": { + "description": "Background color (hexadecimal)", + "type": "string", + "nullable": true + }, + "text_color_hex": { + "description": "Text color (hexadecimal)", + "type": "string", + "nullable": true + } + } + }, + "ArticleIndex": { + "description": "Representation of an article or post returned in a list", + "type": "object", + "properties": { + "type_of": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "cover_image": { + "type": "string", + "format": "url", + "nullable": true + }, + "readable_publish_date": { + "type": "string" + }, + "social_image": { + "type": "string", + "format": "url" + }, + "tag_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "path": { + "type": "string", + "format": "path" + }, + "url": { + "type": "string", + "format": "url" + }, + "canonical_url": { + "type": "string", + "format": "url" + }, + "positive_reactions_count": { + "type": "integer", + "format": "int32" + }, + "public_reactions_count": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "crossposted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "published_at": { + "type": "string", + "format": "date-time" + }, + "last_comment_at": { + "type": "string", + "format": "date-time" + }, + "published_timestamp": { + "description": "Crossposting or published date time", + "type": "string", + "format": "date-time" + }, + "reading_time_minutes": { + "description": "Reading time, in minutes", + "type": "integer", + "format": "int32" + }, + "user": { + "$ref": "#/components/schemas/SharedUser" + }, + "flare_tag": { + "$ref": "#/components/schemas/ArticleFlareTag" + }, + "organization": { + "$ref": "#/components/schemas/SharedOrganization" + } + }, + "required": [ + "type_of", + "id", + "title", + "description", + "cover_image", + "readable_publish_date", + "social_image", + "tag_list", + "tags", + "slug", + "path", + "url", + "canonical_url", + "comments_count", + "positive_reactions_count", + "public_reactions_count", + "created_at", + "edited_at", + "crossposted_at", + "published_at", + "last_comment_at", + "published_timestamp", + "user", + "reading_time_minutes" + ] + }, + "VideoArticle": { + "description": "Representation of an Article with video", + "type": "object", + "properties": { + "type_of": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "path": { + "type": "string" + }, + "cloudinary_video_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "user_id": { + "type": "integer", + "format": "int64" + }, + "video_duration_in_minutes": { + "type": "string" + }, + "video_source_url": { + "type": "string" + }, + "user": { + "description": "Author of the article", + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + } + }, + "Article": { + "description": "Representation of an Article to be created/updated", + "type": "object", + "properties": { + "article": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "body_markdown": { + "type": "string" + }, + "published": { + "type": "boolean", + "default": false + }, + "series": { + "type": "string", + "nullable": true + }, + "main_image": { + "type": "string", + "nullable": true + }, + "canonical_url": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string" + }, + "tags": { + "type": "string" + }, + "organization_id": { + "type": "integer", + "nullable": true + } + } + } + } + }, + "Organization": { + "description": "Representation of an Organization", + "type": "object", + "properties": { + "type_of": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "twitter_username": { + "type": "string" + }, + "github_username": { + "type": "string" + }, + "url": { + "type": "string" + }, + "location": { + "type": "string" + }, + "joined_at": { + "type": "string" + }, + "tech_stack": { + "type": "string" + }, + "tag_line": { + "type": "string", + "nullable": true + }, + "story": { + "type": "string", + "nullable": true + } + } + }, + "FollowedTag": { + "description": "Representation of a followed tag", + "type": "object", + "properties": { + "id": { + "description": "Tag id", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "points": { + "type": "number", + "format": "float" + } + }, + "required": ["id", "name", "points"] + }, + "Tag": { + "description": "Representation of a tag", + "type": "object", + "properties": { + "id": { + "description": "Tag id", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "bg_color_hex": { + "type": "string", + "nullable": true + }, + "text_color_hex": { + "type": "string", + "nullable": true + } + } + }, + "Page": { + "description": "Representation of a page object", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page" + }, + "slug": { + "type": "string", + "description": "Used to link to this page in URLs, must be unique and URL-safe" + }, + "description": { + "type": "string", + "description": "For internal use, helps similar pages from one another" + }, + "body_markdown": { + "type": "string", + "description": "The text (in markdown) of the ad (required)", + "nullable": true + }, + "body_json": { + "type": "string", + "description": "For JSON pages, the JSON body", + "nullable": true + }, + "is_top_level_path": { + "type": "boolean", + "description": "If true, the page is available at '/{slug}' instead of '/page/{slug}', use with caution" + }, + "social_image": { + "type": "object", + "nullable": true + }, + "template": { + "type": "string", + "enum": [ + "contained", + "full_within_layout", + "nav_bar_included", + "json" + ], + "default": "contained", + "description": "Controls what kind of layout the page is rendered in" + } + }, + "required": ["title", "slug", "description", "template"] + }, + "PodcastEpisodeIndex": { + "description": "Representation of a podcast episode returned in a list", + "type": "object", + "properties": { + "type_of": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "class_name": { + "type": "string" + }, + "path": { + "type": "string", + "format": "path" + }, + "title": { + "type": "string" + }, + "image_url": { + "description": "Podcast episode image url or podcast image url", + "type": "string", + "format": "url" + }, + "podcast": { + "$ref": "#/components/schemas/SharedPodcast" + } + }, + "required": [ + "type_of", + "class_name", + "id", + "path", + "title", + "image_url", + "podcast" + ] + }, + "ProfileImage": { + "description": "A profile image object", + "type": "object", + "properties": { + "type_of": { + "description": "Return profile_image", + "type": "string" + }, + "image_of": { + "description": "Determines the type of the profile image owner (user or organization)", + "type": "string" + }, + "profile_image": { + "description": "Profile image (640x640)", + "type": "string" + }, + "profile_image_90": { + "description": "Profile image (90x90)", + "type": "string" + } + } + }, + "SharedUser": { + "description": "The resource creator", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "twitter_username": { + "type": "string", + "nullable": true + }, + "github_username": { + "type": "string", + "nullable": true + }, + "website_url": { + "type": "string", + "format": "url", + "nullable": true + }, + "profile_image": { + "description": "Profile image (640x640)", + "type": "string" + }, + "profile_image_90": { + "description": "Profile image (90x90)", + "type": "string" + } + } + }, + "SharedOrganization": { + "description": "The organization the resource belongs to", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "profile_image": { + "description": "Profile image (640x640)", + "type": "string", + "format": "url" + }, + "profile_image_90": { + "description": "Profile image (90x90)", + "type": "string", + "format": "url" + } + } + }, + "User": { + "description": "The representation of a user", + "type": "object", + "properties": { + "type_of": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "summary": { + "type": "string", + "nullable": true + }, + "twitter_username": { + "type": "string" + }, + "github_username": { + "type": "string" + }, + "website_url": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "joined_at": { + "type": "string" + }, + "profile_image": { + "type": "string" + } + } + }, + "SharedPodcast": { + "description": "The podcast that the resource belongs to", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "image_url": { + "description": "Podcast image url", + "type": "string", + "format": "url" + } + } + }, + "Comment": { + "description": "A Comment on an Article or Podcast Episode", + "type": "object", + "properties": { + "type_of": { + "type": "string" + }, + "id_code": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "image_url": { + "description": "Podcast image url", + "type": "string", + "format": "url" + } + } + }, + "UserInviteParam": { + "description": "User invite parameters", + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string", + "nullable": true + } + } + } + } + } +} diff --git a/package.json b/package.json index 05aadd2..9c86057 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", "astro": "^2.1.6", + "powered-by-vercel": "^1.1.0", "react": "^18.0.0", "react-dom": "^18.0.0", "tailwindcss": "^3.0.24" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f03cc9..aa0f35f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,7 @@ specifiers: '@types/react': ^18.0.21 '@types/react-dom': ^18.0.6 astro: ^2.1.6 + powered-by-vercel: ^1.1.0 prettier: ^2.8.4 prettier-plugin-astro: ^0.8.0 prettier-plugin-organize-imports: ^3.2.2 @@ -42,6 +43,7 @@ dependencies: '@types/react': 18.0.28 '@types/react-dom': 18.0.11 astro: 2.1.6 + powered-by-vercel: 1.1.0_react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 tailwindcss: 3.2.7 @@ -3313,6 +3315,15 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /powered-by-vercel/1.1.0_react@18.2.0: + resolution: {integrity: sha512-j6Xib6yNtbUKJEEVCPg1D/Pq4cTiisusLo49oJ6TKjK3TVF1ouN5TwfziabGrF1Hx6HcndolqTKpyOgIa6jeEQ==} + engines: {node: '>=10'} + peerDependencies: + react: ^16.14.0 || ^17.0.0 + dependencies: + react: 18.2.0 + dev: false + /preferred-pm/3.0.3: resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} engines: {node: '>=10'} diff --git a/src/components/FormattedDate.astro b/src/components/FormattedDate.astro index 8f7535b..67cdf6a 100644 --- a/src/components/FormattedDate.astro +++ b/src/components/FormattedDate.astro @@ -3,11 +3,11 @@ const { date } = Astro.props; ---