Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 44 lines (32 sloc) 1.25 kb
f588912 @jacobian Initial structure.
jacobian authored
1 Python bindings to the Storymarket API
2 ======================================
3
d95acb3 @jacobian Added a bunch of basic docs.
jacobian authored
4 This is a client for the `Storymarket API <http://storymarket.com/api/v1/>`_.
f588912 @jacobian Initial structure.
jacobian authored
5
6 You'll need a Storymarket account to use this library, and you'll need to
7 generate an API token by visiting the
8 `Developer API page <http://storymarket.com/users/api/>`_.
9
10 Usage
11 -----
12
13 First create an instance of the API with your creds::
14
d95acb3 @jacobian Added a bunch of basic docs.
jacobian authored
15 >>> import storymarket
16 >>> api = storymarket.Storymarket(YOUR_API_KEY)
f588912 @jacobian Initial structure.
jacobian authored
17
18 Then call methods::
d95acb3 @jacobian Added a bunch of basic docs.
jacobian authored
19
20 >>> api.orgs.all()
21 [<Org: My Org>]
22
23 >>> api.text.create({
24 ... 'title': 'Man Bite Dog',
25 ... 'content': '...',
26 ... 'tags': ['man', 'dog', 'biting'],
27 ... 'org': api.orgs.all()[0],
28 ... 'category': api.categories.get(123)
29 ... })
30 >>> <Text: Man Bites Dog>
f588912 @jacobian Initial structure.
jacobian authored
31
32 For details,
33 `see the documentation <http://packages.python.org/python-storymarket/>`_
d95acb3 @jacobian Added a bunch of basic docs.
jacobian authored
34 and/or Storymarket's `API documentation <http://storymarket.com/api/v1/>`_.
f588912 @jacobian Initial structure.
jacobian authored
35
36 Contributing
37 ------------
38
39 Development takes place
40 `on GitHub <http://github.com/jacobian/python-storymarket>`_; please file
41 bugs/pull requests there.
42
43 Development on this project was funded by the
44 `Lawrence Journal-World <http://ljworld.com/>`_ - thanks!
Something went wrong with that request. Please try again.