Recent changes ============== 07/02/2020 ---------- The documentation has been restructured and (hopefully) improved for new and existing users alike. It's now organised into prose :ref:`Guides` for basic tasks, :ref:`Reference` API documentation, and additional :ref:`Background` material. 31/08/2020 ---------- The previous Live login flow has been repaired, which will once again permit Skype-only accounts. However, SOAP authentication remains the default -- if you need the Live login flow, use :meth:`.SkypeConnection.liveLogin` (see also :ref:`Manual control`). 20/08/2020 ---------- Skype made a change to their authentication flow that broke the method SkPy uses to login. At the same time, it was noted that an alternative flow exists (SOAP-based authentication) supporting two-factor authentication, though not supporting Skype usernames and passwords. As of v0.10, SOAP authentication is used by default. **You must provide a Microsoft account email address and password (or application-specific password if 2FA is enabled) in order to login**; Skype-only accounts will not work with this flow. 27/05/2020 ---------- Skype stopped sending contact presence events by default. If you need them, you can call :meth:`.Skype.subscribePresence` before event polling starts to enable them again. 14/10/2019 ---------- Skype made a breaking change to one of their APIs. If you're seeing this:: ConnectionError: HTTPSConnectionPool(host='flagsapi.skype.com', port=443) ...then update to v0.9.1 which disables flag collection (:meth:`.SkypeSettings.syncFlags`) by default. 11/07/2018 ---------- The latest release (v0.9) pushes out a number of miscellaneous bug fixes that have accrued over the last few months. It also adds a BSD 3-clause license, which will hopefully satisfy any downstream licensing requirements. 09/11/2016 ---------- All instances of :class:`.SkypeMsg` now include a :attr:`html <.SkypeMsg.html>` attribute, which dynamically constructs the Skype-flavoured HTML for the message. For received messages, this isn't particularly useful as :attr:`.SkypeMsg.content` already contains the original message body. However, you can now create an instance of a :class:`.SkypeMsg` subclass, then retrieve the content ready to send:: >>> SkypeLocationMsg(latitude=51.5074, longitude=-0.1277, ... address="5 Trafalgar Square, London", ... mapUrl="https://www.bing.com/mapspreview?cp=52.2448~-0.304923&lvl=8").html 5 Trafalgar Square, London HTML is returned as a BeautifulSoup :class:`bs4.Tag` instance, so you can still easily modify the output before passing it to :meth:`.SkypeChat.sendMsg`. 14/10/2016 ---------- Microsoft account auth is now the default and only authentication method; ``msEmail`` and ``msPwd`` have been removed in favour of ``user`` and ``pwd``. 13/10/2016 ---------- The Skype auth flow has now been superceded by the Microsoft account flow. :class:`.SkypeConnection` has been updated to always do a Live login -- if you're on 0.5 or lower, just pass your Skype username and password as ``msEmail`` and ``msPwd`` instead. 06/09/2016 ---------- You may now notice that :meth:`.Skype.setPresence` now works, rather than throwing 400 errors! There was a missing call to configure a new endpoint, which has now been added. Note that this doesn't work when reading from a token file due to not storing the endpoint identifier. As a workaround, get a new endpoint by calling :meth:`.SkypeConnection.getRegToken` first. 05/09/2016 ---------- Switched to the newer v2 APIs for contacts, in line with Skype for Web. This will soon provide access to groups and blocked contacts. 04/09/2016 ---------- Searching the Skype directory with :meth:`.SkypeContacts.search` now returns instances of :class:`.SkypeUser` instead of raw dictionaries. Meanwhile, server response test cases have appeared -- check the new docs page for :class:`client <.SkypeClientTest>` and :class:`server <.SkypeServerTestBase>` tests for more info. 27/07/2016 ---------- Microsoft account authentication has arrived! If you normally access your Skype account using your email address rather than a username, you can now pass ``msEmail`` and ``msPass`` arguments to the :class:`.Skype` constructor, or use :meth:`.SkypeConnection.setMicrosoftAcc`. 21/05/2016 ---------- Enum classes have been replaced with instances of :class:`.SkypeEnum`, which removes the integer values (each item from the enum is itself an instance of :class:`.SkypeEnum`). Enums support item access both by attribute name and by index. The docs here show them as tuples with attributes. 20/05/2016 ---------- User availability is now represented using the :attr:`.Status` enum, which appears in :meth:`.Skype.setPresence`. 23/03/2016 ---------- Added support for some differing features in the registration token endpoint. If you can't sign in on v0.1, try this instead. 18/03/2016 ---------- Initial release! Installation options: - download from `GitHub `_ - download from `PyPI `_ - ``pip install SkPy`` 16/03/2016 ---------- Basic support for guest accounts has been added, see :meth:`.SkypeConnection.guestLogin`. This requires connecting manually as per yesterday's change, for example:: >>> from skpy import Skype >>> sk = Skype(connect=False) >>> sk.conn.guestLogin("https://join.skype.com/...", "Foo") >>> sk Skype(userId='guest:foo_...', connected=True) As part of this, :meth:`.SkypeChats.urlToId` has been upgraded to use Skype's v2 conversation API, and has been renamed to :meth:`.SkypeChats.urlToIds` in light of the method now returning three identifiers (thread, long, and blob). 15/03/2016 ---------- Authentication is now no longer required during initialisation of the :class:`.Skype` class. Previously, an exception would be raised if neither a token nor a username/password were valid. The default behaviour requires a connection, but by passing ``connect=False``, the :class:`.SkypeConnection` instance at :attr:`.Skype.conn` remains in a disconnected state. 27/02/2016 ---------- Renamed from SkyPy to SkPy, due to several existing projects with the same name. Imports need changing from ``SkyPy`` to ``skpy`` (note also the change to lowercase). This means the project can now be added to PyPI too (which will hopefully happen soon). 25/02/2016 ---------- :meth:`.SkypeChat.sendContact` now handles multiple contacts, so has been renamed to :meth:`.SkypeChat.sendContacts`. Similarly, :class:`.SkypeContactMsg` now provides a list of embedded contacts under its :attr:`contacts <.SkypeContactMsg.contacts>` attribute. 16/02/2016 ---------- :attr:`.SkypeMsg.clientId` replaces ``editId``, providing the client-generated identifier for a particular message. When transmitting an edit, the server's event has a new identifier, but the client identifier remains the same -- this produces a chain of messages with a matching client identifier, forming an edit history. 22/01/2016 ---------- The helper method :func:`.exhaust` now returns an iterable, and no longer takes an ``init`` parameter. Instead, an optional ``transform`` can be specified. 20/01/2016 ---------- :class:`.SkypeFileMsg` and subclasses now carry a :class:`.SkypeFileMsg.File` object with the file name and URLs. 18/01/2016 ---------- :class:`.SkypeChats` has replaced most of the chat-related functions on the :class:`.Skype` class. Conversations can now be retrieved using :attr:`.Skype.chats` with key lookups, similar to :attr:`.Skype.contacts`. 16/01/2016 ---------- :class:`.SkypeContacts` has replaced most of the user-related functions on the :class:`.Skype` class. This still lives at :attr:`.Skype.contacts` and provides key lookups, so code using ``Skype.contacts["id"]`` should remain unaffected. 08/01/2016 ---------- All classes with auto-generated constructors now reject unrecognised keyword arguments (previously they were silently ignored). The names of some :class:`.SkypeImageMsg` fields were changed for consistency.