PHP code example of kuredev / qiita-php-wrapper

1. Go to this page and download the library: Download kuredev/qiita-php-wrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kuredev / qiita-php-wrapper example snippets


composer 


ssToken = "xxxxxxxxxxxxxx";

try{
    $qiita = new \Kuredev\Qiita($accessToken);

    //sample code
    var_dump($qiita->get->users());
    $arr = array();
    var_dump($qiita->put->userFollowing("kure", json_encode($arr)));
    var_dump($qiita->get->tagsItem("api"));
    $comment = array("body" => "testtest2");
    var_dump($qiita->post->comment("xxxxx", json_encode($comment)));
}catch(Exception $e){
    var_dump($e->getMessage());
}