Skip to content

Commit

Permalink
Add removeMembership method
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryLyu committed Apr 17, 2014
1 parent e09c0f2 commit 759fc81
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/LinguaLeo/wti/WtiApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,20 @@ public function removeInvitation($invitationId)
return $this->request->getResult();
}

/**
* @param $userId
* @return bool|mixed
*/
public function removeMembership($userId)
{
$this->request = $this->builder()
->setMethod(RequestMethod::DELETE)
->setEndpoint('memberships/' . $userId)
->build();
$this->request->run();
return $this->request->getResult();
}

/**
* @return mixed
*/
Expand All @@ -530,4 +544,4 @@ private function builder()
return new WtiRequestBuilder($this->apiKey, $this->resource);
}

}
}

0 comments on commit 759fc81

Please sign in to comment.