Update: fpl's (0.6.1) class documentation is now up to date!

in #fpl6 years ago






https://github.com/amosbastian/fpl

What is fpl?

It's a Python wrapper for the Fantasy Premier League, which is a fantasy football game - "a game in which participants assemble an imaginary team of real life footballers and score points based on those players' actual statistical performance or their perceived contribution on the field of play. " At the time of writing this post there are more than 6 million teams entered, which includes loads of people on Steem who are participating in Steem's very own league (see here).


In my last post I described how I updated fpl to now use asynchronous requests instead of synchronous requests. Since I completely rewrote large parts of the package, this also meant all the documentation had to be updated. In this documentation update I've updated all the docstrings of all fpl's classes and their respective functions, updated the documentation homepage and added some examples for each class.

The documentation is hosted and generated by ReadTheDocs and can be found here: https://fpl.readthedocs.io/.

All updates made to the documentation can be found in this pull request: https://github.com/amosbastian/fpl/pull/20

Index



I've changed the theme and added the project's logo and some badges. It also now includes a simple example showing how you'd use fpl to get a player and print them with the new asynchronous version. Other than that there are three sections for the user guide (to be expanded soon), the class documentation / guide and the not yet created contributor guide. Especially the last one will be useful once I start actively seeking contributors, so expect to see an update for this soon!

Each class includes a code snippet showing its basic usage. They also include links to their respective endpoints found in Fantasy Premier League's API for people who want to check out all available information themselves. Below I will include links to each class, and include a screenshot showing each class' constructor - of course there is much for documentation available, like for each class' respective functions, but I won't include that in the screenshots because otherwise they would get too big!

ClassicLeague



Fixture



FPL

The FPL class is the main class used for interacting with Fantasy Premier League’s API. It requires a aiohttp.ClientSession for sending requests, so typical usage of the FPL class can look something like this:



Of course since it is the main class it also includes much more documentation. Each of its functions has quite extensive documentation, with some of them including examples of what they return (where I thought it was necessary).



Just like the classes themselves, each function includes the URLs of the endpoints that they send GET requests to - this should hopefully mean the documentation is much more understandable for users.



Gameweek



H2HLeague



Player



Team



User



Usage & installation



This itself hasn't been updated since the previous version, but since I include a "usage & installation" section in all my posts, I thought I might as well share this here as well.

Contributing

As I mentioned above, I will be adding contributor guidelines soon, but if you play FPL (or don't) and know Python, then don't hesitate to contact me on Discord (Amos#4622)!

Sort:  

Hello amosbastian,

This is a great contribution documenting all the major things in the projects.

I have staff picked this contribution because of its great detail and quality of work.

I can just suggest you to break down the work done in commits so that there is a better commit history and work is more easily readable through different commits.

Thank you for your contribution.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thanks for the review, Mohit!

I can just suggest you to break down the work done in commits so that there is a better commit history and work is more easily readable through different commits.

I feel like I did do that, though. In the pull request I linked there are 14 commits or so - how could I improve on this?

Thank you for your review, @ms10398! Keep up the good work!

This is some superb work. Keep it up. 👍

Thanks - hopefully it will help future contributors and users!

Hi @amosbastian!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @amosbastian! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 250 posts. Your next target is to reach 300 posts.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 10 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 6 SBD worth and should receive 138 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

Hi, @amosbastian!

You just got a 0.08% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Hey, @amosbastian!

Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the documentation category on Utopian for being of significant value to the project and the open source community.

We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 59820.07
ETH 2408.18
USDT 1.00
SBD 2.43