File: __init__.py

package info (click to toggle)
python-twilio 9.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,756 kB
  • sloc: python: 8,281; makefile: 65
file content (35 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from warnings import warn

from twilio.rest.content.ContentBase import ContentBase
from twilio.rest.content.v1.content import ContentList
from twilio.rest.content.v1.content_and_approvals import ContentAndApprovalsList
from twilio.rest.content.v1.legacy_content import LegacyContentList


class Content(ContentBase):
    @property
    def contents(self) -> ContentList:
        warn(
            "contents is deprecated. Use v1.contents instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v1.contents

    @property
    def content_and_approvals(self) -> ContentAndApprovalsList:
        warn(
            "content_and_approvals is deprecated. Use v1.content_and_approvals instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v1.content_and_approvals

    @property
    def legacy_contents(self) -> LegacyContentList:
        warn(
            "legacy_contents is deprecated. Use v1.legacy_contents instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v1.legacy_contents