Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added usage documentation

  • Loading branch information...
commit 2b619b35b7f80be3eb30bff21af3187ba2f0cf80 1 parent ba31efc
rhymes authored December 22, 2009

Showing 2 changed files with 62 additions and 1 deletion. Show diff stats Hide diff stats

  1. 2  README
  2. 61  doc/usage.txt
2  README
@@ -17,7 +17,7 @@ Requirements
17 17
 Documentation
18 18
 -------------
19 19
 
20  
-See doc/usage.txt for usage documentation and doc/api/pinder.html for the API doc. There's also a FAQ in doc/faq.txt.
  20
+See doc/usage.txt for usage documentation.
21 21
 
22 22
 Development version
23 23
 -------------------
61  doc/usage.txt
... ...
@@ -0,0 +1,61 @@
  1
+============
  2
+User's guide
  3
+============
  4
+
  5
+Pinder is a straightforward Python API to *script* Campfire_, the web 2.0 chat application kindly brought to us by the 37signals_ team.
  6
+
  7
+Usage is all but rocket science so I'm gonna show you its full power in its simplicity.
  8
+
  9
+If you want full details on what's going on through the wire make sure to checkout the official API documentation: <http://developer.37signals.com/campfire/>
  10
+
  11
+Connect to the server
  12
+~~~~~~~~~~~~~~~~~~~~~
  13
+
  14
+::
  15
+    >>> c = Campfire('SUBDOMAIN', 'SECRET_TOKEN')
  16
+
  17
+Any need to explain? I don't think so. We shall move on.
  18
+
  19
+Room tinkering
  20
+~~~~~~~~~~~~~~
  21
+
  22
+::
  23
+    >>> print c.rooms() # the available rooms
  24
+    >>> room = c.room('ROOM_ID')
  25
+    >>> room2 = c.find_room_by_name('Room 1')
  26
+
  27
+Only remember that *None* will be returned if you accidentally type in the wrong name. Ouch!
  28
+
  29
+Let's see something about me::
  30
+
  31
+    >>> print c.me() # who am I?
  32
+    {'user': {'admin': True,
  33
+          'created_at': '2000/01/01 09:34:18 +0000',
  34
+          'email_address': 'foo@bar.com',
  35
+          'id': 12345,
  36
+          'name': 'Foo Bar',
  37
+          'type': 'Member'}}
  38
+
  39
+I shall speak to myself now::
  40
+
  41
+    >>> room.join()
  42
+    >>> room.speak("I'm working hard to get you out of there. Keep strong!")
  43
+    I'm working hard to get you out of there. Keep strong!
  44
+    
  45
+Room eavesdropping!
  46
+~~~~~~~~~~~~~~~~~~~
  47
+
  48
+You can peek inside the room reading the transcripts this way::
  49
+
  50
+    >>> room.transcript(date.today())
  51
+    
  52
+A whole world will bestow before you.
  53
+    
  54
+Extra
  55
+~~~~~
  56
+
  57
+You can lock yourself in the room if you really want to but it's sad so I won't mention how to that.
  58
+
  59
+.. _Campfire: http://wwww.campfirenow.com/
  60
+.. _37signals: http://www.37signals.com/
  61
+.. _Tinder: http://rubyforge.org/projects/tinder

0 notes on commit 2b619b3

Please sign in to comment.
Something went wrong with that request. Please try again.