Class: Contentful::Scheduler::Tasks::Publish

Inherits:
Object
  • Object
show all
Defined in:
lib/contentful/scheduler/tasks/publish.rb

Class Method Summary collapse

Class Method Details

.perform(space_id, entry_id, token) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/contentful/scheduler/tasks/publish.rb', line 9

def self.perform(space_id, entry_id, token)
  client = ::Contentful::Management::Client.new(
    token,
    raise_errors: true,
    application_name: 'contentful-scheduler',
    application_version: Contentful::Scheduler::VERSION
  )
  client.entries.find(space_id, entry_id).publish
end