feat: Added updatePartial endpoint

This commit is contained in:
Deven Joshi
2021-02-18 18:14:12 +05:30
parent 779c6f46f3
commit ac21bc27ff
3 changed files with 38 additions and 0 deletions
@@ -394,6 +394,13 @@ class Channel {
return _client.decode(response.data, UpdateChannelResponse.fromJson);
}
/// Edit the channel custom data
Future<PartialUpdateChannelResponse> updatePartial(
Map<String, dynamic> channelData) async {
final response = await _client.patch(_channelURL, data: channelData);
return _client.decode(response.data, PartialUpdateChannelResponse.fromJson);
}
/// Delete this channel. Messages are permanently removed.
Future<EmptyResponse> delete() async {
final response = await _client.delete(_channelURL);