Selamlar arkadaşlar. artdarek paketi blogger'a nasıl yeni konu açabileceğimi çözemedim. Paketi kullanarak daha önce benzeri bir işlem yapmış olan var mı? GET türü requestler sorunsuz çalışıyor. Ancak POST işin içine girince şaşırdım biraz.
$googleService->request( 'https://www.googleapis.com/blogger/v3/blogs/BLOG-IDSI-BURADA/posts/', 'POST');
yukarıdaki satırla boş konu açabiliyorum. POST parametresinden sonra $body verisi göndererek yapılacak sanırım ama body'yi nasıl oluşturacağımı bulamadım. Blogger dokümantasyonunda
Adding a post
You can add a post for a blog by sending a POST request to the post collection URI with a post JSON body:
https://www.googleapis.com/blogger/v3/blogs/blogId/posts/
Request
POST https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/
Authorization: /* OAuth 2.0 token here */
Content-Type: application/json
{
"kind": "blogger#post",
"blog": {
"id": "8070105920543249955"
},
"title": "A new post",
"content": "With <b>exciting</b> content..."
}
You must be authenticated to create a post.
Response
If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post...
Yukarıdaki şekilde bilgi verilmiş. Oradaki gibi bir response body'i artdarek'e nasıl aktarabilirim?