Skip to main content

May the LINE be with you...

Project description

LINE
====

`|PyPi version| <https://crate.io/packages/line/>`_ `|PyPi
downloads| <https://crate.io/packages/line/>`_

**This project is not completed yet :(**

May the LINE be with you...

::

>>> from line import LineClient
>>> client = LineClient("carpedm20", "xxxxxxxxxx")
Enter PinCode '9779' to your mobile phone in 2 minutes
>>> client = LineClient("carpedm20@gmail.com", "xxxxxxxxxx")
Enter PinCode '7390' to your mobile phone in 2 minutes
>>> print client.profile

Installing
----------

First, you need to install **Apache Thrift**. Install instructions are
`here <http://thrift.apache.org/docs/install/>`_. (This might take some
time...)

Next:

::

$ pip install line

Or, you can use:

::

$ easy_install line

Or, you can also install manually:

::

$ git clone git://github.com/carpedm20/line.git
$ cd LINE
$ python setup.py install

Using
-----

First, you need to create a ``LineClinet`` object with ``YOUR_ID`` and
``YOUR_PASSWORD``. ``YOUR ID`` can be ``LINE email`` address or
``NAVER id``.

::

>>> from line import LineClient
>>> client = LineClient(YOUR_ID, YOUR_PASSWORD)
Enter PinCode '9779' to your mobile phone in 2 minutes

After you enter ``PinCode`` to your mobile phone, you will get
``authToken``.

::

>>> authToken = client.authToken
>>> print authToken

With ``authToken``, you don't have to enter ``PinCode`` to your phone
anymore!

::

>>> client = LineClient(authToken=authToken)
>>> print client.profile

View ``contacts`` and ``groups``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can see your ``contacts`` by:

::

>>> print client.contacts # your friends
>>> print client.groups

Send a ``message``
~~~~~~~~~~~~~~~~~~

You can send a ``message`` by:

::

>>> client.contacts[0].sendMessage("test")
True
>>> client.groups[0].sendMessage("test")
True

Refresh ``contacts`` and ``groups``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If there is any change of contacts. you need to update ``contacts`` by:

::

>>> client.refreshContacts()
True
>>> client.refreshGroups()
True

Screenshot
----------

.. figure:: http://3.bp.blogspot.com/-FX3ONLEKBBY/U9xJD8JkJbI/AAAAAAAAF2Q/1E7VXOkvYAI/s1600/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA+2014-08-02+%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB+10.47.15.png
:align: center
:alt: alt\_tag

alt\_tag
License
-------

Source codes are distributed under BSD license.

Author
------

Taehoon Kim / `@carpedm20 <http://carpedm20.github.io/about/>`_

.. |PyPi version| image:: https://pypip.in/v/line/badge.png
.. |PyPi downloads| image:: https://pypip.in/d/line/badge.png

Release history Release notifications

History Node

0.8.2

History Node

0.8.0

History Node

0.7.1

History Node

0.7.0

History Node

0.6.9

History Node

0.6.7

History Node

0.6.6

History Node

0.6.5

History Node

0.6.4

History Node

0.6.3

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.1

History Node

0.3.0

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.5

History Node

0.1.0

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

This version
History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
line-0.0.5.tar.gz (8.7 kB) Copy SHA256 hash SHA256 Source None Aug 5, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page