ContentType

View as Markdown

ContentType

ContentType provides Entry and Query instance.

query

We can query on entry of specified ContentType

import contentstack;

stack = contentstack.Stack(api_key, delivery_token, environment);

content_type = stack.content_type('content_type_uid')

query = content_type.query()

fetch

This method is useful to fetch ContentType of the stack

import contentstack;

stack = contentstack.Stack(api_key, delivery_token, environment);

content_type = stack.content_type('content_type_uid')

response = content_type.fetch()

find

This method is useful to fetch ContentType of the of the stack.

import contentstack;

stack = contentstack.Stack(api_key, delivery_token, environment);

content_type = stack.content_type('content_type_uid')

response = content_type.find()

entry

An entry is the actual piece of content created using one of the defined content types

import contentstack;

stack = contentstack.Stack(api_key, delivery_token, environment);

content_type = stack.content_type('content_type_uid')

entry = content_type.entry(uid='entry_uid')