generated from gatewaydevs/styleguidist-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from unfoldingWord/13-rename-usetagapi-hooks-t…
…o-usetagclient 13 rename usetagapi hooks to usetagclient
- Loading branch information
Showing
30 changed files
with
75 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/documentation/useOrgApi.md → src/documentation/useOrgClient.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/documentation/useRepoApi.md → src/documentation/useRepoClient.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export * from "./useAdminClient" | ||
export * from "./useDcsClient" | ||
export * from "./useIssueClient" | ||
export * from "./useMiscellaneousClient" | ||
export * from "./useNotificationClient" | ||
export * from "./useOrgClient" | ||
export * from "./useRepoClient" | ||
export * from "./useSettingsClient" | ||
export * from "./useUserClient" |
6 changes: 3 additions & 3 deletions
6
src/hooks/api/useAdminApi.js → src/hooks/clients/useAdminClient.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { AdminApi } from "dcs-js"; | ||
import { useApiConfig } from "./useApiConfig"; | ||
import { getApiConfig } from "../../helpers/api"; | ||
|
||
/** | ||
* Uses DCS admin API. | ||
* @param {string} token - Token needed to make secure requests. | ||
*/ | ||
export const useAdminApi = ({ token }) => { | ||
const config = useApiConfig({ token }); | ||
export const useAdminClient = ({ token }) => { | ||
const config = getApiConfig({ token }); | ||
const AdminClient = new AdminApi(config); | ||
return AdminClient; | ||
}; |
6 changes: 3 additions & 3 deletions
6
src/hooks/api/useDcsApi.js → src/hooks/clients/useDcsClient.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { useApiConfig } from "./useApiConfig"; | ||
import { getApiConfig } from "../../helpers/api"; | ||
|
||
/** | ||
* Uses DCS issues API. | ||
* @param {string} token - Token needed to make secure requests. | ||
*/ | ||
export const useDcsApi = ({ token, Class }) => { | ||
const config = useApiConfig({ token }); | ||
export const useDcsClient = ({ token, Class }) => { | ||
const config = getApiConfig({ token }); | ||
const client = Class ? new Class(config) : null; | ||
return client; | ||
}; |
6 changes: 3 additions & 3 deletions
6
src/hooks/api/useIssueApi.js → src/hooks/clients/useIssueClient.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { IssueApi } from "dcs-js"; | ||
import { useApiConfig } from "./useApiConfig"; | ||
import { getApiConfig } from "../../helpers/api"; | ||
|
||
/** | ||
* Uses DCS issue API. | ||
* @param {string} token - Token needed to make secure requests. | ||
*/ | ||
export const useIssuesApi = ({ token }) => { | ||
const config = useApiConfig({ token }); | ||
export const useIssuesClient = ({ token }) => { | ||
const config = getApiConfig({ token }); | ||
const issueClient = new IssueApi(config); | ||
return issueClient; | ||
}; |
6 changes: 3 additions & 3 deletions
6
src/hooks/api/useMiscellaneousApi.js → src/hooks/clients/useMiscellaneousClient.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { MiscellaneousApi } from "dcs-js"; | ||
import { useApiConfig } from "./useApiConfig"; | ||
import { getApiConfig } from "../../helpers/api"; | ||
|
||
/** | ||
* Uses DCS Miscellaneous API. | ||
* @param {string} token - Token needed to make secure requests. | ||
*/ | ||
export const useMiscellaneousApi = ({ token }) => { | ||
const config = useApiConfig({ token }); | ||
export const useMiscellaneousClient = ({ token }) => { | ||
const config = getApiConfig({ token }); | ||
const MiscellaneousClient = new MiscellaneousApi(config); | ||
return MiscellaneousClient; | ||
}; |
6 changes: 3 additions & 3 deletions
6
src/hooks/api/useNotificationApi.js → src/hooks/clients/useNotificationClient.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { NotificationApi } from "dcs-js"; | ||
import { useApiConfig } from "./useApiConfig"; | ||
import { getApiConfig } from "../../helpers/api"; | ||
|
||
/** | ||
* Uses DCS Notification API. | ||
* @param {string} token - Token needed to make secure requests. | ||
*/ | ||
export const useNotificationApi = ({ token }) => { | ||
const config = useApiConfig({ token }); | ||
export const useNotificationClient = ({ token }) => { | ||
const config = getApiConfig({ token }); | ||
const NotificationClient = new NotificationApi(config); | ||
return NotificationClient; | ||
}; |
Oops, something went wrong.