1
+ ---
2
+ sidebar_position : 1
3
+ ---
1
4
# API Introduction
2
5
3
6
The plugin exposes some API that can be used by other plugins that provide JavaScript access.
@@ -14,7 +17,7 @@ this.app.plugins.plugins['obsidian-jira-issue'].api
14
17
15
18
or the global variable:
16
19
``` js
17
- $JI
20
+ $ji
18
21
```
19
22
20
23
@@ -26,40 +29,40 @@ The API are divided in few categories to help the navigation.
26
29
This category contains all the functions to directly access the Jira API.
27
30
The response is cached in order to reduce the network load.
28
31
29
- - ` $JI .base.getIssue(issueKey: string, options: { fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
30
- - ` $JI .base.getSearchResults(query: string, options: { limit?: number, fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
31
- - ` $JI .base.getDevStatus(issueId: string, options: { account?: IJiraIssueAccountSettings } = {}) `
32
- - ` $JI .base.getBoards(projectKeyOrId: string, options: { limit?: number, account?: IJiraIssueAccountSettings } = {}) `
33
- - ` $JI .base.getSprints(boardId: number, options: { limit?: number, state?: ESprintState[], account?: IJiraIssueAccountSettings } = {}) `
34
- - ` $JI .base.getLoggedUser(account: IJiraIssueAccountSettings = null) `
32
+ - ` $ji .base.getIssue(issueKey: string, options: { fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
33
+ - ` $ji .base.getSearchResults(query: string, options: { limit?: number, fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
34
+ - ` $ji .base.getDevStatus(issueId: string, options: { account?: IJiraIssueAccountSettings } = {}) `
35
+ - ` $ji .base.getBoards(projectKeyOrId: string, options: { limit?: number, account?: IJiraIssueAccountSettings } = {}) `
36
+ - ` $ji .base.getSprints(boardId: number, options: { limit?: number, state?: ESprintState[], account?: IJiraIssueAccountSettings } = {}) `
37
+ - ` $ji .base.getLoggedUser(account: IJiraIssueAccountSettings = null) `
35
38
36
39
### API Category - Defaulted
37
40
This category contains few functions to directly access the Jira API. The difference with the [ Base] ( #api-category---base ) section is the format of the response where all the fields have been set to a default value in case the Jira API call replied with some missing data. This type of API allows you to simplify the data access because you don't need to check if the fields exists.
38
41
39
42
40
- - ` $JI .defaulted.getIssue(issueKey: string, options: { fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
41
- - ` $JI .defaulted.getSearchResults(query: string, options: { limit?: number, fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
43
+ - ` $ji .defaulted.getIssue(issueKey: string, options: { fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
44
+ - ` $ji .defaulted.getSearchResults(query: string, options: { limit?: number, fields?: string[], account?: IJiraIssueAccountSettings } = {}) `
42
45
43
46
### API Category - Macro
44
47
45
48
This category contains functions that perform few Jira API call to get some advanced information. This category is designed to help the user access some data with few steps.
46
49
47
50
Please open an Issue on GitHub to request more of this functions.
48
51
49
- - ` $JI .macro.getActiveSprint(projectKeyOrId: string) `
50
- - ` $JI .macro.getActiveSprintName(projectKeyOrId: string) `
51
- - ` $JI .macro.getWorkLogBySprint(projectKeyOrId: string, sprint: IJiraSprint) `
52
- - ` $JI .macro.getWorkLogByDates(projectKeyOrId: string, startDate: string, endDate: string = 'now()') `
52
+ - ` $ji .macro.getActiveSprint(projectKeyOrId: string) `
53
+ - ` $ji .macro.getActiveSprintName(projectKeyOrId: string) `
54
+ - ` $ji .macro.getWorkLogBySprint(projectKeyOrId: string, sprint: IJiraSprint) `
55
+ - ` $ji .macro.getWorkLogByDates(projectKeyOrId: string, startDate: string, endDate: string = 'now()') `
53
56
54
57
### API Category - Account
55
58
56
59
This category contains functions to access the accounts data stored in the Obsidian settings of this plugin.
57
60
58
- - ` $JI .account.getAccountByAlias(alias: string) `
59
- - ` $JI .account.getAccountByHost(host: string) `
61
+ - ` $ji .account.getAccountByAlias(alias: string) `
62
+ - ` $ji .account.getAccountByHost(host: string) `
60
63
61
64
### API Category - Util
62
65
63
66
This category contains generic functions.
64
67
65
- - ` $JI .util.clearCache() `
68
+ - ` $ji .util.clearCache() `
0 commit comments