getCID function

Future<Message?> getCID({
  1. required String cid,
})

Implementation

Future<Message?> getCID({required String cid}) async {
  try {
    final result = await http.get(path: '/v1/ipfs/$cid');
    if (result == null) {
      return null;
    }
    return Message.fromJson(result);
  } catch (e) {
    throw Exception('[Push SDK] - API getCID: $e');
  }
}