Skip to main content

API for comunio

Project description

ComunioPy
=========

Comunio API Python


Introduction
------------

It is a simple API to get the information from your Comunio account and use it for your benefit.

In this API you can see the difference between a player (football) and a user (who plays Comunio).

Comunio is a web game where you are a manager of a team.

Forked from:
[comuniopy-v0.1](https://github.com/sinkmanu/comuniopy)

Installation
-----------

```
python setup.py install
```


Usage
-----

### Config file for testing

You can use a config file with the user and login for testing.

```
[comunio]
user=USERNAME
passwd=PASSWORD
```

### Login into your account and get the information
```
ComunioPy import Comunio
test = Comunio(USER,PASS,LEAGUE)
test.login()

uid = test.get_myid()
money = test.get_money()
teamvalue = test.team_value()
```

### Get the latest news from your community
```
from ComunioPy import Comunio
test = Comunio(USER,PASS,LEAGUE)
test.login()
news = []
news = test.get_news()
```

### Functions and methods

#### login()
#### logout()
#### load_info()
```
This function is included in login()
```
#### get_money(): string
#### get_myid(): string
#### get_team_value():string
#### get_title():string
#### get_news():list
#### standings():list
```
Get the standings of the community and return a list with the elements:
position uid player points teamvalue
```

#### info_player(userid): list
```
Get the information of a user and return a list with:
name email community_name points name number_notices list_of_players
```

#### lineup_user(userid): list
```
Return a list with the name of players
```

#### info_comunity(teamid): list
```
position uid player points teamvalue
```

#### info_player(playerid): list
```
Return info about the football player.
[name,position,team,points,price]
```

#### info_player_id(name): string
```
Return ID of the football player name.
```

#### club(clubid): (string,list)
```
Get info about a real team players using a ID
teamname,[player list]
```

#### team_id(team): string
Returns the ID of a team to use with test.club(cid)
```
cid = test.team_id('Valencia')
players = []
club,players = test.club(cid)
```

#### user_id(user):string
Get the ID of a real user.
```
pid = test.user_id('username')
info = []
info = test.user_info(pid)
```

#### players_onsale(only_computer=False): list(list)
Returns the football players currently on sale.
Yout could retrieve only computer players on sale.
```
[[name, team, min_price, market_price, points, date, owner, position]]
```

#### bids_to_you(): list(list)
Get bids made to you.
```
[[player,owner,team,money,date,datechange,status],]
```

#### bids_from_you(): list(list)
Get your bids made for.
```
[[player,owner,team,money,date,datechange,status],]
```


Author
------
Javier Corbín (javi.corbin@gmail.com/[@korbin](https://twitter.com/korbin)/[Website](http://www.micolabs.com))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ComunioPy-1.0.1.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file ComunioPy-1.0.1.tar.gz.

File metadata

  • Download URL: ComunioPy-1.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ComunioPy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d94e175757a78ae36ef7c2b3fd03fdcd42d7929b53128f2e281ba6681e0c3702
MD5 9e70ef2dd17dd5e01139e266808edd73
BLAKE2b-256 6ee660e900602a6adbed4e8b2882fe3f3e5253f27d830e8ca186297485141c39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page