Mercurial > kallithea
comparison rhodecode/tests/api/api_base.py @ 3840:dc4644865e8b beta
Implemented simple gist functionality ref #530.
- creation of public/private gists with given lifetime
- rhodecode-gist CLI for quick gist creation
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 11 May 2013 20:24:02 +0200 |
parents | 647fb653048e |
children | aff5dd957f35 |
comparison
equal
deleted
inserted
replaced
3839:9dec870411e0 | 3840:dc4644865e8b |
---|---|
24 def _build_data(apikey, method, **kw): | 24 def _build_data(apikey, method, **kw): |
25 """ | 25 """ |
26 Builds API data with given random ID | 26 Builds API data with given random ID |
27 | 27 |
28 :param random_id: | 28 :param random_id: |
29 :type random_id: | |
30 """ | 29 """ |
31 random_id = random.randrange(1, 9999) | 30 random_id = random.randrange(1, 9999) |
32 return random_id, json.dumps({ | 31 return random_id, json.dumps({ |
33 "id": random_id, | 32 "id": random_id, |
34 "api_key": apikey, | 33 "api_key": apikey, |