projectal.entities.project_template

 1from projectal import api
 2from projectal.entity import Entity
 3from projectal.linkers import *
 4
 5class ProjectTemplate(Entity, NoteLinker, TagLinker):
 6    """
 7    Implementation of the
 8    [Project Template](https://projectal.com/docs/latest/#tag/Project-Template) API.
 9    """
10    _path = 'template/project'
11    _name = 'project_template'
12    _links = [NoteLinker, TagLinker]
13
14    @classmethod
15    def autoschedule(cls, project, mode='ASAP'):
16        """
17        Autoschedule the project template.
18
19        `project`: A ProjectTemplate entity
20
21        `mode`: `ASAP` or `ALAP`
22        """
23        url = '/api/template/project/schedule?mode={}'.format(mode)
24        api.post(url, [project])
25        return True
 6class ProjectTemplate(Entity, NoteLinker, TagLinker):
 7    """
 8    Implementation of the
 9    [Project Template](https://projectal.com/docs/latest/#tag/Project-Template) API.
10    """
11    _path = 'template/project'
12    _name = 'project_template'
13    _links = [NoteLinker, TagLinker]
14
15    @classmethod
16    def autoschedule(cls, project, mode='ASAP'):
17        """
18        Autoschedule the project template.
19
20        `project`: A ProjectTemplate entity
21
22        `mode`: `ASAP` or `ALAP`
23        """
24        url = '/api/template/project/schedule?mode={}'.format(mode)
25        api.post(url, [project])
26        return True

Implementation of the Project Template API.

@classmethod
def autoschedule(cls, project, mode='ASAP'):
15    @classmethod
16    def autoschedule(cls, project, mode='ASAP'):
17        """
18        Autoschedule the project template.
19
20        `project`: A ProjectTemplate entity
21
22        `mode`: `ASAP` or `ALAP`
23        """
24        url = '/api/template/project/schedule?mode={}'.format(mode)
25        api.post(url, [project])
26        return True

Autoschedule the project template.

project: A ProjectTemplate entity

mode: ASAP or ALAP