Skip to main content

Python JustClick API

Project description

https://github.com/moshkov/python_justclick

https://img.shields.io/pypi/v/python_justclick.svg https://img.shields.io/pypi/dm/python_justclick.svg https://img.shields.io/pypi/l/python_justclick.svg

Зависимости

  • Python 2.7+

  • requests

Установка

$ pip install python_justclick

Если используется Django, то в настройках проекта можно указать JUSTCLICK_USERNAME и JUSTCLICK_API_KEY.

Описание

Python JustClick API

Позволяет работать с API JustClick. В текущей версии реализовано добавление подписчика в группы (AddLeadToGroup) и проверка статуса членства подписчика в группах (GetLeadGroupStatuses).

Использование

from python_justclick.justclick import JustClickConnection

justClickConnection = JustClickConnection('YOU_JUSTCLICK_USERNAME', 'YOU_JUSTCLICK_API_KEY')

result = justClickConnection.add_lead_to_group(['group1', 'group2'], 'lead@email.local', {
    "doneurl2": "https://your-site.local/success",
    "lead_name": "Vasya Pupkin",
})

if result['error_code'] == 0:
    print 'success'

...

Для Django (если в настройках заданы JUSTCLICK_USERNAME и JUSTCLICK_API_KEY):

from python_justclick.python_justclick_django import justClickConnection

result = justClickConnection.add_lead_to_group(['group1', 'group2'], 'lead@email.local', {
    "doneurl2": "https://your-site.local/success",
    "lead_name": "Vasya Pupkin",
})

if result['error_code'] == 0:
    return HttpResponseRedirect(reverse('thanks'))

...

TODO

  1. Проверка отвера API на корректность

  2. Остальной функционал API JustClick

  3. Тесты

  4. Документация

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_justclick-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file python_justclick-0.1.2.tar.gz.

File metadata

File hashes

Hashes for python_justclick-0.1.2.tar.gz
Algorithm Hash digest
SHA256 950dc6efe25cdc199ced5ca72dbf8725a2e24dee97d7134d98356f768ab37295
MD5 ba8ef4c4ac1b356eac549aa3bbe0a6e7
BLAKE2b-256 8775f603bff7bafc33bf418160fd7fcd33827c53df4acdb88dd732a70799f8d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page