পোস্ট: সন্নিবেশ

অনুমোদন প্রয়োজন

একটি পোস্ট যোগ করে। এখন এটি চেষ্টা করুন বা একটি উদাহরণ দেখুন

অনুরোধ

HTTP অনুরোধ

POST https://www.googleapis.com/blogger/v3/blogs/blogId/posts

পরামিতি

পরামিতি নাম মান বর্ণনা
প্রয়োজনীয় পরামিতি
blogId string ব্লগের আইডিতে পোস্ট যোগ করতে হবে।
ঐচ্ছিক পরামিতি
isDraft boolean একটি খসড়া হিসাবে পোস্ট তৈরি করা হবে কিনা

অনুমোদন

এই অনুরোধের জন্য নিম্নলিখিত স্কোপের মধ্যে অন্তত একটির অনুমোদন প্রয়োজন (প্রমাণিকরণ এবং অনুমোদন সম্পর্কে আরও পড়ুন )।

ব্যাপ্তি
https://www.googleapis.com/auth/blogger

শরীরের অনুরোধ

অনুরোধের অংশে, একটি পোস্ট সংস্থান সরবরাহ করুন।

প্রতিক্রিয়া

সফল হলে, এই পদ্ধতিটি প্রতিক্রিয়া বডিতে একটি পোস্ট সংস্থান প্রদান করে।

উদাহরণ

দ্রষ্টব্য: এই পদ্ধতির জন্য উপলব্ধ কোড উদাহরণগুলি সমস্ত সমর্থিত প্রোগ্রামিং ভাষার প্রতিনিধিত্ব করে না (সমর্থিত ভাষার তালিকার জন্য ক্লায়েন্ট লাইব্রেরি পৃষ্ঠা দেখুন)।

জাভা

জাভা ক্লায়েন্ট লাইব্রেরি ব্যবহার করে

// The BlogId of a test blog.
String TEST_BLOG_ID = "8070105920543249955";
// Configure the Java API Client for Installed Native App
HttpTransport HTTP_TRANSPORT = new NetHttpTransport();
JsonFactory JSON_FACTORY = new JacksonFactory();
// Configure the Installed App OAuth2 flow.
Credential credential = OAuth2Native.authorize(HTTP_TRANSPORT,
JSON_FACTORY, new LocalServerReceiver(),
Arrays.asList(BloggerScopes.BLOGGER));
// Construct the Blogger API access facade object.
Blogger blogger = Blogger.builder(HTTP_TRANSPORT, JSON_FACTORY)
.setApplicationName("Blogger-PostsInsert-Snippet/1.0")
.setHttpRequestInitializer(credential).build();
// Construct a post to insert
Post content = new Post();
content.setTitle("A test post");
content.setContent("With <code>HTML</code> content");
// The request action.
Insert postsInsertAction = blogger.posts()
.insert(TEST_BLOG_ID, content);
// Restrict the result content to just the data we need.
postsInsertAction.setFields("author/displayName,content,published,title,url");
// This step sends the request to the server.
Post post = postsInsertAction.execute();
// Now we can navigate the response.
System.out.println("Title: " + post.getTitle());
System.out.println("Author: " + post.getAuthor().getDisplayName());
System.out.println("Published: " + post.getPublished()); System.out.println("URL: " + post.getUrl()); System.out.println("Content: " + post.getContent());

এটা চেষ্টা করুন!

লাইভ ডেটাতে এই পদ্ধতিতে কল করতে এবং প্রতিক্রিয়া দেখতে নীচের APIs এক্সপ্লোরার ব্যবহার করুন।