Example #1
0
 /**
  * ツイートを更新
  * @param	Model	$Model
  * @param	boolean	$status
  * @return	mixed	成功時:XML / 失敗時:エラーメッセージ
  */
 function update(&$Model, $status)
 {
     if (mb_strlen($status, 'UTF-8') > 140) {
         return false;
     }
     return $this->consumer->post($this->accessTokenKey, $this->accessTokenSecret, $this->updateUri, array('status' => $status));
 }
Example #2
0
$app->group('/Consumer', function () use($app) {
    #
    # ������ע�ᡪ������Ϣ
    #
    # POST https://<endpoint>/Consumer/BasicInfo/
    #
    # Request Body
    # {
    #  "LoginName":"��¼����֧���ֻ����ʼ�",
    #  "Password":"******",
    #  "DisplayName":"��ʾ����"
    # }
    #
    $app->post('/BasicInfo/', function () use($app) {
        $consumer = new Consumer($app);
        echo $consumer->post();
    });
    #
    # �������޸ġ�������Ϣ
    #
    # PUT https://<endpoint>/Consumer/BasicInfo/[ConsumerId]
    #
    $app->put('/BasicInfo/:ConsumerId', function ($ConsumerId) use($app) {
        $consumer = new Consumer($app);
        echo $consumer->put_ConsumerId($ConsumerId);
    });
    #
    # 修改密码
    #
    # PUT https://<endpoint>/Consumer/Password/[ConsumerId]
    $app->put('/Password/:ProducerId', function ($ConsumerId) use($app) {