Giter Site home page Giter Site logo

comuniopy's Introduction

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

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

get_username(): string

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 ([email protected]/@korbin/Website)

comuniopy's People

Contributors

jotacor avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

comuniopy's Issues

Error en las expresiones regulares

Cuando no existe fechas o no las detecta (ajustar las expresiones regulares), el group(0) falla.

Controlar el fallo y ver que jugador da el error.

Controlar el login para recuperar money

La primera vez que se hace login muchas veces no se puede recuperar "money".

Controlar el login para que reintente sacar money, o sacarlo de otra web pública.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.