-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation.html
More file actions
73 lines (52 loc) · 2.17 KB
/
documentation.html
File metadata and controls
73 lines (52 loc) · 2.17 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FogBugzLib documentation</title>
</head>
<body>
<h1>FogBugzLib documentation</h1>
<h2>Loggin in and out</h2>
<code>FogBugz fogbugz = FogBugz.login(server, username, password);</code><br/>
To logout: <br/>
<code>fogbugz.logout();</code>
<h2>Retrieving cases</h2>
Retrieving a particular case: <br/>
<code>Case cs = Case.get(fogbugz, 20000);</code><br/>
Listing filters: <br/>
<code>List<Filter> filters = Filter.listFilters(fogbugz);</code><br/>
Executing a particular filter: <br/>
<code>List<Case> cases = Filter.getByName(fogbugz, "s-Ocasys").execute();</code>
<h2>Mailboxes, People, Statuses, Priorities, Projects, Areas and Categories</h2>
Listing objects: <br/>
<code>
List<Mailbox> mailboxes = Mailbox.listMailboxes(fogbugz); <br/>
List<Person> people = Person.listPeople(fogbugz); <br/>
List<Status> statuses = Status.listStatuses(fogbugz); <br/>
... <br/>
</code>
<em>Note that these objects are cached! If an object is added, deleted or modified, the changes won't be visible
in the library until the cache is cleared:</em> <br/>
<code>fogbugz.clearCache();</code> <br/>
Getting a single object: <br/>
<code>
Mailbox mailbox = Mailbox.get(fogbugz, ...); <br/>
Person person = Person.get(fogbugz, ...); <br/>
Status status = Status.get(fogbugz, ...); <br/>
... <br/>
</code><br/>
Some objects have additional getters, like <code>getByName</code>, <code>getByEmail</code> etc. <br/>
<h2>Changing cases</h2>
Edit a case:<br/>
<code>cs.edit("Edit message");</code><br/>
When editting a case it is possible to change the category, project, area etc. To do so, first call
<code>setCategory</code>, <code>setProject</code>, <code>setArea</code> before calling <code>edit()</code><br/>
When changing the area, don't forget to also update the project <br/>
<br/>
Assigning a case:<br/>
<code>
cs.setAssignedTo(Person.getByEmail(fogbugz, "user@domain.com")); <br/>
cs.assign("blablabla"); <br/>
</code>
</body>
</html>