Metadata-Version: 2.1
Name: mls-api
Version: 1.0.4
Summary: Python library for integrating with the MLS (Major League Soccer) API.
Home-page: https://moatsystems.com/mls-api/
Author: Moat Systems Limited
Author-email: support@moatsystems.com
License: MIT
Project-URL: Bug Tracker, https://github.com/moatsystems/mlsapi-python/issues
Project-URL: Changes, https://github.com/moatsystems/mlsapi-python/blob/main/CHANGELOG.md
Project-URL: Documentation, https://docs.mlssoccerapi.com/
Project-URL: Source Code, https://github.com/moatsystems/mlsapi-python
Keywords: mls,mls api,mls_api,major league soccer,moat,moatsystems,moat systems
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Description-Content-Type: text/x-rst
Requires-Dist: requests

mls-api
========

.. image:: https://badge.fury.io/py/mls-api.svg
    :target: https://badge.fury.io/py/mls-api
    :alt: MLS API Python Package Version

Python library for integrating with `MLS API`_ functionality.

.. _MLS API: https://moatsystems.com/mls-api/


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

Python 2.7 and later.


Setup
------

You can install this package by using the pip tool and installing:

.. code-block:: bash

	$ pip install mls-api

Or:

.. code-block:: bash

	$ easy_install mls-api


Usage Example
-------------

.. code-block:: python

    import mls_api
    from dotenv import load_dotenv
    import os

    ## Loads environment variables from .env
    load_dotenv('.env')

    username = os.getenv('_USERNAME')
    password = os.getenv('_PASSWORD')

    ## Authentication
    mls_api.login(username, password)

    ## Retrieve MLS Real-Time Data
    mls_rtd = mls_api.get_rtd()
    print(mls_rtd)

    ## Retrieve MLS Historical Data
    mls_historical = mls_api.get_historical_data()
    print(mls_historical)

    ## Retrieve MLS Players Data
    mls_players = mls_api.get_players()
    print(mls_players)

    ## Retrieve MLS Assist Data
    mls_assists = mls_api.get_assists()
    print(mls_assists)

    ## Retrieve MLS Offence Data
    mls_offence = mls_api.get_offence()
    print(mls_offence)

    ## Retrieve MLS Top Scorers Data
    mls_top_scorer = mls_api.get_top_scorer()
    print(mls_top_scorer)

    ## Retrieve MLS Teams Data
    mls_teams = mls_api.get_teams()
    print(mls_teams)

    ## Retrieve MLS Fixtures Data
    mls_fixtures = mls_api.get_fixtures()
    print(mls_fixtures)

    ## Retrieve MLS Standings Data
    mls_standings = mls_api.get_standings()
    print(mls_standings)

    ## Retrieve MLS Latest News Data
    mls_latest_news = mls_api.get_latest_news()
    print(mls_latest_news)


Setting up an MLS API Account
-----------------------------

Sign up for a self-service `user account`_.

.. _user account: https://moatsystems.com/mls-api/


Using the MLS API
------------------

You can read the `API documentation`_ to understand what's possible with the MLS API. If you need further assistance, don't hesitate to `contact us`_.

.. _API documentation: https://docs.mlssoccerapi.com/
.. _contact us: https://moatsystems.com/contact/

License
--------

This project is licensed under the `MIT License`_.  

.. _MIT License: https://moatsystems.com/


Copyright
----------

Copyright |copy| 2022 `Moat Systems Limited`_. All Rights Reserved.

.. |copy| unicode:: 0xA9 .. copyright sign
.. _Moat Systems Limited: https://moatsystems.com/


