getTopicForContent static method

Future<Int64Response> getTopicForContent(
  1. HttpClient client,
  2. String contentId
)

Gets the post Id for the given content item's comments, if it exists.

Implementation

static Future<Int64Response> getTopicForContent (
    HttpClient client,
    String contentId,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _contentId = '$contentId';
    final HttpClientConfig config = HttpClientConfig('GET', '/Forum/GetTopicForContent/$_contentId/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return Int64Response.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}