fmII
Sun, Nov 23rd home | browse | articles | contact | chat | submit | faq | newsletter | about | stats | scoop 00:23 UTC
in
Section
login «
register «
recover password «

 API Docs for the XML-RPC interface
 Patrick Lenz in Backend - Thu, Dec 11th 2003 09:29


-- FRESHMEAT.NET XML-RPC API VERSION 1.03 --

[ URL ]
http://freshmeat.net/xmlrpc/

[ Method overview ]
fetch_available_licenses     - Fetch all available licenses
fetch_available_release_foci - Fetch all available release focus types
fetch_branch_list	     - Fetch all branch names and IDs for a given project 
fetch_project_list	     - Fetch all projects assigned to logged in user
fetch_release		     - Fetch data from a pending release submission
login			     - Start an XML-RPC session
logout			     - End an XML-RPC session
publish_release		     - Publish a new release
withdraw_release	     - Take back a release submission


[ fetch_available_release_foci method ]
Parameters:
None

Returns:
Struct of available release focus types and associated IDs


[ fetch_available_licenses method ]
Parameters:
None

Returns:
Array of available licenses


[ fetch_branch_list method ]
Parameters (passed in struct form):
SID			- Session ID to work with
project_name		- Project name to fetch branches for

Returns:
Array of branch name strings.


[ fetch_project_list method ]
Parameters (passed in struct form):
SID			- Session ID to work with

Returns:
Array of structs consisting of "projectname_full", "projectname_short", "project_status", and "project_version"


[ fetch_release method ]
Parameters (passed in struct form):
SID			- Session ID
project_name		- Project name 
branch_name		- Branch name 
version			- Release version string

Returns:
Struct consisting of "version", "changes", "release_focus", and "hide_from_frontpage"


[ login method ]
Parameters (passed in struct form):
username		- Regular freshmeat username
password		- Regular freshmeat password

Returns:
Struct of SID, lifetime, and API Version
SID: Session ID to be used in subsequent requests to the XML-RPC service
Lifetime: Lifetime of the session ID in seconds
API Version: API Version currently in use


[ logout method ]
Parameters (passed in struct form):
SID			- Session ID to terminate

Returns:
Struct of "OK" => "Logout successful." if logout was successful


[ publish_release method ]
Parameters (passed in struct form):
SID			- Session ID to work with
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
release_focus		- Release focus ID of new release (see Appendix A)
hide_from_frontpage	- Set to '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

Returns:
Struct of "OK" => "submission successful"

Notes:
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'.


[ withdraw_release method ]
Parameters (passed in struct form):
SID			- Session ID
project_name		- Project name 
branch_name		- Branch name 
version			- Release version string

Returns:
Struct of "OK" => "Withdraw successful.".


[ Appendix A: Release focus IDs ]
0 - N/A
1 - Initial freshmeat announcement
2 - Documentation
3 - Code cleanup
4 - Minor feature enhancements
5 - Major feature enhancements
6 - Minor bugfixes
7 - Major bugfixes
8 - Minor security fixes
9 - Major security fixes


[ Appendix B: Error codes ]
 10 - Login incorrect
 20 - Session inconsistency
 21 - Session invalid
 30 - Branch ID incorrect
 40 - Permission to publish release denied
 50 - Version string missing
 51 - Duplicate version string
 60 - Changes field empty
 61 - Changes field too long
 62 - Changes field contains HTML
 70 - No valid email address set
 80 - Release not found
 81 - Project not found
 90 - Release focus missing
 91 - Release focus invalid
100 - License invalid
999 - Unknown error

« back



© Copyright 2008 SourceForge, Inc., All Rights Reserved.
About freshmeat.net •  Privacy Statement •  Terms of Use •  Trademark Guidelines •  Advertise •  Contact Us • 
ThinkGeek •  Slashdot  •  Linux.com •  SourceForge.net  •  Jobs