From 348e4e2527615708b5b7eff51b1a3c1bf298f00d Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:39:16 +0000 Subject: [PATCH] Update medium_client.go --- pkg/client/medium_client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 9984503..600c700 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -34,9 +34,11 @@ func PostData(postId string) (*entities.MediumResponse, error) { // http client to post data urlreq := "https://medium.com/_/graphql" method := "POST" - + payload := strings.NewReader(fmt.Sprintf("{\"query\":\"query {\\n post(id: \\\"%s\\\") {\\n title\\n createdAt\\n creator {\\n id\\n name\\n }\\n content {\\n bodyModel {\\n paragraphs {\\n name\\n text\\n type\\n href\\n layout\\n markups {\\n title\\n type\\n href\\n userId\\n start\\n end\\n anchorType\\n }\\n iframe {\\n mediaResource {\\n href\\n iframeSrc\\n iframeWidth\\n iframeHeight\\n }\\n }\\n metadata {\\n id\\n originalWidth\\n originalHeight\\n }\\n }\\n }\\n }\\n }\\n }\",\"variables\":{}}", postId)) + log.Printf("Article ID: %s", postId) + log.Printf("PAYLOAD: %s", payload) var client *http.Client