Sha256: 0de614bf1a880b9692b84067a3ff41e14573aad0a03ace9731c4fca3d434de98
Contents?: true
Size: 984 Bytes
Versions: 14
Compression:
Stored size: 984 Bytes
Contents
module Contentful module Management module Resource # Wrapper for Resources with /published API module Publisher # Publishes a resource. # # @return [Contentful::Management::Resource] def publish ResourceRequester.new(client, self.class).publish( self, { space_id: space.id, resource_id: id, suffix: '/published' }, version: sys[:version] ) end # Unpublishes a resource. # # @return [Contentful::Management::Resource] def unpublish ResourceRequester.new(client, self.class).unpublish( self, { space_id: space.id, resource_id: id, suffix: '/published' }, version: sys[:version] ) end # Checks if a resource is published. # # @return [Boolean] def published? sys[:publishedAt] ? true : false end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems