contentType method

ContentType contentType(
  1. [String contentTypeId]
)

ContentType accepts contentTypeId in as the parameter Returns instance of ContentType. contentType takes contentTypeId as optional parameter If you want get one contentType by their content_type_uid

Example:

var stack = contentstack.Stack(apiKey, deliveryToken, environment);
var contentType = stack.contentType('content_type_id');

Implementation

ContentType contentType([String contentTypeId]) {
  return ContentType(contentTypeId, _client);
}