[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![LinkedIn][linkedin-shield]][linkedin-url]
Logo

pyteamsnap

Unofficial TeamSnap API wrapper for python.
· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
## About The Project An unoffical python wrapper for the [TeamSnap API](https://www.teamsnap.com/documentation/apiv3). A work in progress.

(back to top)

### Built With * [api-client](https://github.com/MikeWooster/api-client) * [collection-json](https://github.com/ricardokirkner/collection-json.python)

(back to top)

## Getting Started ### Prerequisites * [api-client](https://github.com/MikeWooster/api-client) ```shell pip install api-client ``` * [collection-json](https://github.com/ricardokirkner/collection-json.python) ```shell pip install json-collection ``` ### Installation 1. Get OAuth 2 Credentials from TeamSnap at [https://auth.teamsnap.com/](https://auth.teamsnap.com/login) ([TeamSnap Documentation](https://www.teamsnap.com/documentation/apiv3/authorization)) 2. Install pyteamsnap ```shell pip install git+https://github.com/anthonyscorrea/pyteamsnap ```

(back to top)

## Usage Example ```python from pyteamsnap.client import TeamSnap from pyteamsnap.objects import Me, Event, EventLineupEntry, Member client = TeamSnap(token=TOKEN) # get authenticated user me = Me(client) # get a list of team_ids for the user managed_team_ids = me.data['managed_teams'] # get a list of events for managed team managed_team_id = me.data['managed_teams'][0] events = Event.search(client, team_id=managed_team_id) # get an object with the object id of EVENT_ID event = Event.get(client, id=EVENT_ID) # get some information about the event start_date = event.data['start_date'] # create a new member member = Member.new(client) member.data['first_name'] = 'Ferguson' member.post() # update a Member with id of MEMBER_ID member = Member.get(client, id=MEMBER_ID) member.data['last_name'] = 'Jenkins' member.put() # delete a Member member.delete() # perform a bulk load list_of_ts_objects = client.bulk_load(team_id = TEAM_ID, types = [Event, Member], event__id=EVENT_ID) ```

(back to top)

## Roadmap Implemented objects - [X] Me - [X] User - [X] Event - [X] Team - [X] Availability - [X] Member - [X] Location - [X] Opponent - [X] EventLineupEntry - [X] EventLineup - [X] AvailabilitySummary Implemented Queries - [x] search - [x] bulk_load Implemented Actions - [x] create - [x] read - [x] update - [x] destroy Implemented objects, but not tested. - [ ] Statistics - [ ] MemberStatistics See the [open issues](https://github.com/anthonyscorrea/pyteamsnap/issues) for a full list of proposed features (and known issues).

(back to top)

## Contributing Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again! 1. Fork the Project 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 4. Push to the Branch (`git push origin feature/AmazingFeature`) 5. Open a Pull Request

(back to top)

## License Distributed under the MIT License. See `LICENSE.txt` for more information.

(back to top)

## Contact Your Name - [@anthonyscorrea](https://twitter.com/anthonyscorrea) - a@correa.co Project Link: [https://github.com/anthonyscorrea/pyteamsnap](https://github.com/anthonyscorrea/pyteamsnap)

(back to top)

[contributors-shield]: https://img.shields.io/github/contributors/anthonyscorrea/pyteamsnap.svg?style=for-the-badge [contributors-url]: https://github.com/anthonyscorrea/pyteamsnap/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/anthonyscorrea/pyteamsnap.svg?style=for-the-badge [forks-url]: https://github.com/anthonyscorrea/pyteamsnap/network/members [stars-shield]: https://img.shields.io/github/stars/anthonyscorrea/pyteamsnap.svg?style=for-the-badge [stars-url]: https://github.com/anthonyscorrea/pyteamsnap/stargazers [issues-shield]: https://img.shields.io/github/issues/anthonyscorrea/pyteamsnap.svg?style=for-the-badge [issues-url]: https://github.com/anthonyscorrea/pyteamsnap/issues [license-shield]: https://img.shields.io/github/license/anthonyscorrea/pyteamsnap.svg?style=for-the-badge [license-url]: https://github.com/anthonyscorrea/pyteamsnap/blob/master/LICENSE.txt [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555 [linkedin-url]: https://linkedin.com/in/anthonyscorrea [product-screenshot]: images/screenshot.png