<commit_before>MailMojo SDK for Python
=======================

v1 of the MailMojo API

This Python package is automatically generated by the `Swagger
Codegen <https://github.com/swagger-api/swagger-codegen>`__ project:

-  API version: 1.0.0
-  Package version: 0.1.0
-  Build date: 2017-01-12T11:06:02.142+01:00

For more information, please visit https://mailmojo.gelato.io

Requirements
------------

Python 2.7 and 3.4+

Installation & Usage
--------------------

pip install
~~~~~~~~~~~

If the python package is hosted on Github, you can install directly from
Github

.. code:: sh

    pip install git+https://github.com/eliksir/mailmojo-python-sdk.git

(you may need to run ``pip`` with root permission:
``sudo pip install git+https://github.com/eliksir/mailmojo-python-sdk.git``)

Then import the package:

.. code:: python

    import mailmojo

Setuptools
~~~~~~~~~~

Install via `Setuptools <http://pypi.python.org/pypi/setuptools>`__.

.. code:: sh

    python setup.py install --user

(or ``sudo python setup.py install`` to install the package for all
users)

Then import the package:

.. code:: python

    import mailmojo

Getting Started
---------------

Please follow the `installation procedure <#installation--usage>`__ and
then run the following:

.. code:: python

    from __future__ import print_function
    import time
    import mailmojo
    from mailmojo.rest import ApiException
    from pprint import pprint

    # Configure OAuth2 access token for authorization: mailmojo_auth
    mailmojo.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    # create an instance of the API class
    api_instance = mailmojo.ListsApi()
    list_id = 56 # int | ID of the email list to retrieve.

    try:
        # Update an email list partially.
        api_response = api_instance.update_list(list_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ListsApi->update_list: %s\n" % e)

Documentation for API Endpoints
-------------------------------

All URIs are relative to *https://api.mailmojo.no/v1*

+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| Class           | Method                                                                                                         | HTTP request                                        | Description                                  |
+=================+================================================================================================================+=====================================================+==============================================+
| *AccountsApi*   | `**create\_account** <docs/AccountsApi.md#create_account>`__                                                   | **POST** /accounts/                                 | Create an account.                           |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *AccountsApi*   | `**get\_account\_by\_username** <docs/AccountsApi.md#get_account_by_username>`__                               | **GET** /accounts/{username}/                       | Retrieve account details.                    |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *AccountsApi*   | `**update\_account** <docs/AccountsApi.md#update_account>`__                                                   | **POST** /accounts/{username}/                      | Update account details.                      |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `**get\_contacts** <docs/ContactsApi.md#get_contacts>`__                                                       | **GET** /contacts/                                  | Retrieve all contacts across every list.     |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `**get\_subscriber\_on\_list\_by\_email** <docs/ContactsApi.md#get_subscriber_on_list_by_email>`__             | **GET** /lists/{list\_id}/subscribers/{email}/      | Retrieve a subscriber.                       |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `**get\_subscribers\_on\_list** <docs/ContactsApi.md#get_subscribers_on_list>`__                               | **GET** /lists/{list\_id}/subscribers/              | Retrieve subscribers on a list.              |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `**import\_subscribers\_to\_list** <docs/ContactsApi.md#import_subscribers_to_list>`__                         | **POST** /lists/{list\_id}/subscribers/import/      | Subscribe contacts to the email list.        |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `**subscribe\_contact\_to\_list** <docs/ContactsApi.md#subscribe_contact_to_list>`__                           | **POST** /lists/{list\_id}/subscribers/             | Subscribe a contact to the email list.       |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `**unsubscribe\_contact\_on\_list\_by\_email** <docs/ContactsApi.md#unsubscribe_contact_on_list_by_email>`__   | **DELETE** /lists/{list\_id}/subscribers/{email}/   | Unsubscribe a contact.                       |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *EmbedApi*      | `**create\_embed\_session** <docs/EmbedApi.md#create_embed_session>`__                                         | **POST** /embed/                                    | Create a new embedded application session.   |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ListsApi*      | `**get\_list\_by\_id** <docs/ListsApi.md#get_list_by_id>`__                                                    | **GET** /lists/{list\_id}/                          | Retrieve an email list.                      |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ListsApi*      | `**get\_lists** <docs/ListsApi.md#get_lists>`__                                                                | **GET** /lists/                                     | Retrieve all email lists.                    |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ListsApi*      | `**update\_list** <docs/ListsApi.md#update_list>`__                                                            | **PATCH** /lists/{list\_id}/                        | Update an email list partially.              |
+-----------------+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+

Documentation For Models
------------------------

-  `Contact <docs/Contact.md>`__
-  `ContactListAssociations <docs/ContactListAssociations.md>`__
-  `Contacts <docs/Contacts.md>`__
-  `Embed <docs/Embed.md>`__
-  `EmbedOptions <docs/EmbedOptions.md>`__
-  `ImportResult <docs/ImportResult.md>`__
-  `List <docs/List.md>`__
-  `MinimalUser <docs/MinimalUser.md>`__
-  `Subscriber <docs/Subscriber.md>`__
-  `User <docs/User.md>`__

Documentation For Authorization
-------------------------------

mailmojo\_auth
~~~~~~~~~~~~~~

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://api.mailmojo.no/oauth/authorize/
- **Scopes**:
  - **account**: Manage your MailMojo account.
  - **account\_creation**: Create new MailMojo accounts.
  - **account\_creation.trial\_30**: Create new MailMojo accounts with a
    30 day trial period.
  - **contacts**: Manage your contacts across all your email lists.
  - **contacts:read**: Retrieve your contacts across all your email
    lists.
  - **embed**: Give you an embedded MailMojo application with access to
    your account.
  - **lists**: Manage your email lists, excluding subscribers.
  - **lists:read**: Retrieve your email lists, excluding subscribers.

Author
------

<NAME>
<commit_msg>Update install instructions and syntax in README.rst<commit_after>MailMojo SDK for Python
=======================

v1 of the MailMojo API

This Python package is automatically generated by the `Swagger
Codegen <https://github.com/swagger-api/swagger-codegen>`__ project:

-  API version: 1.0.0
-  Package version: 0.2.0
-  Build date: 2017-01-24T15:12:37.908+01:00

For more information on the API, please visit https://mailmojo.gelato.io

Requirements
------------

Python 2.7 and 3.4+

Installation & Usage
--------------------

pip install
~~~~~~~~~~~

We recommend you install with pip:

.. code:: sh

    pip install mailmojo

Then import the package:

.. code:: python

    import mailmojo

Setuptools
~~~~~~~~~~

Install via `Setuptools <http://pypi.python.org/pypi/setuptools>`__ is
also possible. Clone the repo and perform the installation:

.. code:: sh

    git clone https://github.com/eliksir/mailmojo-python-sdk.git
    cd mailmojo-python-sdk && python setup.py install --user

Then import the package:

.. code:: python

    import mailmojo

Getting Started
---------------

Please follow the `installation procedure <#installation--usage>`__ and
then run the following:

.. code:: python

    from __future__ import print_function
    import time
    import mailmojo
    from mailmojo.rest import ApiException
    from pprint import pprint

    # Configure OAuth2 access token for authorization: mailmojo_auth
    mailmojo.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    # create an instance of the API class
    api_instance = mailmojo.ListsApi()
    list_id = 56 # int | ID of the email list to retrieve.

    try:
        # Update an email list partially
        api_response = api_instance.update_list(list_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ListsApi->update_list: %s\n" % e)

Documentation for API Endpoints
-------------------------------

All URIs are relative to *https://api.mailmojo.no/v1*

+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| Class           | Method                                                                                                     | HTTP request                                        | Description                                  |
+=================+============================================================================================================+=====================================================+==============================================+
| *AccountsApi*   | `create\_account <docs/AccountsApi.md#create_account>`__                                                   | **POST** /accounts/                                 | Create an account.                           |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *AccountsApi*   | `get\_account\_by\_username <docs/AccountsApi.md#get_account_by_username>`__                               | **GET** /accounts/{username}/                       | Retrieve account details.                    |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *AccountsApi*   | `update\_account <docs/AccountsApi.md#update_account>`__                                                   | **POST** /accounts/{username}/                      | Update account details.                      |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `get\_contacts <docs/ContactsApi.md#get_contacts>`__                                                       | **GET** /contacts/                                  | Retrieve all contacts across every list.     |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `get\_subscriber\_on\_list\_by\_email <docs/ContactsApi.md#get_subscriber_on_list_by_email>`__             | **GET** /lists/{list\_id}/subscribers/{email}/      | Retrieve a subscriber.                       |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `get\_subscribers\_on\_list <docs/ContactsApi.md#get_subscribers_on_list>`__                               | **GET** /lists/{list\_id}/subscribers/              | Retrieve subscribers on a list.              |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `import\_subscribers\_to\_list <docs/ContactsApi.md#import_subscribers_to_list>`__                         | **POST** /lists/{list\_id}/subscribers/import/      | Subscribe contacts to the email list.        |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `subscribe\_contact\_to\_list <docs/ContactsApi.md#subscribe_contact_to_list>`__                           | **POST** /lists/{list\_id}/subscribers/             | Subscribe a contact to the email list.       |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ContactsApi*   | `unsubscribe\_contact\_on\_list\_by\_email <docs/ContactsApi.md#unsubscribe_contact_on_list_by_email>`__   | **DELETE** /lists/{list\_id}/subscribers/{email}/   | Unsubscribe a contact.                       |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *EmbedApi*      | `create\_embed\_session <docs/EmbedApi.md#create_embed_session>`__                                         | **POST** /embed/                                    | Create a new embedded application session.   |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ListsApi*      | `get\_list\_by\_id <docs/ListsApi.md#get_list_by_id>`__                                                    | **GET** /lists/{list\_id}/                          | Retrieve an email list.                      |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ListsApi*      | `get\_lists <docs/ListsApi.md#get_lists>`__                                                                | **GET** /lists/                                     | Retrieve all email lists.                    |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+
| *ListsApi*      | `update\_list <docs/ListsApi.md#update_list>`__                                                            | **PATCH** /lists/{list\_id}/                        | Update an email list partially.              |
+-----------------+------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+----------------------------------------------+

Documentation For Models
------------------------

-  `Contact <docs/Contact.md>`__
-  `ContactListAssociations <docs/ContactListAssociations.md>`__
-  `Contacts <docs/Contacts.md>`__
-  `Embed <docs/Embed.md>`__
-  `EmbedOptions <docs/EmbedOptions.md>`__
-  `ImportResult <docs/ImportResult.md>`__
-  `List <docs/List.md>`__
-  `MinimalUser <docs/MinimalUser.md>`__
-  `Subscriber <docs/Subscriber.md>`__
-  `User <docs/User.md>`__

Documentation For Authorization
-------------------------------

mailmojo\_auth
~~~~~~~~~~~~~~

-  **Type**: OAuth
-  **Flow**: accessCode
-  **Authorization URL**: https://api.mailmojo.no/oauth/authorize/
-  **Scopes**:

  -  **account**: Manage your MailMojo account.
  -  **account\_creation**: Create new MailMojo accounts.
  -  **account\_creation.trial\_30**: Create new MailMojo accounts with a
     30 day trial period.
  -  **contacts**: Manage your contacts across all your email lists.
  -  **contacts:read**: Retrieve your contacts across all your email
     lists.
  -  **embed**: Give you an embedded MailMojo application with access to
     your account.
  -  **lists**: Manage your email lists, excluding subscribers.
  -  **lists:read**: Retrieve your email lists, excluding subscribers.

{'fraction_non_alphanumeric': 0.43657257057207094, 'fraction_numerical': 0.003997002248313765, 'mean_word_length': 0.827110908261068, 'pattern_counts': {'":': 0, '<': 56, '<?xml version=': 0, '>': 58, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 53, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4953143', 'n_tokens_mistral': 3923, 'n_tokens_neox': 3635, 'n_words': 857}