পোস্ট: getByPath

পথ দ্বারা একটি পোস্ট পুনরুদ্ধার. এখন এটি চেষ্টা করুন বা একটি উদাহরণ দেখুন

পোস্টটি ব্যক্তিগত ব্লগে থাকলে অনুমোদনের প্রয়োজন হয়।

একটি পোস্টের পথ হল হোস্টের পরে পোস্ট URL এর অংশ। উদাহরণস্বরূপ, http://code.blogger.com/2011/09/blogger-json-api-now-available.html URL সহ একটি ব্লগ পোস্টে /2011/09/blogger-json-api-now-available.html এর একটি পথ রয়েছে /2011/09/blogger-json-api-now-available.html

অনুরোধ

HTTP অনুরোধ

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

পরামিতি

পরামিতি নাম মান বর্ণনা
প্রয়োজনীয় পরামিতি
blogId string ব্লগের আইডি থেকে পোস্টটি আনতে হবে।
path string পোস্টের পথ উদ্ধার করতে হবে।
ঐচ্ছিক পরামিতি
maxComments unsigned integer একটি পোস্টের জন্য পুনরুদ্ধার করতে মন্তব্যের সর্বাধিক সংখ্যা৷ যদি এই প্যারামিটারটি অনির্দিষ্ট রেখে দেওয়া হয়, পোস্ট সংস্থানের অংশ হিসাবে কোনও মন্তব্য ফেরত দেওয়া হবে না।
view string

গ্রহণযোগ্য মান হল:
  • " ADMIN ": অ্যাডমিন স্তরের বিশদ
  • " AUTHOR ": লেখক স্তরের বিশদ
  • " READER ": অ্যাডমিন স্তরের বিশদ

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

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

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

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

উদাহরণ

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

জাভা

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

// The BlogId for the http://buzz.blogger.com/ blog.
String BUZZ_BLOG_ID = "2399
953";
// The URL path component for a
buzz post.String BUZZ_POST_PATH = "/2012/01/engage-with-your-readers
-through.html";
// Configure the Java API Client for
Installed Native AppHttpTransport HTTP_TRANSPORT = new
NetHttpTransport();JsonFactory JSON_FACTORY = n
ew JacksonFactory();
// Configure the Instal
led App OAuth2 flow.Credential credential = OAuth2Native.autho
rize(HTTP_TRANSPORT, JSON_FACTORY, new Lo
calServerReceiver(), Arrays.asList(Blog
gerScopes.BLOGGER)); // Construct the Blogger API a
ccess facade object.Blogger blogger = Blogger.builder(HTTP_TRAN
SPORT, JSON_FACTORY) .setApplicationName("Blogger-Pos
tsGetByPath-Snippet/1.0") .setHttpRequestIn
itializer(credential).b
uild();
// The request action.GetByPath postsGetByPathAction = blogger.po
sts().getByPath(BUZZ_BLOG_ID);postsGetByPathA
ction.setPath(BUZZ_POST_PATH);
// Restrict the result con
tent to just the data we need.postsGetByPathAction.setFiel
ds("content,published,title");
// Th
is step sends the request to the server.Pos
t post = postsGetByPathAction.execute
();
// Now we can navigate the response.System.o
ut.println("Title: " + post.getTitle());System
.out.println("Published: " + post.getPublished());System.out.println("Content: " + post.getContent());

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

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