jdolitsky / AppDotNetPHP

PHP library for the App.net Stream API
34 stars 19 forks source link

Mute / Unmute / Muted #9

Closed ghost closed 12 years ago

ghost commented 12 years ago

I thought that you had added these... anyway I hacked these together but I am getting inconsistent results with Unmute... maybe it needs curl magic.

Cheers

// Mute user
function muteUser($user_id=null) {
    return $this->httpPost($this->_baseUrl.'users/'.$user_id.'/mute');
}   

//Unmute user
function unmuteUser($user_id=null) {
    return $this->httpDelete($this->_baseUrl.'users/'.$user_id.'/unmute');
}       

//List Muted
// Returns an array of User objects for users following the specified user.
function getMuted($user_id='me',$count=20,$before_id=null,$since_id=null) {
    return $this->httpGet($this->_baseUrl.'users/'.$user_id.'/muted?count='.$count.'&before_id='.$before_id.'&since_id='.$since_id);
}
jdolitsky commented 12 years ago

great stuff, i've committed these functions. the problem w/ unmuteUser was it was using the word 'unmute' in the url instead of 'mute'