FogBugz » FogBugzPy A Python wrapper for the FogBugz API Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

Merge with 0.9.6

Changeset fe177af16c32

Parents 7001fe04f499

Parents 6b390b445b06

by Jason R. Coombs

Changes to 3 files · Browse files at fe177af16c32 Showing diff from parent 7001fe04f499 6b390b445b06 Diff from another changeset...

Change 1 of 1 Show Entire File .hgtags Stacked
 
4
5
6
 
7
8
9
 
4
5
6
7
8
9
10
@@ -4,6 +4,7 @@
 3294042cf555116765f8a23ec96619b02575cc22 0.9.5  3294042cf555116765f8a23ec96619b02575cc22 0.9.5  45180a34d6b2df2f157b19ff44d4b5b6c51a5485 0.9.5 +6779c9cb8a2a2e7cbfc1e6fb42c5972eb63f18d5 0.9.6  1234dd4a7748ebd9b8355ff4eb717b278475e121 0.9.5-20140516  fef0f3af20820f2c35d4ccfd90eef0ce5f4039e3 0.9.5-20140522  ce9989f282e77f6d0c84de50eb80a0534b62395a 0.9.5-20140603
Change 1 of 1 Show Changes Only README.txt Stacked
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
 
 
 
 
39
 
 Python FogBugz API Wrapper    This Python API is simply a wrapper around the FogBugz API, with some help from Leonard Richardson's BeautifulSoup (http://www.crummy.com/software/BeautifulSoup/) and the magic of Python's __getattr__().    Getting Started:  To use the FogBugz API, just put the file fogbugz.py somewhere on your Python path. It's probably easiest to add this before the import:  >>> import sys  >>> sys.path.append("""c:\code\fbapi""")  >>> from fogbugz import FogBugz    A Quick Example:  >>> from fogbugz import FogBugz  >>> fb = FogBugz("http://example.fogbugz.com/") # URL is to your FogBugz install  >>> fb.logon("logon@example.com", "password")  >>> resp = fb.search(q="assignedto:tyler") # All calls take named parameters, per the API  >>> resp # Responses are BeautifulSoup objects of the response XML.  <response><cases count="2"><case ixbug="1" operations="edit,assign,resolve,email,remind"></case><case ixbug="2" operations="edit,spam,assign,resolve,reply,forward,remind"></case></cases></response>  >>> # You shouldn't need to know too much about BeautifulSoup, but the documentation can be found here:  >>> # http://www.crummy.com/software/BeautifulSoup/documentation.html  >>> for case in resp.cases.childGenerator(): # One way to access the cases  ... print case['ixbug']  ...  1  2  >>> for case in resp.findAll('case'): # Another way to access the cases  ... print case['operations']  ...  edit,assign,resolve,email,remind  edit,spam,assign,resolve,reply,forward,remind  >>> resp = fb.edit(ixbug=1, sEvent="Edit from the API") # Note the named parameters  >>> resp  <response><case ixbug="1" operations="edit,assign,resolve,email,remind"></case></response>    Note that, per API v5.0, all data between tags, such as the token, is now wrapped in CDATA. BeautifulSoup's implementation of CData generally allows for it to be treated as a string, except for one important case: CData.__str__() (a.k.a. str(CData)) returns the full text, including the CDATA wrapper (e.g. "<![CDATA[foo]]>"). To avoid accidentally including the CDATA tage, use CData.encode('utf-8')    For more info on the API:  http://our.fogbugz.com/help/topics/advanced/API.html   -Known Issues: -* File uploading is currently unsupported for both cases and emails. - -Much of the API has not been thoroughly tested. Please assign bugs to Tyler Hicks-Wright. \ No newline at end of file
+Much of the API has not been thoroughly tested. Please report bugs to customer-service@fogcreek.com \ No newline at end of file
Change 1 of 1 Show Entire File setup.py Stacked
 
6
7
8
9
 
10
11
12
 
6
7
8
 
9
10
11
12
@@ -6,7 +6,7 @@
 from textwrap import dedent    setup(name='fogbugz', - version='0.9.5', + version='0.9.6',   py_modules=['fogbugz'],   license=dedent("""\   Copyright (c) 2011, Fog Creek Software, Inc.