content = json.loads(handle.read())
self.project_data = content['project']
self.permalink = self.project_data['permalink']
+ self.id = self.project_data['id']
def edit_request(self, url, method, request):
"Wrap a JSON object with the auth code and ship it as a request"
"Withdraw a specified release from the current project."
if self.verbose:
print "Withdrawing %s release: %s" % (self.project, release)
- # When this is implemented, it will require a DELETE method
- raise FreshmeatSessionException("Release removal is not yet implemented in the 3.0 API.")
+ deletelink = "projects/%s/releases/%s.json" % (self.permalink, self.id)
+ self.edit_request(deletelink, "DELETE", {})
def update_core(self, coredata):
"Update the core data for a project."
%changelog
* Wed Oct 20 2010 Eric S. Raymond <esr@snark.thyrsus.com> - 2.1-1
-- Now has a query mode thatr can retrieve project metadata in editable form.
-- Properly deletes URLs not present in an update list.
+- Now has a query mode that can retrieve project metadata in editable form.
+- Properly deletes URLs not present in your update list.
+- Request withdrawal is implemented.
+- License changed to BSD.
* Mon Oct 17 2010 Eric S. Raymond <esr@snark.thyrsus.com> - 2.0-1
- Updated to work with the JSON-based 3.0 freshmeat.net API.
<listitem>
<para>Delete the specified release rather than submitting it. With
this option, all data other than Project and Release are
-ignored. Note: This is <emphasis role='bold'>not yet
-implemented</emphasis> in the 3.0 API; until it is, invoking
+ignored. Note: only works if the release has been submitted but not
+yet passed by a moderator; if the release is already posted, invoking
this mode will throw an error.</para>
</listitem>
</varlistentry>
</tgroup>
</informaltable>
+<para>Note that the list of URLs you ship does not merely add to the
+existing list but overwrites it - thjat is how you delete old URLs
+which are no longer valid.</para>
+
<para>The Summary, Description, License-List, Project-Tag-List and all
URL fields, when specified, actually change the record for the
project. Only the Tag-List, Changes, Version, Release-Focus, and Hide