tnzapi


Nametnzapi JSON
Version 2.3.0.2 PyPI version JSON
download
home_pagehttps://www.tnz.co.nz
SummaryTNZ REST API Helper Library for Python
upload_time2023-10-18 05:29:58
maintainer
docs_urlNone
authorTNZ Group Limited
requires_python
licenseMIT
keywords tnz api sms fax email voice tts
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tnzapi

## Documentation

The documentation for the TNZ API can be found [here][apidocs].

## Versions

`tnzapi` uses a modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details.

### Supported Python Versions

This library supports the following Python implementations:

* Python 3.9
* Python 3.10
* Python 3.11

## Installation

Install from PyPi using [pip](http://www.pip-installer.org/en/latest/), a
package manager for Python.

    pip install tnzapi

Don't have pip installed? Try installing it, by running this from the command
line:

    $ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

    python setup.py install

You may need to run the above commands with `sudo`.

## Getting Started

Getting started with the TNZ API couldn't be easier. Create a
`Client` and you're ready to go.

### API Credentials

The `TNZAPI` needs your TNZ API credentials (TNZ Auth Tokens). You can either pass these
directly to the constructor (see the code below) or via environment variables.

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken = "[Your Auth Token]"
)
```

### Send Message

Send SMS/Email/Voice/Fax through `tnzapi` library.

#### Send SMS

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Messaging.SMS.SendMessage(
    Reference="Test",
    MessageText = "Test SMS Message click [[Reply]] to opt out",
    Recipients = ["+64211231234"],
)

print(response)
```

#### Send an Email

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Messaging.Email.SendMessage(
    EmailSubject = "Test Email",
    Recipients = [
        "recipient@example.com"
    ],
    MessagePlain = "Hi world!"
)

print(response)
```

#### Send a Fax Document

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Messaging.Fax.SendMessage(
    Recipients = "+6491232345",
    Attachments = ["C:\\Document.pdf"]
)

print(response)
```

#### Make a Call - Text-to-Speech (TTS)

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Messaging.TTS.SendMessage(
    Recipients = ["+64211232345"],
    Reference = "Voice Test - 64211232345",
    MessageToPeople = "Hi there!",
    Keypads = [
        Keypad(
            Tone=1,
            Play="You pressed 1",
            RouteNumber="+6491232345"
        )
    ]
)

print(response)
```

#### Make a Call - Upload MP3 / Wav File

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Messaging.Voice.SendMessage(
    Recipients = ["+64211232345"],
    Reference = "Voice Test - 64211232345",
    MessageToPeople = "C:\\file1.wav",
    MessageToAnswerPhones = "C:\\file2.wav",
    Keypads = [
        Keypad(
            Tone=1,
            RouteNumber="+6491232345",
            PlayFile="C:\\file3.wav"
        )
    ]
)

print(response)
```

### Reports

Retrieve your message status using `tnzapi` library.

#### Reports - Get Message Status

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Reports.Status.Poll(
    MessageID="ID123456"
)

print(response)
```

#### Reports - Get SMS Reply

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

request = client.Reports.SMSReply.Poll(
    MessageID="ID123456"
)

print(response)
```

#### Reports - Get SMS Received List

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Reports.SMSReceived.Poll(
    #TimePeriod = 1440
    DateFrom="2023-07-01 00:00:00",
    DateTo="2023-08-01 00:00:00"
)

print(response)
```

### Actions

Amend your message using `tnzapi` library.

#### Actions - Abort Pending/Delayed Job

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Actions.Abort.SendRequest(
    MessageID="ID123456"
)

print(response)
```

#### Actions - Resubmit Failed Job

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Actions.Resubmit.SendRequest(
    MessageID="ID123456",
    SendTime="2023-07-10T09:00"    #optional
)

print(response)
```

#### Actions - Reschedule DELAYED Job

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Actions.Reschedule.SendRequest(
    MessageID="ID123456",
    SendTime=datetime.now()
)

print(response)
```

#### Actions - Set Number of Operators on TTS/Voice Job

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

request = client.Set.Pacing(
    MessageID="ID123456",
    NumberOfOperators=10
)

print(response)
```

### Addressbook - Contacts

Manage your contacts using `tnzapi` library.

#### Contacts - List

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Contact.List(
    RecordsPerPage=10,
    Page=1
)

print(response)
```

#### Contacts - Detail

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Contact.Detail(
    ContactID="[Contact ID]"
)

print(response)
```

#### Contacts - Create

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Contact.Create(
    Title="Mr",
    Company="TNZ Group",
    FirstName="First",
    LastName="Last",
    MobilePhone="+642122223333",
    ViewPublic="Account",
    EditPublid="Account"
)

print(response)
```

#### Contacts - Update

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Contact.Update(
    ContactID="[Contact ID]",
    Attention="Test Attention"
)

print(response)
```

#### Contacts - Delete

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Contact.Delete(
    ContactID="[Contact ID]"
)

print(response)
```

### Addressbook - Contact Group

Manage your contact group relationship using `tnzapi` library.

#### Contact Group - List

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.ContactGroup.List(
    RecordsPerPage=10,
    Page=1,
    ContactID="[Contact ID]"
)

print(response)
```

#### Contact Group - Detail

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.ContactGroup.Detail(
    ContactID="[Contact ID]",
    GroupCode="[Group Code]"
)

print(response)
```

#### Contact Group - Create

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.ContactGroup.Create(
    ContactID="[Contact ID]",
    GroupCode="[Group Code]"
)

print(response)
```

#### Contact Group - Delete

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.ContactGroup.Delete(
    ContactID="[Contact ID]",
    GroupCode="[Group Code]"
)

print(response)
```

### Addressbook - Group

Manage your group using `tnzapi` library.

#### Group - List

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Group.List(
    RecordsPerPage=10,
    Page=1
)

print(response)
```

#### Group - Detail

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Group.Detail(
    GroupCode="[Group Code]"
)

print(response)
```

#### Group - Create

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Group.Create(
    GroupCode="[Group Code]",
    GroupName="[Group Name]"
)

print(response)
```

#### Group - Update

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Group.Update(
    GroupCode="[Group Code]",
    GroupName="[Group Name]"
)

print(response)
```

#### Group - Delete

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.Group.Delete(
    GroupCode="[Group Code]"
)

print(response)
```

### Addressbook - Group Contact

Manage your group contact relationship using `tnzapi` library.

#### Group Contact - List

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.GroupContact.List(
    RecordsPerPage=10,
    Page=1,
    GroupCode="[Group Code]"
)

print(response)
```

#### Group Contact - Detail

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.GroupContact.Detail(
    GroupCode="[Group Code]",
    ContactID="[Contact ID]"
)

print(response)
```

#### Group Contact - Create

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.GroupContact.Create(
    GroupCode="[Group Code]",
    ContactID="[Contact ID]"
)

print(response)
```

#### Group Contact - Delete

```python
from tnzapi import TNZAPI

client = TNZAPI(
    AuthToken="[Your Auth Token]"
)

response = client.Addressbook.GroupContact.Delete(
    GroupCode="[Group Code]",
    ContactID="[Contact ID]"
)

print(response)
```

### Getting help

If you need help installing or using the library, please check the [TNZ Contact](https://www.tnz.co.nz/About/Contact/) if you don't find an answer to your question.

[apidocs]: https://www.tnz.co.nz/Docs/PythonAPI/
            

Raw data

            {
    "_id": null,
    "home_page": "https://www.tnz.co.nz",
    "name": "tnzapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tnz,api,sms,fax,email,voice,tts",
    "author": "TNZ Group Limited",
    "author_email": "support@tnz.co.nz",
    "download_url": "https://files.pythonhosted.org/packages/84/e0/9e2b17309f6247236d2d9d18b098869ad93a924a65a722cf624cd55d70d5/tnzapi-2.3.0.2.tar.gz",
    "platform": null,
    "description": "# tnzapi\n\n## Documentation\n\nThe documentation for the TNZ API can be found [here][apidocs].\n\n## Versions\n\n`tnzapi` uses a modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details.\n\n### Supported Python Versions\n\nThis library supports the following Python implementations:\n\n* Python 3.9\n* Python 3.10\n* Python 3.11\n\n## Installation\n\nInstall from PyPi using [pip](http://www.pip-installer.org/en/latest/), a\npackage manager for Python.\n\n    pip install tnzapi\n\nDon't have pip installed? Try installing it, by running this from the command\nline:\n\n    $ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python\n\n    python setup.py install\n\nYou may need to run the above commands with `sudo`.\n\n## Getting Started\n\nGetting started with the TNZ API couldn't be easier. Create a\n`Client` and you're ready to go.\n\n### API Credentials\n\nThe `TNZAPI` needs your TNZ API credentials (TNZ Auth Tokens). You can either pass these\ndirectly to the constructor (see the code below) or via environment variables.\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken = \"[Your Auth Token]\"\n)\n```\n\n### Send Message\n\nSend SMS/Email/Voice/Fax through `tnzapi` library.\n\n#### Send SMS\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Messaging.SMS.SendMessage(\n    Reference=\"Test\",\n    MessageText = \"Test SMS Message click [[Reply]] to opt out\",\n    Recipients = [\"+64211231234\"],\n)\n\nprint(response)\n```\n\n#### Send an Email\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Messaging.Email.SendMessage(\n    EmailSubject = \"Test Email\",\n    Recipients = [\n        \"recipient@example.com\"\n    ],\n    MessagePlain = \"Hi world!\"\n)\n\nprint(response)\n```\n\n#### Send a Fax Document\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Messaging.Fax.SendMessage(\n    Recipients = \"+6491232345\",\n    Attachments = [\"C:\\\\Document.pdf\"]\n)\n\nprint(response)\n```\n\n#### Make a Call - Text-to-Speech (TTS)\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Messaging.TTS.SendMessage(\n    Recipients = [\"+64211232345\"],\n    Reference = \"Voice Test - 64211232345\",\n    MessageToPeople = \"Hi there!\",\n    Keypads = [\n        Keypad(\n            Tone=1,\n            Play=\"You pressed 1\",\n            RouteNumber=\"+6491232345\"\n        )\n    ]\n)\n\nprint(response)\n```\n\n#### Make a Call - Upload MP3 / Wav File\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Messaging.Voice.SendMessage(\n    Recipients = [\"+64211232345\"],\n    Reference = \"Voice Test - 64211232345\",\n    MessageToPeople = \"C:\\\\file1.wav\",\n    MessageToAnswerPhones = \"C:\\\\file2.wav\",\n    Keypads = [\n        Keypad(\n            Tone=1,\n            RouteNumber=\"+6491232345\",\n            PlayFile=\"C:\\\\file3.wav\"\n        )\n    ]\n)\n\nprint(response)\n```\n\n### Reports\n\nRetrieve your message status using `tnzapi` library.\n\n#### Reports - Get Message Status\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Reports.Status.Poll(\n    MessageID=\"ID123456\"\n)\n\nprint(response)\n```\n\n#### Reports - Get SMS Reply\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nrequest = client.Reports.SMSReply.Poll(\n    MessageID=\"ID123456\"\n)\n\nprint(response)\n```\n\n#### Reports - Get SMS Received List\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Reports.SMSReceived.Poll(\n    #TimePeriod = 1440\n    DateFrom=\"2023-07-01 00:00:00\",\n    DateTo=\"2023-08-01 00:00:00\"\n)\n\nprint(response)\n```\n\n### Actions\n\nAmend your message using `tnzapi` library.\n\n#### Actions - Abort Pending/Delayed Job\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Actions.Abort.SendRequest(\n    MessageID=\"ID123456\"\n)\n\nprint(response)\n```\n\n#### Actions - Resubmit Failed Job\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Actions.Resubmit.SendRequest(\n    MessageID=\"ID123456\",\n    SendTime=\"2023-07-10T09:00\"    #optional\n)\n\nprint(response)\n```\n\n#### Actions - Reschedule DELAYED Job\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Actions.Reschedule.SendRequest(\n    MessageID=\"ID123456\",\n    SendTime=datetime.now()\n)\n\nprint(response)\n```\n\n#### Actions - Set Number of Operators on TTS/Voice Job\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nrequest = client.Set.Pacing(\n    MessageID=\"ID123456\",\n    NumberOfOperators=10\n)\n\nprint(response)\n```\n\n### Addressbook - Contacts\n\nManage your contacts using `tnzapi` library.\n\n#### Contacts - List\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Contact.List(\n    RecordsPerPage=10,\n    Page=1\n)\n\nprint(response)\n```\n\n#### Contacts - Detail\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Contact.Detail(\n    ContactID=\"[Contact ID]\"\n)\n\nprint(response)\n```\n\n#### Contacts - Create\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Contact.Create(\n    Title=\"Mr\",\n    Company=\"TNZ Group\",\n    FirstName=\"First\",\n    LastName=\"Last\",\n    MobilePhone=\"+642122223333\",\n    ViewPublic=\"Account\",\n    EditPublid=\"Account\"\n)\n\nprint(response)\n```\n\n#### Contacts - Update\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Contact.Update(\n    ContactID=\"[Contact ID]\",\n    Attention=\"Test Attention\"\n)\n\nprint(response)\n```\n\n#### Contacts - Delete\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Contact.Delete(\n    ContactID=\"[Contact ID]\"\n)\n\nprint(response)\n```\n\n### Addressbook - Contact Group\n\nManage your contact group relationship using `tnzapi` library.\n\n#### Contact Group - List\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.ContactGroup.List(\n    RecordsPerPage=10,\n    Page=1,\n    ContactID=\"[Contact ID]\"\n)\n\nprint(response)\n```\n\n#### Contact Group - Detail\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.ContactGroup.Detail(\n    ContactID=\"[Contact ID]\",\n    GroupCode=\"[Group Code]\"\n)\n\nprint(response)\n```\n\n#### Contact Group - Create\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.ContactGroup.Create(\n    ContactID=\"[Contact ID]\",\n    GroupCode=\"[Group Code]\"\n)\n\nprint(response)\n```\n\n#### Contact Group - Delete\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.ContactGroup.Delete(\n    ContactID=\"[Contact ID]\",\n    GroupCode=\"[Group Code]\"\n)\n\nprint(response)\n```\n\n### Addressbook - Group\n\nManage your group using `tnzapi` library.\n\n#### Group - List\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Group.List(\n    RecordsPerPage=10,\n    Page=1\n)\n\nprint(response)\n```\n\n#### Group - Detail\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Group.Detail(\n    GroupCode=\"[Group Code]\"\n)\n\nprint(response)\n```\n\n#### Group - Create\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Group.Create(\n    GroupCode=\"[Group Code]\",\n    GroupName=\"[Group Name]\"\n)\n\nprint(response)\n```\n\n#### Group - Update\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Group.Update(\n    GroupCode=\"[Group Code]\",\n    GroupName=\"[Group Name]\"\n)\n\nprint(response)\n```\n\n#### Group - Delete\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.Group.Delete(\n    GroupCode=\"[Group Code]\"\n)\n\nprint(response)\n```\n\n### Addressbook - Group Contact\n\nManage your group contact relationship using `tnzapi` library.\n\n#### Group Contact - List\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.GroupContact.List(\n    RecordsPerPage=10,\n    Page=1,\n    GroupCode=\"[Group Code]\"\n)\n\nprint(response)\n```\n\n#### Group Contact - Detail\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.GroupContact.Detail(\n    GroupCode=\"[Group Code]\",\n    ContactID=\"[Contact ID]\"\n)\n\nprint(response)\n```\n\n#### Group Contact - Create\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.GroupContact.Create(\n    GroupCode=\"[Group Code]\",\n    ContactID=\"[Contact ID]\"\n)\n\nprint(response)\n```\n\n#### Group Contact - Delete\n\n```python\nfrom tnzapi import TNZAPI\n\nclient = TNZAPI(\n    AuthToken=\"[Your Auth Token]\"\n)\n\nresponse = client.Addressbook.GroupContact.Delete(\n    GroupCode=\"[Group Code]\",\n    ContactID=\"[Contact ID]\"\n)\n\nprint(response)\n```\n\n### Getting help\n\nIf you need help installing or using the library, please check the [TNZ Contact](https://www.tnz.co.nz/About/Contact/) if you don't find an answer to your question.\n\n[apidocs]: https://www.tnz.co.nz/Docs/PythonAPI/",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "TNZ REST API Helper Library for Python",
    "version": "2.3.0.2",
    "project_urls": {
        "Homepage": "https://www.tnz.co.nz"
    },
    "split_keywords": [
        "tnz",
        "api",
        "sms",
        "fax",
        "email",
        "voice",
        "tts"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "84e09e2b17309f6247236d2d9d18b098869ad93a924a65a722cf624cd55d70d5",
                "md5": "1e6b4762c19c055d5fa8ba75d80daf8d",
                "sha256": "74169baadcf7a1f7fa9a91685723b7e0b8428a54ef4f2582fdac6741399c1eeb"
            },
            "downloads": -1,
            "filename": "tnzapi-2.3.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1e6b4762c19c055d5fa8ba75d80daf8d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 39819,
            "upload_time": "2023-10-18T05:29:58",
            "upload_time_iso_8601": "2023-10-18T05:29:58.355249Z",
            "url": "https://files.pythonhosted.org/packages/84/e0/9e2b17309f6247236d2d9d18b098869ad93a924a65a722cf624cd55d70d5/tnzapi-2.3.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-18 05:29:58",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tnzapi"
}
        
Elapsed time: 0.13798s