Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
--HG--
rename : nofussbm/__init__.py => nofussbm/api.py
  • Loading branch information
mapio committed Dec 10, 2011
2 parents 92c9ad8 + 21cc266 commit c8cadac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions nofussbm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ def list_query( email, limit = None ):
skip = int( args[ 'skip' ] )
else:
skip = 0
if not limit:
limit = int( args[ 'limit' ] ) if 'limit' in args else 0
if 'limit' in args:
limit = int( args[ 'limit' ] )
else:
if limit is None: limit = 0
return g.db.bookmarks.find( query, skip = skip, limit = limit ).sort( [ ( 'date-modified', -1 ) ] )


Expand Down
4 changes: 2 additions & 2 deletions nofussbm/templates/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ <h2 id="expfeat">Experimental features</h2>
an HTML file (usually named <code>delicious.html</code>) containing a sequence of lines of the form </p>
<pre>&lt;DT&gt;&lt;A HREF="[url]" ADD_DATE="[timestamp]" PRIVATE="[0|1]" TAGS="[tags]"&gt;[title]&lt;/A&gt;</pre>
<p> Then, import it (preserving all the information <em>except</em> for the <code>PRIVATE</code> field) as simply as </p>
<pre>curl -T delicious.html -H "X-Nofussbm-Key: $KEY" http://$HOST/api/v1/import</pre>
<pre>curl -T delicious.html -H "X-Nofussbm-Key: $KEY" ${URL}import</pre>
<p> If you feel that your email is too long, or you want to post somewhere the list of your bookmarks without reveailng
your identity, you can setup an <strong>alias</strong> as follows </p>
<pre>curl -X POST -H "X-Nofussbm-Key: $KEY" http://$HOST/api/v1/setalias/&lt;YOUR_ALIAS&gt;</pre>
<pre>curl -X POST -H "X-Nofussbm-Key: $KEY" ${URL}setalias/&lt;YOUR_ALIAS&gt;</pre>
<p> where <code>&lt;YOUR_ALIAS&gt;</code> is any word of your choice (look at the answer to see if, in case of
duplicates, your request wasnt satisfyed). </p>
</div>
Expand Down

0 comments on commit c8cadac

Please sign in to comment.