Skip to content

Commit

Permalink
updated readme for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Quinn committed Jan 20, 2017
1 parent 1d84a19 commit b6f3594
Showing 1 changed file with 35 additions and 70 deletions.
105 changes: 35 additions & 70 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,80 +1,63 @@
========
Overview
========
**********
Litmos API
**********

.. start-badges
.. list-table::
:stub-columns: 1

* - docs
- |docs|
* - tests
- | |travis|
| |coveralls|
| |landscape|
* - package
- |version| |downloads| |wheel| |supported-versions| |supported-implementations|

.. |docs| image:: https://readthedocs.org/projects/python-litmos-api/badge/?style=flat
.. image:: https://readthedocs.org/projects/python-litmos-api/badge/?style=flat
:target: https://readthedocs.org/projects/python-litmos-api
:alt: Documentation Status

.. |travis| image:: https://travis-ci.org/charliequinn/python-litmos-api.svg?branch=master
.. image:: https://travis-ci.org/charliequinn/python-litmos-api.svg?branch=master
:alt: Travis-CI Build Status
:target: https://travis-ci.org/charliequinn/python-litmos-api

.. |coveralls| image:: https://coveralls.io/repos/charliequinn/python-litmos-api/badge.svg?branch=master&service=github
.. image:: https://coveralls.io/repos/charliequinn/python-litmos-api/badge.svg?branch=master&service=github
:alt: Coverage Status
:target: https://coveralls.io/r/charliequinn/python-litmos-api

.. |landscape| image:: https://landscape.io/github/charliequinn/python-litmos-api/master/landscape.svg?style=flat
.. image:: https://landscape.io/github/charliequinn/python-litmos-api/master/landscape.svg?style=flat
:target: https://landscape.io/github/charliequinn/python-litmos-api/master
:alt: Code Quality Status

.. |version| image:: https://img.shields.io/pypi/v/litmos-api.svg?style=flat
.. image:: https://img.shields.io/pypi/v/litmos-api.svg?style=flat
:alt: PyPI Package latest release
:target: https://pypi.python.org/pypi/litmos-api

.. |downloads| image:: https://img.shields.io/pypi/dm/litmos-api.svg?style=flat
.. image:: https://img.shields.io/pypi/dm/litmos-api.svg?style=flat
:alt: PyPI Package monthly downloads
:target: https://pypi.python.org/pypi/litmos-api

.. |wheel| image:: https://img.shields.io/pypi/wheel/litmos-api.svg?style=flat
.. image:: https://img.shields.io/pypi/wheel/litmos-api.svg?style=flat
:alt: PyPI Wheel
:target: https://pypi.python.org/pypi/litmos-api

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/litmos-api.svg?style=flat
.. image:: https://img.shields.io/pypi/pyversions/litmos-api.svg?style=flat
:alt: Supported versions
:target: https://pypi.python.org/pypi/litmos-api

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/litmos-api.svg?style=flat
.. image:: https://img.shields.io/pypi/implementation/litmos-api.svg?style=flat
:alt: Supported implementations
:target: https://pypi.python.org/pypi/litmos-api


.. end-badges
Python package integrating with Litmos User and Teams API
Litmos REST API client for python 3.5>

* Free software: BSD license

Installation
============
------------

::

pip install litmos-api


Getting started
=============
---------------

::
.. code-block:: python
from litmos import Litmos
from litmos import Litmos
litmos = Litmos({apikey}, {source})
# --- User ---
# retrieve users
all_users = litmos.User.all()
Expand All @@ -84,14 +67,14 @@ Getting started
# search for user by username
user = litmos.User.search('beelzebub@pieshop.net')
# update JobTitle & City fields
user.JobTitle = 'Pie eater'
user.City = 'Pieland'
# save user
user.save()
# deactivate user
user.deactivate()
Expand All @@ -109,76 +92,58 @@ Getting started
# delete user
# with Id
litmos.User.delete('YmrD112qlm41')
# instance
user.destroy()
# --- Team ---
# get all teams
all_teams = litmos.Team.all()
# find team by Id
team = litmos.Team.find('rnjx2WaQOa11')
# get team members
users = team.users()
# get team leaders
leaders = team.leaders()
# create team (at root level)
team = litmos.Team.create({'Name': 'A-Team','Description': 'I pity the fool!'})
# add sub-team
sub_team = litmos.Team()
sub_team.Name = 'B-Team'
sub_team.Description = 'Woohoo'
sub_team_id = team.add_sub_team(sub_team)
# --- Team members ---
# add users to team
user1 = litmos.User.find('rnjx2WaQOa11')
user2 = litmos.User.find('rnjx2WaQOa12')
team.add_users([user1, user2])
# remove users from team
team.remove_user(user2)
# --- Team leaders ---
# promote user
team.promote_team_leader(user1)
# demote user
team.demote_team_leader(user1)

Documentation
=============
-------------

https://python-litmos-api.readthedocs.io/

Development
===========
-----------

To run the all tests run::

tox

Note, to combine the coverage data from all the tox environments run:

.. list-table::
:widths: 10 90
:stub-columns: 1

- - Windows
- ::

set PYTEST_ADDOPTS=--cov-append
tox

- - Other
- ::

PYTEST_ADDOPTS=--cov-append tox
nosetests

0 comments on commit b6f3594

Please sign in to comment.