Class: Ecoportal::API::GraphQL::Builder::Template
- Inherits:
-
Object
- Object
- Ecoportal::API::GraphQL::Builder::Template
- Defined in:
- lib/ecoportal/api/graphql/builder/template.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #create(commands:, &block) ⇒ Object
- #create_related_page(template_id:, title:, register_id:, patch_ver:, filters: nil, &block) ⇒ Object
- #destroy_related_page(template_id:, id:, patch_ver:, &block) ⇒ Object
-
#initialize(client) ⇒ Template
constructor
A new instance of Template.
- #publish(id:, &block) ⇒ Object
- #unpublish(id:, &block) ⇒ Object
- #update(model, commands:, patch_ver: model.patchVer, &block) ⇒ Object
- #update_information(id:, **kargs, &block) ⇒ Object
Constructor Details
#initialize(client) ⇒ Template
Returns a new instance of Template.
8 9 10 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 8 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 6 def client @client end |
Instance Method Details
#create(commands:, &block) ⇒ Object
12 13 14 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 12 def create(commands:, &block) createMutation.query(commands: commands, &block) end |
#create_related_page(template_id:, title:, register_id:, patch_ver:, filters: nil, &block) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 32 def (template_id:, title:, register_id:, patch_ver:, filters: nil, &block) .query( template_id: template_id, title: title, register_id: register_id, patch_ver: patch_ver, filters: filters, &block ) end |
#destroy_related_page(template_id:, id:, patch_ver:, &block) ⇒ Object
43 44 45 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 43 def (template_id:, id:, patch_ver:, &block) .query(template_id: template_id, id: id, patch_ver: patch_ver, &block) end |
#publish(id:, &block) ⇒ Object
20 21 22 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 20 def publish(id:, &block) publishMutation.query(id: id, &block) end |
#unpublish(id:, &block) ⇒ Object
24 25 26 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 24 def unpublish(id:, &block) unpublishMutation.query(id: id, &block) end |
#update(model, commands:, patch_ver: model.patchVer, &block) ⇒ Object
16 17 18 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 16 def update(model, commands:, patch_ver: model.patchVer, &block) updateMutation.query(id: model.id, patch_ver: patch_ver, commands: commands, &block) end |
#update_information(id:, **kargs, &block) ⇒ Object
28 29 30 |
# File 'lib/ecoportal/api/graphql/builder/template.rb', line 28 def update_information(id:, **kargs, &block) updateInformationMutation.query(id: id, **kargs, &block) end |