README包含幾個使用curb-fu的例子。還有一個YARD-generated API documentation可用。
這對我來說似乎很簡單。
這個PHP示例
<?php
$ch=curl_init('https://app.grouptexting.com/api/sending');
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"user=username&pass=userpassword&phonenumber= 2125551234&subject=test&message=test message");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
print($data); /* result of API call*/
?>
在
紅寶石+遏制-FU轉變成
response = CurbFu.post('https://app.grouptexting.com/api/sending', {
:user => "username", :pass => "userpassword",
:phonenumber => "2125551234", :subject => "test",
:message => "test message"
})
puts response.body