Package moap :: Package publish :: Module freshmeat :: Class Session
[hide private]
[frames] | no frames]

Class Session

source code

Encapsulate the state of a Freshmeat session.

Instance Methods [hide private]
 
__init__(self, login=None, password=None, verbose=0)
Create an XML-RPC session to Freshmeat.
source code
 
_assert_logged_in(self) source code
 
fetch_available_licenses(self) source code
 
login(self, login=None, password=None) source code
 
fetch_branch_list(self, project_name)
Get the branch list for the current project.
source code
 
fetch_release(self, project_name, branch_name, version)
Returns: dict with release_focus, version, changes, hide_from_frontpage
source code
 
publish_release(self, **data)
Add a new release.
source code
 
withdraw_release(self, release) source code
 
logout(self)
End the session.
source code
Class Variables [hide private]
  freshmeat_xmlrpc = 'http://freshmeat.net/xmlrpc/'
Method Details [hide private]

fetch_release(self, project_name, branch_name, version)

source code 
Returns:
dict with release_focus, version, changes, hide_from_frontpage

publish_release(self, **data)

source code 

Add a new release.

The "license" and "url_*" fields are optional and will be taken from the branch record if they are omitted from the submission. The 'hide_from_frontpage' option can be omitted an defaults to 'do not hide'.

Parameters:
  • project_name - Project name to submit a release for
  • branch_name - Branch name to submit a release for
  • version - Version string of new release
  • changes - Changes list, no HTML, character limit 600 chars Empty will return error code 60.
  • release_focus - Release focus ID of new release (see Appendix A)
  • hide_from_frontpage - 'Y' if release is to be hidden from frontpage, everything else does not hide it
  • license - Branch license
  • url_homepage - Homepage
  • url_tgz - Tar/GZ
  • url_bz2 - Tar/BZ2
  • url_zip - Zip
  • url_changelog - Changelog
  • url_rpm - RPM package
  • url_deb - Debian package
  • url_osx - OS X package
  • url_bsdport - BSD Ports URL
  • url_purchase - Purchase
  • url_cvs - CVS tree (cvsweb)
  • url_list - Mailing list archive
  • url_mirror - Mirror site
  • url_demo - Demo site