From df0b134ec4e1780faa646bdad64063e387b6a4df Mon Sep 17 00:00:00 2001 From: Anna Buianova Date: Wed, 22 Nov 2023 23:22:06 +0300 Subject: [PATCH] Added followers count to /api/users/me endpoint (#20378) * Added followers_count to /api/users/me * Updated the api user docs * Rubocop fixes fro swagger_helper * Added me jbuilder view for api/v0 --- .../concerns/api/users_controller.rb | 4 +- app/views/api/v0/users/me.json.jbuilder | 1 + app/views/api/v1/users/me.json.jbuilder | 2 + spec/requests/api/v1/docs/users_spec.rb | 4 +- spec/requests/api/v1/users_spec.rb | 10 +- spec/swagger_helper.rb | 45 +- swagger/v1/api_v1.json | 1243 +++++++++++------ 7 files changed, 867 insertions(+), 442 deletions(-) create mode 100644 app/views/api/v0/users/me.json.jbuilder create mode 100644 app/views/api/v1/users/me.json.jbuilder diff --git a/app/controllers/concerns/api/users_controller.rb b/app/controllers/concerns/api/users_controller.rb index 71149986b..0725e460c 100644 --- a/app/controllers/concerns/api/users_controller.rb +++ b/app/controllers/concerns/api/users_controller.rb @@ -19,9 +19,7 @@ module Api not_found unless @user.registered end - def me - render :show - end + def me; end def unpublish authorize(@user, :unpublish_all_articles?) diff --git a/app/views/api/v0/users/me.json.jbuilder b/app/views/api/v0/users/me.json.jbuilder new file mode 100644 index 000000000..76f8211b0 --- /dev/null +++ b/app/views/api/v0/users/me.json.jbuilder @@ -0,0 +1 @@ +json.partial! "api/v0/shared/user_show", user: @user diff --git a/app/views/api/v1/users/me.json.jbuilder b/app/views/api/v1/users/me.json.jbuilder new file mode 100644 index 000000000..760073970 --- /dev/null +++ b/app/views/api/v1/users/me.json.jbuilder @@ -0,0 +1,2 @@ +json.partial! "api/v1/shared/user_show_extended", user: @user +json.followers_count @user.followers_count diff --git a/spec/requests/api/v1/docs/users_spec.rb b/spec/requests/api/v1/docs/users_spec.rb index e4836b29b..0a8d4341b 100644 --- a/spec/requests/api/v1/docs/users_spec.rb +++ b/spec/requests/api/v1/docs/users_spec.rb @@ -28,7 +28,7 @@ RSpec.describe "Api::V1::Docs::Users" do response 200, "successful" do let(:"api-key") { api_secret.secret } schema type: :object, - items: { "$ref": "#/components/schemas/User" } + items: { "$ref": "#/components/schemas/MyUser" } add_examples run_test! end @@ -58,7 +58,7 @@ For complete documentation, see the v0 API docs: https://developers.forem.com/ap let(:"api-key") { api_secret.secret } let(:id) { user.id } schema type: :object, - items: { "$ref": "#/components/schemas/User" } + items: { "$ref": "#/components/schemas/ExtendedUser" } run_test! end diff --git a/spec/requests/api/v1/users_spec.rb b/spec/requests/api/v1/users_spec.rb index 871ff8f90..94810d09e 100644 --- a/spec/requests/api/v1/users_spec.rb +++ b/spec/requests/api/v1/users_spec.rb @@ -60,6 +60,7 @@ RSpec.describe "Api::V1::Users" do expect(response_user["joined_at"]).to eq(user.created_at.strftime("%b %e, %Y")) expect(response_user["profile_image"]).to eq(user.profile_image_url_for(length: 320)) expect(response_user["badge_ids"]).to eq(user.badge_ids) + expect(response_user.key?("followers_count")).to be false end it "includes email if display_email_on_profile is set to true" do @@ -109,7 +110,6 @@ RSpec.describe "Api::V1::Users" do get me_api_users_path, headers: auth_headers expect(response).to have_http_status(:ok) - response_user = response.parsed_body expect(response_user["type_of"]).to eq("user") @@ -126,6 +126,7 @@ RSpec.describe "Api::V1::Users" do expect(response_user["profile_image"]).to eq(user.profile_image_url_for(length: 320)) expect(response_user["badge_ids"]).to eq(user.badge_ids) + expect(response_user["followers_count"]).to eq(user.followers_count) end it "returns 200 if no authentication and the Forem instance is set to private but user is authenticated" do @@ -147,6 +148,13 @@ RSpec.describe "Api::V1::Users" do expect(response_user["joined_at"]).to eq(user.created_at.strftime("%b %e, %Y")) expect(response_user["profile_image"]).to eq(user.profile_image_url_for(length: 320)) end + + it "returns followers_count" do + create(:follow, followable: user) + get me_api_users_path, headers: auth_headers + response_user = response.parsed_body + expect(response_user["followers_count"]).to eq(1) + end end end diff --git a/spec/swagger_helper.rb b/spec/swagger_helper.rb index 36e96d7c2..ad986333b 100644 --- a/spec/swagger_helper.rb +++ b/spec/swagger_helper.rb @@ -355,7 +355,7 @@ The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment } }, User: { - description: "The representation of a user", + description: "The representation of a user returned in a list", type: :object, properties: { type_of: { type: :string }, @@ -371,6 +371,49 @@ The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment profile_image: { type: :string } } }, + ExtendedUser: { + 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 }, + email: { type: :string, nullable: true, description: "Email (if user allows displaying email on their profile) or nil" }, + website_url: { type: :string, nullable: true }, + location: { type: :string, nullable: true }, + joined_at: { type: :string }, + profile_image: { type: :string }, + badge_ids: { type: :array, + items: { type: :integer }, + description: "ids of the badges awarded to the user" } + } + }, + MyUser: { + description: "The representation of a user when accessed by themselves", + 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 }, + email: { type: :string, nullable: true, description: "Email (if user allows displaying email on their profile) or nil" }, + website_url: { type: :string, nullable: true }, + location: { type: :string, nullable: true }, + joined_at: { type: :string }, + profile_image: { type: :string }, + badge_ids: { type: :array, + items: { type: :integer }, + description: "ids of the badges awarded to the user" }, + followers_count: { type: :integer } + } + }, SharedPodcast: { description: "The podcast that the resource belongs to", type: :object, diff --git a/swagger/v1/api_v1.json b/swagger/v1/api_v1.json index 538d463af..ca01a58f7 100644 --- a/swagger/v1/api_v1.json +++ b/swagger/v1/api_v1.json @@ -9,10 +9,14 @@ "/api/articles": { "post": { "summary": "Publish article", - "tags": ["articles"], + "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": [], + "parameters": [ + + ], "responses": { "201": { "description": "An Article", @@ -20,40 +24,42 @@ "application/json": { "example": { "type_of": "article", - "id": 40, + "id": 90, "title": "New article", "description": "New post example", - "readable_publish_date": "Nov 15", - "slug": "new-article-527e", - "path": "/username2/new-article-527e", - "url": "http://forem.test/username2/new-article-527e", + "readable_publish_date": "Nov 21", + "slug": "new-article-55cj", + "path": "/username2/new-article-55cj", + "url": "http://forem.test/username2/new-article-55cj", "comments_count": 0, "public_reactions_count": 0, "collection_id": 1, - "published_timestamp": "2023-11-14T21:35:02Z", + "published_timestamp": "2023-11-21T12:30:23Z", "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-11-14T21:35:02Z", + "created_at": "2023-11-21T12:30:23Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:02Z", - "last_comment_at": "2023-11-14T21:35:02Z", + "published_at": "2023-11-21T12:30:23Z", + "last_comment_at": "2023-11-21T12:30:23Z", "reading_time_minutes": 1, "tag_list": "", - "tags": [], + "tags": [ + + ], "body_html": "

New body for the article

\n\n", "body_markdown": "**New** body for the article", "user": { - "name": "Virginia \"Tandy\" \\:/ Bashirian", + "name": "Artie \"Lashaunda\" \\:/ Gerlach", "username": "username2", "twitter_username": "twitter2", "github_username": "github2", - "user_id": 68, + "user_id": 112, "website_url": null, - "profile_image": "/uploads/user/profile_image/68/56b7300a-b96c-4c3b-8d01-e2cb9f5c2f39.jpeg", - "profile_image_90": "/uploads/user/profile_image/68/56b7300a-b96c-4c3b-8d01-e2cb9f5c2f39.jpeg" + "profile_image": "/uploads/user/profile_image/112/43d753b8-a005-4ec3-ab6d-6e24964d1762.jpeg", + "profile_image_90": "/uploads/user/profile_image/112/43d753b8-a005-4ec3-ab6d-6e24964d1762.jpeg" } } } @@ -94,8 +100,12 @@ }, "get": { "summary": "Published articles", - "security": [], - "tags": ["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": [ @@ -152,7 +162,11 @@ "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"] + "enum": [ + "fresh", + "rising", + "all" + ] }, "example": "fresh" }, @@ -188,45 +202,47 @@ "example": [ { "type_of": "article", - "id": 43, - "title": "Little Hands Clapping4", - "description": "Yolo literally wolf street sartorial truffaut cardigan. Master thundercats paleo echo. Try-hard...", - "readable_publish_date": "Nov 15", - "slug": "little-hands-clapping4-45ng", - "path": "/username6/little-hands-clapping4-45ng", - "url": "http://forem.test/username6/little-hands-clapping4-45ng", + "id": 93, + "title": "An Acceptable Time4", + "description": "Tumblr cardigan next level. Craft beer vegan mumblecore. Deep v keffiyeh fixie kogi aesthetic. Banh...", + "readable_publish_date": "Nov 21", + "slug": "an-acceptable-time4-30po", + "path": "/username6/an-acceptable-time4-30po", + "url": "http://forem.test/username6/an-acceptable-time4-30po", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:02Z", + "published_timestamp": "2023-11-21T12:30:24Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/35-e1a9bc0c17136eb3109018d3367724e1385b6989b95c35e7255cb3f0f002fcf5.png", - "social_image": "http://forem.test/assets/35-e1a9bc0c17136eb3109018d3367724e1385b6989b95c35e7255cb3f0f002fcf5.png", - "canonical_url": "http://forem.test/username6/little-hands-clapping4-45ng", - "created_at": "2023-11-14T21:35:02Z", + "cover_image": "http://forem.test/assets/37-94b286825ffd9f2b47c9842cf4f262b7c89e789797eba40196bc14b5c2359e75.png", + "social_image": "http://forem.test/assets/37-94b286825ffd9f2b47c9842cf4f262b7c89e789797eba40196bc14b5c2359e75.png", + "canonical_url": "http://forem.test/username6/an-acceptable-time4-30po", + "created_at": "2023-11-21T12:30:24Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:02Z", - "last_comment_at": "2023-11-14T21:35:02Z", + "published_at": "2023-11-21T12:30:24Z", + "last_comment_at": "2023-11-21T12:30:24Z", "reading_time_minutes": 1, - "tag_list": ["discuss"], + "tag_list": [ + "discuss" + ], "tags": "discuss", "user": { - "name": "Carol \"Bernie\" \\:/ Sauer", + "name": "Raphael \"Mireya\" \\:/ Huels", "username": "username6", "twitter_username": "twitter6", "github_username": "github6", - "user_id": 72, + "user_id": 116, "website_url": null, - "profile_image": "/uploads/user/profile_image/72/45f64d93-3339-41ec-9169-e5846ad1a6a6.jpeg", - "profile_image_90": "/uploads/user/profile_image/72/45f64d93-3339-41ec-9169-e5846ad1a6a6.jpeg" + "profile_image": "/uploads/user/profile_image/116/eda2fda2-1496-4403-ba9c-999d67ecc3bd.jpeg", + "profile_image_90": "/uploads/user/profile_image/116/eda2fda2-1496-4403-ba9c-999d67ecc3bd.jpeg" }, "organization": { - "name": "Braun, Dickinson and Dietrich", + "name": "Thiel Inc", "username": "org4", "slug": "org4", - "profile_image": "/uploads/organization/profile_image/106/8ede0fcc-afa6-4ea4-bc68-0d5a141b5736.png", - "profile_image_90": "/uploads/organization/profile_image/106/8ede0fcc-afa6-4ea4-bc68-0d5a141b5736.png" + "profile_image": "/uploads/organization/profile_image/4/9cad8c39-7be0-4aaf-a700-4c0265f5ebbe.png", + "profile_image_90": "/uploads/organization/profile_image/4/9cad8c39-7be0-4aaf-a700-4c0265f5ebbe.png" }, "flare_tag": { "name": "discuss", @@ -250,8 +266,12 @@ "/api/articles/latest": { "get": { "summary": "Published articles sorted by published date", - "security": [], - "tags": ["articles"], + "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": [ @@ -270,38 +290,42 @@ "example": [ { "type_of": "article", - "id": 46, - "title": "Edna O'Brien7", - "description": "Gastropub mlkshk green juice farm-to-table. Etsy twee deep v messenger bag 8-bit normcore. Synth...", - "readable_publish_date": "Nov 15", - "slug": "edna-obrien7-2b0b", - "path": "/username9/edna-obrien7-2b0b", - "url": "http://forem.test/username9/edna-obrien7-2b0b", + "id": 96, + "title": "Waiting for the Barbarians7", + "description": "Craft beer ethical pug you probably haven't heard of them intelligentsia selfies sartorial stumptown....", + "readable_publish_date": "Nov 21", + "slug": "waiting-for-the-barbarians7-29od", + "path": "/username9/waiting-for-the-barbarians7-29od", + "url": "http://forem.test/username9/waiting-for-the-barbarians7-29od", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:03Z", + "published_timestamp": "2023-11-21T12:30:24Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/16-77521848e7b5fcc073ac3e0bb004826e97f737238194e4c79330f662cc946ab2.png", - "social_image": "http://forem.test/assets/16-77521848e7b5fcc073ac3e0bb004826e97f737238194e4c79330f662cc946ab2.png", - "canonical_url": "http://forem.test/username9/edna-obrien7-2b0b", - "created_at": "2023-11-14T21:35:03Z", + "cover_image": "http://forem.test/assets/22-837b6c737e37b6d229b36d73e95ead7f26e0a346e0aa7dfbca74630ae161fb0d.png", + "social_image": "http://forem.test/assets/22-837b6c737e37b6d229b36d73e95ead7f26e0a346e0aa7dfbca74630ae161fb0d.png", + "canonical_url": "http://forem.test/username9/waiting-for-the-barbarians7-29od", + "created_at": "2023-11-21T12:30:24Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:03Z", - "last_comment_at": "2023-11-14T21:35:03Z", + "published_at": "2023-11-21T12:30:24Z", + "last_comment_at": "2023-11-21T12:30:24Z", "reading_time_minutes": 1, - "tag_list": ["javascript", "html", "discuss"], + "tag_list": [ + "javascript", + "html", + "discuss" + ], "tags": "javascript, html, discuss", "user": { - "name": "Cherly \"Lois\" \\:/ Swift", + "name": "Roselyn \"Maybelle\" \\:/ Hauck", "username": "username9", "twitter_username": "twitter9", "github_username": "github9", - "user_id": 75, + "user_id": 119, "website_url": null, - "profile_image": "/uploads/user/profile_image/75/a8667ffb-2015-4387-8122-d8ee6daf36d7.jpeg", - "profile_image_90": "/uploads/user/profile_image/75/a8667ffb-2015-4387-8122-d8ee6daf36d7.jpeg" + "profile_image": "/uploads/user/profile_image/119/66b7f289-b1d5-4517-a7c3-2e34b962c4e1.jpeg", + "profile_image_90": "/uploads/user/profile_image/119/66b7f289-b1d5-4517-a7c3-2e34b962c4e1.jpeg" }, "flare_tag": { "name": "discuss", @@ -311,38 +335,42 @@ }, { "type_of": "article", - "id": 45, - "title": "Dying of the Light6", - "description": "Disrupt goth pug truffaut. Portland cold-pressed echo banh mi. Deep v neutra fixie...", - "readable_publish_date": "Nov 15", - "slug": "dying-of-the-light6-1ljd", - "path": "/username8/dying-of-the-light6-1ljd", - "url": "http://forem.test/username8/dying-of-the-light6-1ljd", + "id": 95, + "title": "The Mirror Crack'd from Side to Side6", + "description": "Five dollar toast chicharrones tilde twee waistcoat kogi art party selvage. Venmo yr chartreuse...", + "readable_publish_date": "Nov 21", + "slug": "the-mirror-crackd-from-side-to-side6-269g", + "path": "/username8/the-mirror-crackd-from-side-to-side6-269g", + "url": "http://forem.test/username8/the-mirror-crackd-from-side-to-side6-269g", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:03Z", + "published_timestamp": "2023-11-21T12:30:24Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/27-441873f471d98b5358beff7d47a211e58b9979c6453794f9a7abfd5709c33322.png", - "social_image": "http://forem.test/assets/27-441873f471d98b5358beff7d47a211e58b9979c6453794f9a7abfd5709c33322.png", - "canonical_url": "http://forem.test/username8/dying-of-the-light6-1ljd", - "created_at": "2023-11-14T21:35:03Z", + "cover_image": "http://forem.test/assets/28-45c03a7ee6bce4cd3ddd541bd942a0c7995fa77e4b680563681529e9dd14a676.png", + "social_image": "http://forem.test/assets/28-45c03a7ee6bce4cd3ddd541bd942a0c7995fa77e4b680563681529e9dd14a676.png", + "canonical_url": "http://forem.test/username8/the-mirror-crackd-from-side-to-side6-269g", + "created_at": "2023-11-21T12:30:24Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:03Z", - "last_comment_at": "2023-11-14T21:35:03Z", + "published_at": "2023-11-21T12:30:24Z", + "last_comment_at": "2023-11-21T12:30:24Z", "reading_time_minutes": 1, - "tag_list": ["javascript", "html", "discuss"], + "tag_list": [ + "javascript", + "html", + "discuss" + ], "tags": "javascript, html, discuss", "user": { - "name": "Hosea \"Oliver\" \\:/ Murray", + "name": "Khadijah \"Oliver\" \\:/ Zieme", "username": "username8", "twitter_username": "twitter8", "github_username": "github8", - "user_id": 74, + "user_id": 118, "website_url": null, - "profile_image": "/uploads/user/profile_image/74/82cd08a8-ba4e-40ef-ba45-c95eadc146d5.jpeg", - "profile_image_90": "/uploads/user/profile_image/74/82cd08a8-ba4e-40ef-ba45-c95eadc146d5.jpeg" + "profile_image": "/uploads/user/profile_image/118/affae23f-81b3-4538-a9f6-8d02512cb3ca.jpeg", + "profile_image_90": "/uploads/user/profile_image/118/affae23f-81b3-4538-a9f6-8d02512cb3ca.jpeg" }, "flare_tag": { "name": "discuss", @@ -352,38 +380,42 @@ }, { "type_of": "article", - "id": 44, - "title": "A Time to Kill5", - "description": "Distillery bushwick slow-carb tattooed. Jean shorts lomo thundercats cronut lo-fi. Five dollar toast...", - "readable_publish_date": "Nov 15", - "slug": "a-time-to-kill5-1npf", - "path": "/username7/a-time-to-kill5-1npf", - "url": "http://forem.test/username7/a-time-to-kill5-1npf", + "id": 94, + "title": "Specimen Days5", + "description": "Pug kogi locavore kale chips occupy before they sold out williamsburg keffiyeh. Salvia kinfolk...", + "readable_publish_date": "Nov 21", + "slug": "specimen-days5-428e", + "path": "/username7/specimen-days5-428e", + "url": "http://forem.test/username7/specimen-days5-428e", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:02Z", + "published_timestamp": "2023-11-21T12:30:24Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/12-f9d673ae4ff98002f782ab82c641f2f26673be728e8f5409bea83f2d1de15323.png", - "social_image": "http://forem.test/assets/12-f9d673ae4ff98002f782ab82c641f2f26673be728e8f5409bea83f2d1de15323.png", - "canonical_url": "http://forem.test/username7/a-time-to-kill5-1npf", - "created_at": "2023-11-14T21:35:03Z", + "cover_image": "http://forem.test/assets/10-56ac1726da8a3bcbe4f93b48752287ea41bb79199cd8a8a61a9e4280ce9ae5b8.png", + "social_image": "http://forem.test/assets/10-56ac1726da8a3bcbe4f93b48752287ea41bb79199cd8a8a61a9e4280ce9ae5b8.png", + "canonical_url": "http://forem.test/username7/specimen-days5-428e", + "created_at": "2023-11-21T12:30:24Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:02Z", - "last_comment_at": "2023-11-14T21:35:02Z", + "published_at": "2023-11-21T12:30:24Z", + "last_comment_at": "2023-11-21T12:30:24Z", "reading_time_minutes": 1, - "tag_list": ["javascript", "html", "discuss"], + "tag_list": [ + "javascript", + "html", + "discuss" + ], "tags": "javascript, html, discuss", "user": { - "name": "Florine \"Beula\" \\:/ King", + "name": "Jeff \"Theresa\" \\:/ Schamberger", "username": "username7", "twitter_username": "twitter7", "github_username": "github7", - "user_id": 73, + "user_id": 117, "website_url": null, - "profile_image": "/uploads/user/profile_image/73/b3b4eb91-e7f5-4632-a493-47eeebe3bcc5.jpeg", - "profile_image_90": "/uploads/user/profile_image/73/b3b4eb91-e7f5-4632-a493-47eeebe3bcc5.jpeg" + "profile_image": "/uploads/user/profile_image/117/69abecbf-53b6-47c0-8d55-54425ec79df1.jpeg", + "profile_image_90": "/uploads/user/profile_image/117/69abecbf-53b6-47c0-8d55-54425ec79df1.jpeg" }, "flare_tag": { "name": "discuss", @@ -407,8 +439,12 @@ "/api/articles/{id}": { "get": { "summary": "Published article by id", - "security": [], - "tags": ["articles"], + "security": [ + + ], + "tags": [ + "articles" + ], "description": "This endpoint allows the client to retrieve a single published article given its `id`.", "operationId": "getArticleById", "parameters": [ @@ -428,40 +464,42 @@ "application/json": { "example": { "type_of": "article", - "id": 47, - "title": "Behold the Man8", - "description": "Locavore chartreuse iphone helvetica vegan. Kickstarter bespoke authentic. Carry brooklyn biodiesel....", - "readable_publish_date": "Nov 15", - "slug": "behold-the-man8-1f4", - "path": "/username10/behold-the-man8-1f4", - "url": "http://forem.test/username10/behold-the-man8-1f4", + "id": 97, + "title": "A Monstrous Regiment of Women8", + "description": "Flexitarian retro cred normcore mumblecore. Scenester tacos leggings locavore tote bag +1. Literally...", + "readable_publish_date": "Nov 21", + "slug": "a-monstrous-regiment-of-women8-1d4d", + "path": "/username10/a-monstrous-regiment-of-women8-1d4d", + "url": "http://forem.test/username10/a-monstrous-regiment-of-women8-1d4d", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:03Z", + "published_timestamp": "2023-11-21T12:30:24Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/38-3b0c46cc0d5367229799d282c99b2c42f33501201cac1ceb5c643f9ee11f06c6.png", - "social_image": "http://forem.test/assets/38-3b0c46cc0d5367229799d282c99b2c42f33501201cac1ceb5c643f9ee11f06c6.png", - "canonical_url": "http://forem.test/username10/behold-the-man8-1f4", - "created_at": "2023-11-14T21:35:03Z", + "cover_image": "http://forem.test/assets/27-441873f471d98b5358beff7d47a211e58b9979c6453794f9a7abfd5709c33322.png", + "social_image": "http://forem.test/assets/27-441873f471d98b5358beff7d47a211e58b9979c6453794f9a7abfd5709c33322.png", + "canonical_url": "http://forem.test/username10/a-monstrous-regiment-of-women8-1d4d", + "created_at": "2023-11-21T12:30:24Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:03Z", - "last_comment_at": "2023-11-14T21:35:03Z", + "published_at": "2023-11-21T12:30:24Z", + "last_comment_at": "2023-11-21T12:30:24Z", "reading_time_minutes": 1, "tag_list": "discuss", - "tags": ["discuss"], - "body_html": "

Locavore chartreuse iphone helvetica vegan. Kickstarter bespoke authentic.

\n\n

Carry brooklyn biodiesel. Chillwave ennui next level vinegar +1 butcher yr. Put a bird on it bushwick sustainable gluten-free chia craft beer.

\n\n", - "body_markdown": "---\ntitle: Behold the Man8\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nLocavore chartreuse iphone helvetica vegan. Kickstarter bespoke authentic.\n\n\nCarry brooklyn biodiesel. Chillwave ennui next level vinegar +1 butcher yr. Put a bird on it bushwick sustainable gluten-free chia craft beer.\n\n", + "tags": [ + "discuss" + ], + "body_html": "

Flexitarian retro cred normcore mumblecore. Scenester tacos leggings locavore tote bag +1. Literally vegan gastropub tilde put a bird on it godard.

\n\n

Taxidermy typewriter truffaut.

\n\n", + "body_markdown": "---\ntitle: A Monstrous Regiment of Women8\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nFlexitarian retro cred normcore mumblecore. Scenester tacos leggings locavore tote bag +1. Literally vegan gastropub tilde put a bird on it godard.\n\n\nTaxidermy typewriter truffaut.\n\n", "user": { - "name": "Vern \"Margarito\" \\:/ Cassin", + "name": "Jerri \"Connie\" \\:/ Schmitt", "username": "username10", "twitter_username": "twitter10", "github_username": "github10", - "user_id": 76, + "user_id": 120, "website_url": null, - "profile_image": "/uploads/user/profile_image/76/0bde307b-dc25-4f7a-82c5-9dc6b1a712e6.jpeg", - "profile_image_90": "/uploads/user/profile_image/76/0bde307b-dc25-4f7a-82c5-9dc6b1a712e6.jpeg" + "profile_image": "/uploads/user/profile_image/120/21c3dfe4-db1f-4283-a1a8-9aaf17c8a0ea.jpeg", + "profile_image_90": "/uploads/user/profile_image/120/21c3dfe4-db1f-4283-a1a8-9aaf17c8a0ea.jpeg" }, "flare_tag": { "name": "discuss", @@ -493,7 +531,9 @@ }, "put": { "summary": "Update an article by id", - "tags": ["articles"], + "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": [ @@ -517,40 +557,42 @@ "application/json": { "example": { "type_of": "article", - "id": 48, - "title": "To Your Scattered Bodies Go9", - "description": "Goth flannel taxidermy actually migas. Shabby chic drinking offal. Hammock craft beer food truck...", - "readable_publish_date": "Nov 15", - "slug": "to-your-scattered-bodies-go9-ia2", - "path": "/username11/to-your-scattered-bodies-go9-ia2", - "url": "http://forem.test/username11/to-your-scattered-bodies-go9-ia2", + "id": 98, + "title": "That Hideous Strength9", + "description": "Stumptown locavore pour-over. Williamsburg muggle magic tumblr. Chartreuse butcher keffiyeh quinoa...", + "readable_publish_date": "Nov 21", + "slug": "that-hideous-strength9-4865", + "path": "/username11/that-hideous-strength9-4865", + "url": "http://forem.test/username11/that-hideous-strength9-4865", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:03Z", + "published_timestamp": "2023-11-21T12:30:24Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/38-3b0c46cc0d5367229799d282c99b2c42f33501201cac1ceb5c643f9ee11f06c6.png", - "social_image": "http://forem.test/assets/38-3b0c46cc0d5367229799d282c99b2c42f33501201cac1ceb5c643f9ee11f06c6.png", - "canonical_url": "http://forem.test/username11/to-your-scattered-bodies-go9-ia2", - "created_at": "2023-11-14T21:35:03Z", - "edited_at": "2023-11-14T21:35:03Z", + "cover_image": "http://forem.test/assets/15-680d1f40ea6901cfc18b12fab21c19e432463aa63a44853f8ad84e469adb2e54.png", + "social_image": "http://forem.test/assets/15-680d1f40ea6901cfc18b12fab21c19e432463aa63a44853f8ad84e469adb2e54.png", + "canonical_url": "http://forem.test/username11/that-hideous-strength9-4865", + "created_at": "2023-11-21T12:30:24Z", + "edited_at": "2023-11-21T12:30:24Z", "crossposted_at": null, - "published_at": "2023-11-14T21:35:03Z", - "last_comment_at": "2023-11-14T21:35:03Z", + "published_at": "2023-11-21T12:30:24Z", + "last_comment_at": "2023-11-21T12:30:24Z", "reading_time_minutes": 1, "tag_list": "", - "tags": [], + "tags": [ + + ], "body_html": "

New body for the article

\n\n", "body_markdown": "**New** body for the article", "user": { - "name": "Jimmy \"Neal\" \\:/ Turner", + "name": "Shalonda \"Doug\" \\:/ Ryan", "username": "username11", "twitter_username": "twitter11", "github_username": "github11", - "user_id": 77, + "user_id": 121, "website_url": null, - "profile_image": "/uploads/user/profile_image/77/bca3edd4-eee3-4378-800a-18352c12d769.jpeg", - "profile_image_90": "/uploads/user/profile_image/77/bca3edd4-eee3-4378-800a-18352c12d769.jpeg" + "profile_image": "/uploads/user/profile_image/121/9b8647de-6d5a-4186-8a5b-8de1b661837d.jpeg", + "profile_image_90": "/uploads/user/profile_image/121/9b8647de-6d5a-4186-8a5b-8de1b661837d.jpeg" } } } @@ -604,8 +646,12 @@ "/api/articles/{username}/{slug}": { "get": { "summary": "Published article by path", - "security": [], - "tags": ["articles"], + "security": [ + + ], + "tags": [ + "articles" + ], "description": "This endpoint allows the client to retrieve a single published article given its `path`.", "operationId": "getArticleByPath", "parameters": [ @@ -633,40 +679,42 @@ "application/json": { "example": { "type_of": "article", - "id": 51, - "title": "Dying of the Light12", - "description": "Plaid put a bird on it cred keytar kombucha. Wolf polaroid sustainable. Polaroid chambray master...", - "readable_publish_date": "Nov 15", - "slug": "dying-of-the-light12-b7g", - "path": "/username15/dying-of-the-light12-b7g", - "url": "http://forem.test/username15/dying-of-the-light12-b7g", + "id": 101, + "title": "The Curious Incident of the Dog in the Night-Time12", + "description": "Art party marfa viral butcher. Five dollar toast mumblecore diy green juice semiotics austin...", + "readable_publish_date": "Nov 21", + "slug": "the-curious-incident-of-the-dog-in-the-night-time12-1je3", + "path": "/username15/the-curious-incident-of-the-dog-in-the-night-time12-1je3", + "url": "http://forem.test/username15/the-curious-incident-of-the-dog-in-the-night-time12-1je3", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:04Z", + "published_timestamp": "2023-11-21T12:30:25Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/37-94b286825ffd9f2b47c9842cf4f262b7c89e789797eba40196bc14b5c2359e75.png", - "social_image": "http://forem.test/assets/37-94b286825ffd9f2b47c9842cf4f262b7c89e789797eba40196bc14b5c2359e75.png", - "canonical_url": "http://forem.test/username15/dying-of-the-light12-b7g", - "created_at": "2023-11-14T21:35:04Z", + "cover_image": "http://forem.test/assets/29-62fdba2773105cf85b89a795a479be680d13a73e6b5406cacaa2458d403dda8c.png", + "social_image": "http://forem.test/assets/29-62fdba2773105cf85b89a795a479be680d13a73e6b5406cacaa2458d403dda8c.png", + "canonical_url": "http://forem.test/username15/the-curious-incident-of-the-dog-in-the-night-time12-1je3", + "created_at": "2023-11-21T12:30:25Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:04Z", - "last_comment_at": "2023-11-14T21:35:04Z", + "published_at": "2023-11-21T12:30:25Z", + "last_comment_at": "2023-11-21T12:30:25Z", "reading_time_minutes": 1, "tag_list": "discuss", - "tags": ["discuss"], - "body_html": "

Plaid put a bird on it cred keytar kombucha. Wolf polaroid sustainable.

\n\n

Polaroid chambray master kogi mixtape sartorial bushwick waistcoat.

\n\n", - "body_markdown": "---\ntitle: Dying of the Light12\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nPlaid put a bird on it cred keytar kombucha. Wolf polaroid sustainable.\n\n\nPolaroid chambray master kogi mixtape sartorial bushwick waistcoat.\n\n", + "tags": [ + "discuss" + ], + "body_html": "

Art party marfa viral butcher. Five dollar toast mumblecore diy green juice semiotics austin fixie.

\n\n

Farm-to-table plaid quinoa blog freegan. Trust fund umami migas retro everyday farm-to-table irony kitsch. Leggings organic slow-carb wayfarers schlitz gastropub park master.

\n\n", + "body_markdown": "---\ntitle: The Curious Incident of the Dog in the Night-Time12\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nArt party marfa viral butcher. Five dollar toast mumblecore diy green juice semiotics austin fixie.\n\n\nFarm-to-table plaid quinoa blog freegan. Trust fund umami migas retro everyday farm-to-table irony kitsch. Leggings organic slow-carb wayfarers schlitz gastropub park master.\n\n", "user": { - "name": "Kayleen \"Norman\" \\:/ Smitham", + "name": "Michael \"Shery\" \\:/ Raynor", "username": "username15", "twitter_username": "twitter15", "github_username": "github15", - "user_id": 81, + "user_id": 125, "website_url": null, - "profile_image": "/uploads/user/profile_image/81/1dd59047-d7a5-48a2-9750-0583c89772ed.jpeg", - "profile_image_90": "/uploads/user/profile_image/81/1dd59047-d7a5-48a2-9750-0583c89772ed.jpeg" + "profile_image": "/uploads/user/profile_image/125/07518ca3-2cbb-48c2-a0a1-05cd7811f7d5.jpeg", + "profile_image_90": "/uploads/user/profile_image/125/07518ca3-2cbb-48c2-a0a1-05cd7811f7d5.jpeg" }, "flare_tag": { "name": "discuss", @@ -700,7 +748,10 @@ "/api/articles/me": { "get": { "summary": "User's articles", - "tags": ["articles", "users"], + "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": [ @@ -727,7 +778,9 @@ "description": "A List of the authenticated user's Articles", "content": { "application/json": { - "example": [], + "example": [ + + ], "schema": { "type": "array", "items": { @@ -743,7 +796,10 @@ "/api/articles/me/published": { "get": { "summary": "User's published articles", - "tags": ["articles", "users"], + "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": [ @@ -770,7 +826,9 @@ "description": "A List of the authenticated user's Articles", "content": { "application/json": { - "example": [], + "example": [ + + ], "schema": { "type": "array", "items": { @@ -786,7 +844,10 @@ "/api/articles/me/unpublished": { "get": { "summary": "User's unpublished articles", - "tags": ["articles", "users"], + "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": [ @@ -813,7 +874,9 @@ "description": "A List of the authenticated user's Articles", "content": { "application/json": { - "example": [], + "example": [ + + ], "schema": { "type": "array", "items": { @@ -829,7 +892,10 @@ "/api/articles/me/all": { "get": { "summary": "User's all articles", - "tags": ["articles", "users"], + "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": [ @@ -856,7 +922,9 @@ "description": "A List of the authenticated user's Articles", "content": { "application/json": { - "example": [], + "example": [ + + ], "schema": { "type": "array", "items": { @@ -872,7 +940,9 @@ "/api/articles/{id}/unpublish": { "put": { "summary": "Unpublish an article", - "tags": ["articles"], + "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": [ @@ -931,7 +1001,9 @@ "/api/segments": { "get": { "summary": "Manually managed audience segments", - "tags": ["segments"], + "tags": [ + "segments" + ], "description": "This endpoint allows the client to retrieve a list of audience segments.\n\nAn audience segment is a group of users that can be targeted by a Billboard. This API only permits managing segments you create and maintain yourself.\n\nThe endpoint supports pagination, and each page will contain `30` segments by default.", "operationId": "getSegments", "parameters": [ @@ -947,16 +1019,16 @@ "example": [ { "id": 2, - "created_at": "2023-11-15T06:35:05.932+09:00", + "created_at": "2023-11-21T09:30:26.225-03:00", "type_of": "manual", - "updated_at": "2023-11-15T06:35:05.932+09:00", + "updated_at": "2023-11-21T09:30:26.225-03:00", "user_count": 1 }, { "id": 1, - "created_at": "2023-11-15T06:35:05.827+09:00", + "created_at": "2023-11-21T09:30:26.154-03:00", "type_of": "manual", - "updated_at": "2023-11-15T06:35:05.827+09:00", + "updated_at": "2023-11-21T09:30:26.154-03:00", "user_count": 3 } ], @@ -984,7 +1056,9 @@ }, "post": { "summary": "Create a manually managed audience segment", - "tags": ["segments"], + "tags": [ + "segments" + ], "description": "This endpoint allows the client to create a new audience segment.\n\nAn audience segment is a group of users that can be targeted by a Billboard. This API only permits managing segments you create and maintain yourself.", "operationId": "createSegment", "responses": { @@ -994,9 +1068,9 @@ "application/json": { "example": { "id": 3, - "created_at": "2023-11-15T06:35:06.380+09:00", + "created_at": "2023-11-21T09:30:26.508-03:00", "type_of": "manual", - "updated_at": "2023-11-15T06:35:06.380+09:00" + "updated_at": "2023-11-21T09:30:26.508-03:00" } } } @@ -1018,7 +1092,9 @@ "/api/segments/{id}": { "get": { "summary": "A manually managed audience segment", - "tags": ["segments"], + "tags": [ + "segments" + ], "description": "This endpoint allows the client to retrieve a single manually-managed audience segment specified by ID.", "operationId": "getSegment", "parameters": [ @@ -1040,9 +1116,9 @@ "application/json": { "example": { "id": 4, - "created_at": "2023-11-15T06:35:06.669+09:00", + "created_at": "2023-11-21T09:30:26.696-03:00", "type_of": "manual", - "updated_at": "2023-11-15T06:35:06.669+09:00", + "updated_at": "2023-11-21T09:30:26.696-03:00", "user_count": 3 }, "schema": { @@ -1080,7 +1156,9 @@ }, "delete": { "summary": "Delete a manually managed audience segment", - "tags": ["segments"], + "tags": [ + "segments" + ], "description": "This endpoint allows the client to delete an audience segment specified by ID.\n\nAudience segments cannot be deleted if there are still any Billboards using them.", "operationId": "deleteSegment", "parameters": [ @@ -1102,9 +1180,9 @@ "application/json": { "example": { "id": 8, - "created_at": "2023-11-15T06:35:07.188+09:00", + "created_at": "2023-11-21T09:30:27.045-03:00", "type_of": "manual", - "updated_at": "2023-11-15T06:35:07.188+09:00" + "updated_at": "2023-11-21T09:30:27.045-03:00" } } } @@ -1147,7 +1225,9 @@ "/api/segments/{id}/users": { "get": { "summary": "Users in a manually managed audience segment", - "tags": ["segments"], + "tags": [ + "segments" + ], "description": "This endpoint allows the client to retrieve a list of the users in an audience segment specified by ID. The endpoint supports pagination, and each page will contain `30` users by default.", "operationId": "getUsersInSegment", "parameters": [ @@ -1173,42 +1253,42 @@ "example": [ { "type_of": "user", - "id": 123, - "username": "username57", - "name": "Jared \"Marinda\" \\:/ Reilly", - "twitter_username": "twitter57", - "github_username": "github57", - "summary": null, - "location": null, - "website_url": null, - "joined_at": "Nov 15, 2023", - "profile_image": "/uploads/user/profile_image/123/55c76b67-99d3-4ed1-9024-4b73907484fe.jpeg" - }, - { - "type_of": "user", - "id": 121, + "id": 165, "username": "username55", - "name": "Lester \"Eduardo\" \\:/ Hagenes", + "name": "Sherri \"Rory\" \\:/ Lubowitz", "twitter_username": "twitter55", "github_username": "github55", "summary": null, "location": null, "website_url": null, - "joined_at": "Nov 15, 2023", - "profile_image": "/uploads/user/profile_image/121/70c2504b-1242-4fcb-b2d1-45de1d0de062.jpeg" + "joined_at": "Nov 21, 2023", + "profile_image": "/uploads/user/profile_image/165/a7046e01-2270-4155-890e-967a75a768d8.jpeg" }, { "type_of": "user", - "id": 122, + "id": 166, "username": "username56", - "name": "Wilton \"Davis\" \\:/ Hane", + "name": "Ferdinand \"Lourie\" \\:/ Zulauf", "twitter_username": "twitter56", "github_username": "github56", "summary": null, "location": null, "website_url": null, - "joined_at": "Nov 15, 2023", - "profile_image": "/uploads/user/profile_image/122/d879edcc-5f1c-4436-85a8-ccba21dbce3c.jpeg" + "joined_at": "Nov 21, 2023", + "profile_image": "/uploads/user/profile_image/166/ce0da0ae-fba9-4551-be2e-767e0ab5a9e5.jpeg" + }, + { + "type_of": "user", + "id": 167, + "username": "username57", + "name": "Scottie \"Alpha\" \\:/ Haag", + "twitter_username": "twitter57", + "github_username": "github57", + "summary": null, + "location": null, + "website_url": null, + "joined_at": "Nov 21, 2023", + "profile_image": "/uploads/user/profile_image/167/af93f12d-d207-4f70-b828-3f0b62ae0204.jpeg" } ], "schema": { @@ -1248,7 +1328,9 @@ "/api/segments/{id}/add_users": { "put": { "summary": "Add users to a manually managed audience segment", - "tags": ["segments"], + "tags": [ + "segments" + ], "description": "This endpoint allows the client to add users in bulk to an audience segment specified by ID.\n\nSuccesses are users that were included in the segment (even if they were already in it), and failures are users that could not be added to the segment.", "operationId": "addUsersToSegment", "parameters": [ @@ -1269,8 +1351,14 @@ "content": { "application/json": { "example": { - "succeeded": [129, 130, 131], - "failed": [] + "succeeded": [ + 173, + 174, + 175 + ], + "failed": [ + + ] } } } @@ -1323,7 +1411,9 @@ "/api/segments/{id}/remove_users": { "put": { "summary": "Remove users from a manually managed audience segment", - "tags": ["segments"], + "tags": [ + "segments" + ], "description": "This endpoint allows the client to remove users in bulk from an audience segment specified by ID.\n\nSuccesses are users that were removed; failures are users that weren't a part of the segment.", "operationId": "removeUsersFromSegment", "parameters": [ @@ -1344,8 +1434,14 @@ "content": { "application/json": { "example": { - "succeeded": [148, 149, 150], - "failed": [] + "succeeded": [ + 192, + 193, + 194 + ], + "failed": [ + + ] } } } @@ -1398,14 +1494,18 @@ "/api/billboards": { "get": { "summary": "Billboards", - "tags": ["billboards"], + "tags": [ + "billboards" + ], "description": "This endpoint allows the client to retrieve a list of all billboards.", "responses": { "200": { "description": "successful", "content": { "application/json": { - "example": [], + "example": [ + + ], "schema": { "type": "array", "items": { @@ -1430,22 +1530,26 @@ }, "post": { "summary": "Create a billboard", - "tags": ["billboards"], + "tags": [ + "billboards" + ], "description": "This endpoint allows the client to create a new billboard.", - "parameters": [], + "parameters": [ + + ], "responses": { "201": { "description": "A billboard", "content": { "application/json": { "example": { - "id": 92, + "id": 2, "approved": true, "audience_segment_id": null, "body_markdown": "# Hi, this is ad\nYep, it's an ad", "cached_tag_list": "", "clicks_count": 0, - "created_at": "2023-11-15T06:35:11.258+09:00", + "created_at": "2023-11-21T09:30:29.523-03:00", "creator_id": null, "custom_display_label": null, "display_to": "all", @@ -1461,11 +1565,14 @@ "success_rate": 0.0, "template": "authorship_box", "type_of": "in_house", - "updated_at": "2023-11-15T06:35:11.258+09:00", + "updated_at": "2023-11-21T09:30:29.523-03:00", "weight": 1.0, "audience_segment_type": null, "tag_list": "", - "target_geolocations": ["US-WA", "CA-BC"] + "target_geolocations": [ + "US-WA", + "CA-BC" + ] }, "schema": { "type": "object", @@ -1516,7 +1623,9 @@ "/api/billboards/{id}": { "get": { "summary": "A billboard (by id)", - "tags": ["billboards"], + "tags": [ + "billboards" + ], "description": "This endpoint allows the client to retrieve a single billboard, via its id.", "parameters": [ { @@ -1538,20 +1647,20 @@ "content": { "application/json": { "example": { - "id": 93, + "id": 3, "approved": false, "audience_segment_id": null, "body_markdown": "Hello _hey_ Hey hey 2", "cached_tag_list": "", "clicks_count": 0, - "created_at": "2023-11-15T06:35:11.539+09:00", + "created_at": "2023-11-21T09:30:29.718-03:00", "creator_id": null, "custom_display_label": null, "display_to": "all", "exclude_article_ids": "", "impressions_count": 0, - "name": "Billboard 93", - "organization_id": 108, + "name": "Billboard 3", + "organization_id": 6, "placement_area": "sidebar_left", "priority": false, "processed_html": "

Hello hey Hey hey 2

", @@ -1560,11 +1669,13 @@ "success_rate": 0.0, "template": "authorship_box", "type_of": "in_house", - "updated_at": "2023-11-15T06:35:11.543+09:00", + "updated_at": "2023-11-21T09:30:29.722-03:00", "weight": 1.0, "audience_segment_type": null, "tag_list": "", - "target_geolocations": [] + "target_geolocations": [ + + ] } } } @@ -1595,7 +1706,9 @@ }, "put": { "summary": "Update a billboard by ID", - "tags": ["billboards"], + "tags": [ + "billboards" + ], "description": "This endpoint allows the client to update the attributes of a single billboard, via its id.", "parameters": [ { @@ -1621,8 +1734,8 @@ "body_markdown": "Hello _hey_ Hey hey 3", "creator_id": null, "display_to": "all", - "name": "Billboard 94", - "organization_id": 109, + "name": "Billboard 4", + "organization_id": 7, "placement_area": "sidebar_left", "published": false, "type_of": "in_house", @@ -1634,16 +1747,18 @@ "template": "authorship_box", "render_mode": "forem_markdown", "cached_tag_list": "", - "id": 94, + "id": 4, "clicks_count": 0, - "created_at": "2023-11-15T06:35:11.843+09:00", + "created_at": "2023-11-21T09:30:29.937-03:00", "impressions_count": 0, "processed_html": "

Hello hey Hey hey 3

", "success_rate": 0.0, - "updated_at": "2023-11-15T06:35:11.847+09:00", + "updated_at": "2023-11-21T09:30:29.940-03:00", "audience_segment_type": null, "tag_list": "", - "target_geolocations": [] + "target_geolocations": [ + + ] }, "schema": { "type": "object", @@ -1694,7 +1809,9 @@ "/api/billboards/{id}/unpublish": { "put": { "summary": "Unpublish a billboard", - "tags": ["billboards"], + "tags": [ + "billboards" + ], "description": "This endpoint allows the client to remove a billboard from rotation by un-publishing it.", "parameters": [ { @@ -1742,8 +1859,12 @@ "/api/comments": { "get": { "summary": "Comments", - "security": [], - "tags": ["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.\n\nIt supports pagination, each page will contain `50` top level comments (and as many child comments they have) by default.\n\nIf the page parameter is not passed, all comments of an article or podcast will be returned.\n", "operationId": "getCommentsByArticleId", "parameters": [ @@ -1792,20 +1913,22 @@ "example": [ { "type_of": "comment", - "id_code": "1", - "created_at": "2023-11-14T21:35:12Z", - "body_html": "

Flexitarian truffaut kombucha meggings helvetica hammock flannel slow-carb. Banjo bitters celiac typewriter.

\n\n", + "id_code": "1j", + "created_at": "2023-11-21T12:30:30Z", + "body_html": "

Fanny pack aesthetic knausgaard vinegar. Wayfarers cleanse portland carry bicycle rights migas artisan asymmetrical.

\n\n", "user": { - "name": "Arianne \"Adolph\" \\:/ Corkery", + "name": "Ardath \"Cathryn\" \\:/ Emard", "username": "username121", "twitter_username": "twitter121", "github_username": "github121", - "user_id": 187, + "user_id": 231, "website_url": null, - "profile_image": "/uploads/user/profile_image/187/1766f194-cc29-4ea6-9d88-a3b8273f4600.jpeg", - "profile_image_90": "/uploads/user/profile_image/187/1766f194-cc29-4ea6-9d88-a3b8273f4600.jpeg" + "profile_image": "/uploads/user/profile_image/231/985c48fc-321f-41ad-8437-fa97893c209a.jpeg", + "profile_image_90": "/uploads/user/profile_image/231/985c48fc-321f-41ad-8437-fa97893c209a.jpeg" }, - "children": [] + "children": [ + + ] } ], "schema": { @@ -1834,8 +1957,12 @@ "/api/comments/{id}": { "get": { "summary": "Comment by id", - "security": [], - "tags": ["comments"], + "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": [ @@ -1857,20 +1984,22 @@ "application/json": { "example": { "type_of": "comment", - "id_code": "3", - "created_at": "2023-11-14T21:35:13Z", - "body_html": "

Slow-carb ennui williamsburg biodiesel hashtag raw denim five dollar toast. Kitsch wes anderson green juice forage paleo swag. Chia gluten-free offal viral chambray before they sold out muggle magic disrupt.

\n\n", + "id_code": "1l", + "created_at": "2023-11-21T12:30:30Z", + "body_html": "

Chia polaroid photo booth green juice truffaut irony wolf gastropub. Flexitarian try-hard distillery letterpress kinfolk mixtape iphone.

\n\n", "user": { - "name": "Tyler \"Alexis\" \\:/ Purdy", + "name": "Marx \"Librada\" \\:/ Witting", "username": "username125", "twitter_username": "twitter125", "github_username": "github125", - "user_id": 191, + "user_id": 235, "website_url": null, - "profile_image": "/uploads/user/profile_image/191/be3adde6-43cb-4c8c-8f48-a0354c1ccbf2.jpeg", - "profile_image_90": "/uploads/user/profile_image/191/be3adde6-43cb-4c8c-8f48-a0354c1ccbf2.jpeg" + "profile_image": "/uploads/user/profile_image/235/16f0a63b-1f28-4b54-b9db-9f269df20f44.jpeg", + "profile_image_90": "/uploads/user/profile_image/235/16f0a63b-1f28-4b54-b9db-9f269df20f44.jpeg" }, - "children": [] + "children": [ + + ] } } } @@ -1892,7 +2021,10 @@ "/api/follows/tags": { "get": { "summary": "Followed Tags", - "tags": ["followed_tags", "tags"], + "tags": [ + "followed_tags", + "tags" + ], "description": "This endpoint allows the client to retrieve a list of the tags they follow.", "operationId": "getFollowedTags", "responses": { @@ -1913,12 +2045,12 @@ "application/json": { "example": [ { - "id": 160, + "id": 88, "name": "tag3", "points": 1.0 }, { - "id": 161, + "id": 89, "name": "tag4", "points": 1.0 } @@ -1938,7 +2070,9 @@ "/api/followers/users": { "get": { "summary": "Followers", - "tags": ["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": [ @@ -1967,23 +2101,23 @@ "example": [ { "type_of": "user_follower", - "id": 6, - "created_at": "2023-11-14T21:35:13Z", - "user_id": 198, - "name": "Loren \"Christopher\" \\:/ Marvin", + "id": 8, + "created_at": "2023-11-21T12:30:31Z", + "user_id": 242, + "name": "Patrina \"Soo\" \\:/ Miller", "path": "/username132", "username": "username132", - "profile_image": "/uploads/user/profile_image/198/d3acbf11-054f-4513-ab78-e451725d5150.jpeg" + "profile_image": "/uploads/user/profile_image/242/b557ff9d-9b81-4e9c-8e19-d2998285b9eb.jpeg" }, { "type_of": "user_follower", - "id": 5, - "created_at": "2023-11-14T21:35:13Z", - "user_id": 196, - "name": "Lucinda \"Nan\" \\:/ Harber", + "id": 7, + "created_at": "2023-11-21T12:30:31Z", + "user_id": 240, + "name": "Mee \"Dorinda\" \\:/ Satterfield", "path": "/username130", "username": "username130", - "profile_image": "/uploads/user/profile_image/196/ca23ec2a-45e5-4f27-81c6-d343fc69856c.jpeg" + "profile_image": "/uploads/user/profile_image/240/68aed812-dc78-4098-afa4-b8c23ab5ea97.jpeg" } ], "schema": { @@ -2040,8 +2174,12 @@ "/api/organizations/{username}": { "get": { "summary": "An organization (by username)", - "tags": ["organizations"], - "security": [], + "tags": [ + "organizations" + ], + "security": [ + + ], "description": "This endpoint allows the client to retrieve a single organization by their username", "operationId": "getOrganization", "parameters": [ @@ -2061,19 +2199,19 @@ "application/json": { "example": { "type_of": "organization", - "id": 114, + "id": 12, "username": "org12", - "name": "Doyle, Crooks and Ziemann", - "summary": "Retro lo-fi venmo disrupt bitters. Bushwick wes anderson leggings hammock venmo freegan. Pitchfork jean shorts typewriter kale chips.", - "twitter_username": "org7825", - "github_username": "org533", - "url": "http://labadie-macgyver.io/vaughn", + "name": "Lakin, Skiles and Nolan", + "summary": "Lo-fi everyday seitan asymmetrical semiotics fanny pack. Truffaut cronut hashtag pour-over chambray crucifix. Keytar normcore migas cliche.", + "twitter_username": "org9818", + "github_username": "org1538", + "url": "http://kling.com/dannie_hagenes", "location": null, "tech_stack": null, "tag_line": null, "story": null, - "joined_at": "2023-11-14T21:35:14Z", - "profile_image": "/uploads/organization/profile_image/114/4fae4f87-65fa-4559-92ca-db1fade7142d.png" + "joined_at": "2023-11-21T12:30:31Z", + "profile_image": "/uploads/organization/profile_image/12/cd086f89-68ba-4c37-b8f2-1f0b3c3bdcf9.png" }, "schema": { "type": "object", @@ -2101,8 +2239,13 @@ "/api/organizations/{organization_id_or_username}/users": { "get": { "summary": "Organization's users", - "tags": ["organizations", "users"], - "security": [], + "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": [ @@ -2129,29 +2272,29 @@ "example": [ { "type_of": "user", - "id": 211, + "id": 255, "username": "username145", - "name": "Kirk \"Dale\" \\:/ Wolf", + "name": "Wilfredo \"Blair\" \\:/ Ritchie", "twitter_username": "twitter145", "github_username": "github145", "summary": null, "location": null, "website_url": null, - "joined_at": "Nov 15, 2023", - "profile_image": "/uploads/user/profile_image/211/6e63e764-4ba2-471a-92b5-f672c3b78b00.jpeg" + "joined_at": "Nov 21, 2023", + "profile_image": "/uploads/user/profile_image/255/2508b31a-9005-42d4-bdf4-af91936451a5.jpeg" }, { "type_of": "user", - "id": 212, + "id": 256, "username": "username146", - "name": "Kassandra \"Gracia\" \\:/ Turner", + "name": "Ramiro \"Jeremy\" \\:/ Roberts", "twitter_username": "twitter146", "github_username": "github146", "summary": null, "location": null, "website_url": null, - "joined_at": "Nov 15, 2023", - "profile_image": "/uploads/user/profile_image/212/ef469389-13da-4069-8588-014288f66456.jpeg" + "joined_at": "Nov 21, 2023", + "profile_image": "/uploads/user/profile_image/256/1639fba6-2262-416a-b8dc-8ddb7004a015.jpeg" } ], "schema": { @@ -2180,8 +2323,13 @@ "/api/organizations/{organization_id_or_username}/articles": { "get": { "summary": "Organization's Articles", - "tags": ["organizations", "articles"], - "security": [], + "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": [ @@ -2208,45 +2356,49 @@ "example": [ { "type_of": "article", - "id": 65, - "title": "Blood's a Rover26", - "description": "Everyday williamsburg cornhole skateboard sustainable helvetica. Swag drinking yolo put a bird on it...", - "readable_publish_date": "Nov 15", - "slug": "bloods-a-rover26-314h", - "path": "/org18/bloods-a-rover26-314h", - "url": "http://forem.test/org18/bloods-a-rover26-314h", + "id": 115, + "title": "The Grapes of Wrath26", + "description": "Meggings pickled hashtag goth wayfarers lo-fi. Cronut actually tumblr chambray franzen chartreuse...", + "readable_publish_date": "Nov 21", + "slug": "the-grapes-of-wrath26-3l3d", + "path": "/org18/the-grapes-of-wrath26-3l3d", + "url": "http://forem.test/org18/the-grapes-of-wrath26-3l3d", "comments_count": 0, "public_reactions_count": 0, "collection_id": null, - "published_timestamp": "2023-11-14T21:35:15Z", + "published_timestamp": "2023-11-21T12:30:32Z", "positive_reactions_count": 0, - "cover_image": "http://forem.test/assets/13-f0e8b5976009c819e9aa46f1be169bdba0f0e3142a6a869981d7868495926c78.png", - "social_image": "http://forem.test/assets/13-f0e8b5976009c819e9aa46f1be169bdba0f0e3142a6a869981d7868495926c78.png", - "canonical_url": "http://forem.test/org18/bloods-a-rover26-314h", - "created_at": "2023-11-14T21:35:16Z", + "cover_image": "http://forem.test/assets/11-f4a704eef06d25d2d2fa2026ef08f1089754beaf5b6ee01160115d3c36ed3d34.png", + "social_image": "http://forem.test/assets/11-f4a704eef06d25d2d2fa2026ef08f1089754beaf5b6ee01160115d3c36ed3d34.png", + "canonical_url": "http://forem.test/org18/the-grapes-of-wrath26-3l3d", + "created_at": "2023-11-21T12:30:32Z", "edited_at": null, "crossposted_at": null, - "published_at": "2023-11-14T21:35:15Z", - "last_comment_at": "2023-11-14T21:35:15Z", + "published_at": "2023-11-21T12:30:32Z", + "last_comment_at": "2023-11-21T12:30:32Z", "reading_time_minutes": 1, - "tag_list": ["javascript", "html", "discuss"], + "tag_list": [ + "javascript", + "html", + "discuss" + ], "tags": "javascript, html, discuss", "user": { - "name": "Napoleon \"Kip\" \\:/ Lakin", + "name": "Reggie \"Jose\" \\:/ Walsh", "username": "username156", "twitter_username": "twitter156", "github_username": "github156", - "user_id": 222, + "user_id": 266, "website_url": null, - "profile_image": "/uploads/user/profile_image/222/153558d8-e7f3-44b4-8a99-8f8c0f481191.jpeg", - "profile_image_90": "/uploads/user/profile_image/222/153558d8-e7f3-44b4-8a99-8f8c0f481191.jpeg" + "profile_image": "/uploads/user/profile_image/266/eb910570-c0e7-4629-8533-1823f37b0cd2.jpeg", + "profile_image_90": "/uploads/user/profile_image/266/eb910570-c0e7-4629-8533-1823f37b0cd2.jpeg" }, "organization": { - "name": "Sanford and Sons", + "name": "White Group", "username": "org18", "slug": "org18", - "profile_image": "/uploads/organization/profile_image/120/eae1e02f-e85f-4641-b4d1-e11bccfb3399.png", - "profile_image_90": "/uploads/organization/profile_image/120/eae1e02f-e85f-4641-b4d1-e11bccfb3399.png" + "profile_image": "/uploads/organization/profile_image/18/4a123271-1e57-4e63-b5c8-75adff8cf01c.png", + "profile_image_90": "/uploads/organization/profile_image/18/4a123271-1e57-4e63-b5c8-75adff8cf01c.png" } } ], @@ -2276,8 +2428,12 @@ "/api/organizations": { "get": { "summary": "Organizations", - "tags": ["organizations"], - "security": [], + "tags": [ + "organizations" + ], + "security": [ + + ], "description": "This endpoint allows the client to retrieve a list of Dev organizations.\n\n It supports pagination, each page will contain 10 tags by default.", "operationId": "getOrganizations", "parameters": [ @@ -2295,15 +2451,15 @@ "application/json": { "example": [ { - "id": 122, - "name": "Johnson LLC", + "id": 20, + "name": "Runolfsdottir, Moore and Rohan", "profile_image": { - "url": "/uploads/organization/profile_image/122/45760994-0c0f-4996-9cb7-a815cf7f0946.png" + "url": "/uploads/organization/profile_image/20/12fe4a2e-81a7-43cd-a42b-96c8b7c4f46b.png" }, "slug": "org20", - "summary": "Chillwave food truck wayfarers hammock twee vice tofu. Forage meggings offal gluten-free semiotics vinegar readymade loko. Quinoa austin yr cronut ever", + "summary": "Vice direct trade phlogiston chillwave iphone pour-over. Brunch skateboard mumblecore intelligentsia tacos carry xoxo art party.", "tag_line": null, - "url": "http://lakin.io/lorelei.pfeffer" + "url": "http://medhurst-mclaughlin.name/ivy_witting" } ], "schema": { @@ -2319,17 +2475,21 @@ }, "post": { "summary": "Create an Organization", - "tags": ["organizations"], + "tags": [ + "organizations" + ], "description": "This endpoint allows the client to create an organization with the provided parameters.\n It requires a token from a user with `admin` privileges.", "operationId": "createOrganization", - "parameters": [], + "parameters": [ + + ], "responses": { "201": { "description": "Successful", "content": { "application/json": { "example": { - "id": 125, + "id": 23, "name": "New Test Org", "profile_image": "uploads/organization/profile_image/1/400x400.jpg", "slug": "org10001", @@ -2369,8 +2529,12 @@ "/api/organizations/{id}": { "get": { "summary": "An organization (by id)", - "tags": ["organizations"], - "security": [], + "tags": [ + "organizations" + ], + "security": [ + + ], "description": "This endpoint allows the client to retrieve a single organization by their id", "operationId": "getOrganizationById", "parameters": [ @@ -2390,19 +2554,19 @@ "application/json": { "example": { "type_of": "organization", - "id": 123, + "id": 21, "username": "org21", - "name": "Ward and Sons", - "summary": "Kitsch whatever swag meditation before they sold out stumptown neutra keytar. Kale chips meggings bicycle rights photo booth fingerstache aesthetic. Cr", - "twitter_username": "org9474", - "github_username": "org8155", - "url": "http://nicolas-bergnaum.co/phil_dicki", + "name": "Carroll, Kemmer and Ratke", + "summary": "Ugh truffaut bushwick raw denim master swag.", + "twitter_username": "org244", + "github_username": "org3701", + "url": "http://sipes.com/tyson", "location": null, "tech_stack": null, "tag_line": null, "story": null, - "joined_at": "2023-11-14T21:35:16Z", - "profile_image": "/uploads/organization/profile_image/123/1960ff26-9e2e-4b5a-a584-4c02bf383017.png" + "joined_at": "2023-11-21T12:30:32Z", + "profile_image": "/uploads/organization/profile_image/21/927ea3e5-d08f-4c94-85af-9f39cb4abfb5.png" }, "schema": { "type": "object", @@ -2428,7 +2592,9 @@ }, "put": { "summary": "Update an organization by id", - "tags": ["organizations"], + "tags": [ + "organizations" + ], "description": "This endpoint allows the client to update an existing organization.", "parameters": [ { @@ -2450,13 +2616,13 @@ "content": { "application/json": { "example": { - "id": 126, - "name": "Collins, Stroman and Rohan", - "profile_image": "/uploads/organization/profile_image/126/03e189dd-ecb2-4528-95b3-05cd98bfe2a0.png", + "id": 24, + "name": "Dickens-Kling", + "profile_image": "/uploads/organization/profile_image/24/90360fae-4961-4931-986a-2242e6af82ff.png", "slug": "org23", "summary": "An updated summary for the organization.", "tag_line": null, - "url": "http://fritsch.org/simonne" + "url": "http://doyle-quigley.co/katherine_rogahn" } } } @@ -2507,7 +2673,9 @@ }, "delete": { "summary": "Delete an Organization by id", - "tags": ["organizations"], + "tags": [ + "organizations" + ], "description": "This endpoint allows the client to delete a single organization, specified by id", "parameters": [ { @@ -2529,7 +2697,7 @@ "content": { "application/json": { "example": { - "message": "deletion scheduled for organization with ID 130", + "message": "deletion scheduled for organization with ID 28", "status": 200 } } @@ -2552,8 +2720,12 @@ "/api/pages": { "get": { "summary": "show details for all pages", - "security": [], - "tags": ["pages"], + "security": [ + + ], + "tags": [ + "pages" + ], "description": "This endpoint allows the client to retrieve details for all Page objects.", "responses": { "200": { @@ -2563,15 +2735,15 @@ "example": [ { "id": 1, - "title": "Fear and Trembling", - "slug": "authority-introduction", - "description": "Sint non deserunt est.", + "title": "The Violent Bear It Away", + "slug": "highway-confuse", + "description": "Voluptatem modi quod iusto.", "is_top_level_path": false, "landing_page": false, "body_html": null, "body_json": null, - "body_markdown": "Fuga voluptatem qui quam.", - "processed_html": "

Fuga voluptatem qui quam.

\n\n", + "body_markdown": "Dolores aut ut magnam.", + "processed_html": "

Dolores aut ut magnam.

\n\n", "social_image": { "url": null }, @@ -2591,9 +2763,13 @@ }, "post": { "summary": "pages", - "tags": ["pages"], + "tags": [ + "pages" + ], "description": "This endpoint allows the client to create a new page.", - "parameters": [], + "parameters": [ + + ], "responses": { "200": { "description": "successful", @@ -2704,8 +2880,12 @@ "/api/pages/{id}": { "get": { "summary": "show details for a page", - "security": [], - "tags": ["pages"], + "security": [ + + ], + "tags": [ + "pages" + ], "description": "This endpoint allows the client to retrieve details for a single Page object, specified by ID.", "parameters": [ { @@ -2728,15 +2908,15 @@ "application/json": { "example": { "id": 6, - "title": "Precious Bane", - "slug": "linger_diagram", - "description": "Et incidunt nesciunt voluptas.", + "title": "Butter In a Lordly Dish", + "slug": "angel_widen", + "description": "Aut id sunt ut.", "is_top_level_path": false, "landing_page": false, "body_html": null, "body_json": null, - "body_markdown": "Ullam eligendi consequatur commodi.", - "processed_html": "

Ullam eligendi consequatur commodi.

\n\n", + "body_markdown": "Quam dolorem in consectetur.", + "processed_html": "

Quam dolorem in consectetur.

\n\n", "social_image": { "url": null }, @@ -2752,7 +2932,9 @@ }, "put": { "summary": "update details for a page", - "tags": ["pages"], + "tags": [ + "pages" + ], "description": "This endpoint allows the client to retrieve details for a single Page object, specified by ID.", "parameters": [ { @@ -2776,14 +2958,14 @@ "example": { "id": 7, "title": "New Title", - "slug": "inspiration_offensive", - "description": "Amet ea odit eos.", + "slug": "curriculum_theorist", + "description": "Aliquid qui error quibusdam.", "is_top_level_path": false, "landing_page": false, "body_html": null, "body_json": null, - "body_markdown": "Repellat consequatur sit asperiores.", - "processed_html": "

Repellat consequatur sit asperiores.

\n\n", + "body_markdown": "Est soluta necessitatibus illum.", + "processed_html": "

Est soluta necessitatibus illum.

\n\n", "social_image": { "url": null }, @@ -2812,15 +2994,15 @@ "application/json": { "example": { "id": 9, - "title": "A Swiftly Tilting Planet", - "slug": "scale_hypothesis", - "description": "Alias repellat enim nulla.", + "title": "Consider Phlebas", + "slug": "nursery-corn", + "description": "Aperiam et fugiat facilis.", "is_top_level_path": false, "landing_page": false, "body_html": null, "body_json": null, - "body_markdown": "Quas voluptatum consectetur facilis.", - "processed_html": "

Enim consequuntur laboriosam voluptatibus.

\n\n", + "body_markdown": "Aspernatur et molestias soluta.", + "processed_html": "

Vitae ut fugit possimus.

\n\n", "social_image": { "url": null }, @@ -2842,7 +3024,9 @@ }, "delete": { "summary": "remove a page", - "tags": ["pages"], + "tags": [ + "pages" + ], "description": "This endpoint allows the client to delete a single Page object, specified by ID.", "parameters": [ { @@ -2865,15 +3049,15 @@ "application/json": { "example": { "id": 10, - "title": "Noli Me Tangere", - "slug": "dynamic_notebook", - "description": "Quam dolores vitae rerum.", + "title": "Infinite Jest", + "slug": "twilight-doctor", + "description": "Inventore possimus optio aut.", "is_top_level_path": false, "landing_page": false, "body_html": null, "body_json": null, - "body_markdown": "Necessitatibus placeat sed commodi.", - "processed_html": "

Necessitatibus placeat sed commodi.

\n\n", + "body_markdown": "Labore nam vero id.", + "processed_html": "

Labore nam vero id.

\n\n", "social_image": { "url": null }, @@ -2918,8 +3102,12 @@ "/api/podcast_episodes": { "get": { "summary": "Podcast Episodes", - "security": [], - "tags": ["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": [ @@ -2951,12 +3139,12 @@ "class_name": "PodcastEpisode", "id": 2, "path": "/codenewbie/slug-2", - "title": "8", - "image_url": "/uploads/podcast/image/2/243c4f25-dfa6-4f3e-831b-62166c276528.jpeg", + "title": "22", + "image_url": "/uploads/podcast/image/2/5853efeb-97f7-4f6a-927c-cb9014cecf91.jpeg", "podcast": { - "title": "Old Rasputin Russian Imperial Stout", + "title": "Ruination IPA", "slug": "codenewbie", - "image_url": "/uploads/podcast/image/2/243c4f25-dfa6-4f3e-831b-62166c276528.jpeg" + "image_url": "/uploads/podcast/image/2/5853efeb-97f7-4f6a-927c-cb9014cecf91.jpeg" } } ], @@ -2986,7 +3174,9 @@ "/api/profile_images/{username}": { "get": { "summary": "A Users or organizations profile image", - "tags": ["profile images"], + "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": [ @@ -3009,8 +3199,8 @@ "example": { "type_of": "profile_image", "image_of": "user", - "profile_image": "/uploads/user/profile_image/246/3190d32e-0779-4542-b769-eec803f59ef2.jpeg", - "profile_image_90": "/uploads/user/profile_image/246/3190d32e-0779-4542-b769-eec803f59ef2.jpeg" + "profile_image": "/uploads/user/profile_image/290/40b7e6e8-15af-4abf-9493-e312e9eae800.jpeg", + "profile_image_90": "/uploads/user/profile_image/290/40b7e6e8-15af-4abf-9493-e312e9eae800.jpeg" }, "schema": { "type": "object", @@ -3038,7 +3228,9 @@ "/api/reactions/toggle": { "post": { "summary": "toggle reaction", - "tags": ["reactions"], + "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": [ { @@ -3071,7 +3263,11 @@ "required": true, "schema": { "type": "string", - "enum": ["Comment", "Article", "User"] + "enum": [ + "Comment", + "Article", + "User" + ] } } ], @@ -3084,7 +3280,7 @@ "result": "create", "category": "like", "id": 1, - "reactable_id": 67, + "reactable_id": 117, "reactable_type": "Article" } } @@ -3107,7 +3303,9 @@ "/api/reactions": { "post": { "summary": "create reaction", - "tags": ["reactions"], + "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": [ { @@ -3140,7 +3338,11 @@ "required": true, "schema": { "type": "string", - "enum": ["Comment", "Article", "User"] + "enum": [ + "Comment", + "Article", + "User" + ] } } ], @@ -3153,7 +3355,7 @@ "result": "none", "category": "like", "id": 3, - "reactable_id": 69, + "reactable_id": 119, "reactable_type": "Article" } } @@ -3176,7 +3378,9 @@ "/api/readinglist": { "get": { "summary": "Readinglist", - "tags": ["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": [ @@ -3203,7 +3407,9 @@ "description": "A list of articles in the users readinglist", "content": { "application/json": { - "example": [], + "example": [ + + ], "schema": { "type": "array", "items": { @@ -3219,8 +3425,12 @@ "/api/tags": { "get": { "summary": "Tags", - "tags": ["tags"], - "security": [], + "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": [ @@ -3238,19 +3448,19 @@ "application/json": { "example": [ { - "id": 200, + "id": 128, "name": "tag7", "bg_color_hex": null, "text_color_hex": null }, { - "id": 199, + "id": 127, "name": "tag6", "bg_color_hex": null, "text_color_hex": null }, { - "id": 198, + "id": 126, "name": "tag5", "bg_color_hex": null, "text_color_hex": null @@ -3271,7 +3481,9 @@ "/api/users/{id}/suspend": { "put": { "summary": "Suspend a User", - "tags": ["users"], + "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": [ @@ -3320,7 +3532,9 @@ "/api/users/{id}/limited": { "put": { "summary": "Add limited role for a User", - "tags": ["users"], + "tags": [ + "users" + ], "description": "This endpoint allows the client to limit 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 'limited' role. Limiting a user will limit notifications\ngenerated from new posts and comments. It doesn't delete any of the user's content or prevent them\nfrom generating new content while limited. Users are not notified of their limits\nin the UI, so if you want them to know about this, you must notify them.", "operationId": "limitUser", "parameters": [ @@ -3367,7 +3581,9 @@ }, "delete": { "summary": "Remove limited for a User", - "tags": ["users"], + "tags": [ + "users" + ], "description": "This endpoint allows the client to remove limits for a user.\n\nThe user associated with the API key must have any 'admin' or 'moderator' role.\n\nThis specified user will be restored to 'general' status. Users are not notified\nof limits in the UI, so if you want them to know about this, you must\nnotify them.", "operationId": "unLimitUser", "parameters": [ @@ -3416,7 +3632,9 @@ "/api/users/me": { "get": { "summary": "The authenticated user", - "tags": ["users"], + "tags": [ + "users" + ], "description": "This endpoint allows the client to retrieve information about the authenticated user", "operationId": "getUserMe", "responses": { @@ -3426,22 +3644,26 @@ "application/json": { "example": { "type_of": "user", - "id": 276, + "id": 320, "username": "username210", - "name": "Stephania \"Dorie\" \\:/ O'Keefe", + "name": "Gertrude \"Jeffery\" \\:/ Cole", "twitter_username": "twitter210", "github_username": "github210", "email": null, "summary": null, "location": null, "website_url": null, - "joined_at": "Nov 15, 2023", - "profile_image": "/uploads/user/profile_image/276/c81d8a5c-ddd5-4aa4-8e13-4ca1325defb6.jpeg" + "joined_at": "Nov 21, 2023", + "profile_image": "/uploads/user/profile_image/320/c8ba886f-e07b-4723-9fe3-5a3894ccd28f.jpeg", + "badge_ids": [ + + ], + "followers_count": 0 }, "schema": { "type": "object", "items": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/MyUser" } } } @@ -3464,7 +3686,9 @@ "/api/users/{id}": { "get": { "summary": "A User", - "tags": ["users"], + "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": [ @@ -3485,7 +3709,7 @@ "schema": { "type": "object", "items": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/ExtendedUser" } } } @@ -3497,7 +3721,9 @@ "/api/users/{id}/unpublish": { "put": { "summary": "Unpublish a User's Articles and Comments", - "tags": ["users"], + "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": [ @@ -3546,10 +3772,14 @@ "/api/admin/users": { "post": { "summary": "Invite a User", - "tags": ["users"], + "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": [], + "parameters": [ + + ], "responses": { "200": { "description": "Successful" @@ -3591,8 +3821,13 @@ "/api/videos": { "get": { "summary": "Articles with a video", - "tags": ["videos", "articles"], - "security": [], + "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": [ @@ -3611,28 +3846,28 @@ "example": [ { "type_of": "video_article", - "id": 71, - "path": "/username223/this-side-of-paradise32-6oo", + "id": 121, + "path": "/username223/jesting-pilate32-2d06", "cloudinary_video_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/thumbs-video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f-00001.png", - "title": "This Side of Paradise32", - "user_id": 290, + "title": "Jesting Pilate32", + "user_id": 334, "video_duration_in_minutes": "00:00", "video_source_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f.m3u8", "user": { - "name": "Chelsea \"Brynn\" \\:/ Kutch" + "name": "Newton \"Ellis\" \\:/ Strosin" } }, { "type_of": "video_article", - "id": 72, - "path": "/username224/all-the-kings-men33-17md", + "id": 122, + "path": "/username224/from-here-to-eternity33-11cg", "cloudinary_video_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/thumbs-video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f-00001.png", - "title": "All the King's Men33", - "user_id": 291, + "title": "From Here to Eternity33", + "user_id": 335, "video_duration_in_minutes": "00:00", "video_source_url": "https://dw71fyauz7yz9.cloudfront.net/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f/video-upload__1e42eb0bab4abb3c63baeb5e8bdfe69f.m3u8", "user": { - "name": "Yesenia \"Ceola\" \\:/ Wolf" + "name": "Ashley \"Ellan\" \\:/ Schaefer" } } ], @@ -3657,7 +3892,9 @@ ], "security": [ { - "api-key": [] + "api-key": [ + + ] } ], "components": { @@ -4052,7 +4289,11 @@ "format": "float" } }, - "required": ["id", "name", "points"] + "required": [ + "id", + "name", + "points" + ] }, "Tag": { "description": "Representation of a tag", @@ -4122,7 +4363,12 @@ "description": "Controls what kind of layout the page is rendered in" } }, - "required": ["title", "slug", "description", "template"] + "required": [ + "title", + "slug", + "description", + "template" + ] }, "PodcastEpisodeIndex": { "description": "Representation of a podcast episode returned in a list", @@ -4245,7 +4491,7 @@ } }, "User": { - "description": "The representation of a user", + "description": "The representation of a user returned in a list", "type": "object", "properties": { "type_of": { @@ -4287,6 +4533,119 @@ } } }, + "ExtendedUser": { + "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" + }, + "email": { + "type": "string", + "nullable": true, + "description": "Email (if user allows displaying email on their profile) or nil" + }, + "website_url": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "joined_at": { + "type": "string" + }, + "profile_image": { + "type": "string" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "ids of the badges awarded to the user" + } + } + }, + "MyUser": { + "description": "The representation of a user when accessed by themselves", + "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" + }, + "email": { + "type": "string", + "nullable": true, + "description": "Email (if user allows displaying email on their profile) or nil" + }, + "website_url": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "joined_at": { + "type": "string" + }, + "profile_image": { + "type": "string" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "ids of the badges awarded to the user" + }, + "followers_count": { + "type": "integer" + } + } + }, "SharedPodcast": { "description": "The podcast that the resource belongs to", "type": "object", @@ -4427,18 +4786,30 @@ }, "display_to": { "type": "string", - "enum": ["all", "logged_in", "logged_out"], + "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"], + "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" } }, - "required": ["name", "body_markdown", "placement_area"] + "required": [ + "name", + "body_markdown", + "placement_area" + ] }, "Segment": { "description": "A manually managed audience segment", @@ -4450,7 +4821,9 @@ }, "type_of": { "type": "string", - "enum": ["manual"], + "enum": [ + "manual" + ], "default": "manual", "description": "Marks the segment as manually managed (other types are internal)" }, @@ -4474,4 +4847,4 @@ } } } -} +} \ No newline at end of file