URL দ্বারা একটি ব্লগ পুনরুদ্ধার করে। এখন এটি চেষ্টা করুন বা একটি উদাহরণ দেখুন ।
ব্লগ ব্যক্তিগত হলে অনুমোদন প্রয়োজন. যদি ব্লগটি সর্বজনীন হয়, তবে এই পদ্ধতিটি অনুমোদন ছাড়াই বলা যেতে পারে।
অনুরোধ
HTTP অনুরোধ
GET https://www.googleapis.com/blogger/v3/blogs/byurl
পরামিতি
| পরামিতি নাম | মান | বর্ণনা |
|---|---|---|
| প্রয়োজনীয় পরামিতি | ||
url | string | পুনরুদ্ধার করার জন্য ব্লগের URL। |
শরীরের অনুরোধ
এই পদ্ধতির সাথে একটি অনুরোধ সংস্থা সরবরাহ করবেন না।
প্রতিক্রিয়া
সফল হলে, এই পদ্ধতিটি প্রতিক্রিয়া বডিতে একটি ব্লগ সংস্থান প্রদান করে।
উদাহরণ
দ্রষ্টব্য: এই পদ্ধতির জন্য উপলব্ধ কোড উদাহরণগুলি সমস্ত সমর্থিত প্রোগ্রামিং ভাষার প্রতিনিধিত্ব করে না (সমর্থিত ভাষার তালিকার জন্য ক্লায়েন্ট লাইব্রেরি পৃষ্ঠা দেখুন)।
জাভা
জাভা ক্লায়েন্ট লাইব্রেরি ব্যবহার করে
String CODE_BLOG_URL = "http://code.blogger.com/";
// 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.Blogge
r blogger = Blogger.builder(HTTP_TRANSPORT, JSON_FACTORY) .setA
pplicationName("Blogger-BlogGetByUrl-Snippet/1.0") .setH
ttpRequestInitializer(credential).build(); class="devsite-syntax-c1">// The request action object.GetByU
rl blogGetByUrlAction = blogger.blogs().getByUrl(); class="devsite-syntax-c1">// Configure which blog URL to look up.blogGe
tByUrlAction.setUrl(CODE_BLOG_URL); class="devsite-syntax-c1">// Restrict the result content to just the data we need.blogGe
tByUrlAction.setFields("description,name,posts/totalItems,updated");an> class="devsite-syntax-c1">// This step sends the request to the server.Blog b
log = blogGetByUrlAction.execute(); class="devsite-syntax-c1">// Now we can navigate the response.System
.out.println("Name: " + blog.getName());System
.out.println("Description: " + blog.getDescription());System
.out.println("Post Count: " + blog.getPosts().getTotalItems());System
.out.println("Last Updated: " + blog.getUpdated());
এটা চেষ্টা করুন!
লাইভ ডেটাতে এই পদ্ধতিতে কল করতে এবং প্রতিক্রিয়া দেখতে নীচের APIs এক্সপ্লোরার ব্যবহার করুন।