kosmos-dubhe-api
v1.0.7
Published
dubhe_organzation_demo
Downloads
6
Readme
kosmos-dubhe-api
KosmosDubheApi - JavaScript client for kosmos-dubhe-api dubhe organzation demo This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.2
- Package version: 1.0.2
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit http://www.openkosmos.com
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install kosmos-dubhe-api --save
Finally, you need to build the module:
npm run build
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your kosmos-dubhe-api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var KosmosDubheApi = require('kosmos-dubhe-api');
var api = new KosmosDubheApi.AccessControllerApi()
api.fetchAccessesUsingPOST().then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Documentation for API Endpoints
All URIs are relative to http://localhost:28801
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- KosmosDubheApi.AccessControllerApi | fetchAccessesUsingPOST | POST /rest/access/fetch | 获取权限 KosmosDubheApi.AccessControllerApi | fetchMenuUsingPOST | POST /rest/access/menu | 获取菜单 KosmosDubheApi.AuthControllerApi | loginUsingPOST | POST /auth/login | 认证接口 KosmosDubheApi.CdcReportControllerApi | addCdc | POST /api/cdc/add | 保存报卡 KosmosDubheApi.CdcReportControllerApi | addCdc1 | POST /rest/cdc/add | 保存报卡 KosmosDubheApi.CdcReportControllerApi | addCdcMulti | POST /api/cdc/addMulti/{immediately} | 保存报卡 KosmosDubheApi.CdcReportControllerApi | addCdcMulti1 | POST /rest/cdc/addMulti/{immediately} | 保存报卡 KosmosDubheApi.CdcReportControllerApi | cdcReportImmediately | GET /api/cdc/organzation/immediately | 批量报卡 KosmosDubheApi.CdcReportControllerApi | cdcReportImmediately1 | GET /rest/cdc/organzation/immediately | 批量报卡 KosmosDubheApi.CdcReportControllerApi | cdcsetting | GET /api/cdc/setting | 获取CDC设置 KosmosDubheApi.CdcReportControllerApi | cdcsetting1 | GET /rest/cdc/setting | 获取CDC设置 KosmosDubheApi.CdcReportControllerApi | detailCdc | GET /api/cdc/detail/{id} | 获取CDC请求详情 KosmosDubheApi.CdcReportControllerApi | detailCdc1 | GET /rest/cdc/detail/{id} | 获取CDC请求详情 KosmosDubheApi.CdcReportControllerApi | listCdc | GET /api/cdc/list | 获取CDC全部上报请求 KosmosDubheApi.CdcReportControllerApi | listCdc1 | GET /rest/cdc/list | 获取CDC全部上报请求 KosmosDubheApi.CdcReportControllerApi | removeCdc | DELETE /api/cdc/delete/{id} | 撤销报卡 KosmosDubheApi.CdcReportControllerApi | removeCdc1 | DELETE /rest/cdc/delete/{id} | 撤销报卡 KosmosDubheApi.CdcReportControllerApi | reportCdc | POST /api/cdc/organzation/{id} | 上报CDC KosmosDubheApi.CdcReportControllerApi | reportCdc1 | POST /rest/cdc/organzation/{id} | 上报CDC KosmosDubheApi.CdcReportControllerApi | testDetailCdc | GET /api/cdc/testDetailCdc/{id} | 获取CDC请求详情 KosmosDubheApi.CdcReportControllerApi | testDetailCdc1 | GET /rest/cdc/testDetailCdc/{id} | 获取CDC请求详情 KosmosDubheApi.CdcReportControllerApi | testPublishUsingGET | GET /api/cdc/organzation/testPublish | testPublish KosmosDubheApi.CdcReportControllerApi | testPublishUsingGET1 | GET /rest/cdc/organzation/testPublish | testPublish KosmosDubheApi.CdcReportControllerApi | vpnstatus | GET /api/cdc/vpnstatus | 获取CDC VPN状态 KosmosDubheApi.CdcReportControllerApi | vpnstatus1 | GET /rest/cdc/vpnstatus | 获取CDC VPN状态 KosmosDubheApi.LoginControllerApi | refreshTokenUsingPOST | POST /rest/login/refresh/token | 登录接口 KosmosDubheApi.MonitorStatusDemoControllerApi | fetchMonitorStatusPageSqlUsingGET | GET /rest/test/fetchMonitorStatusPageSql | 测试fetch分页sql KosmosDubheApi.MonitorStatusDemoControllerApi | fetchMonitorStatusPageUsingGET | GET /rest/test/fetchMonitorStatusPage | 测试fetch分页nosql KosmosDubheApi.MonitorStatusDemoControllerApi | fetchMonitorStatusUsingGET | GET /rest/test/fetchMonitorStatus | 测试fetch KosmosDubheApi.OrgDepartmentControllerApi | disableDepartment | PUT /rest/department/disable/{departmentCode} | 禁用部门 KosmosDubheApi.OrgDepartmentControllerApi | enableDepartment | PUT /rest/department/enable/{departmentCode} | 启用部门 KosmosDubheApi.OrgDepartmentControllerApi | fetchDepartmentDetail | GET /rest/department/detail/{departmentCode} | 获取部门详细信息 KosmosDubheApi.OrgDepartmentControllerApi | fetchDepartmentList | GET /rest/department/list | 获取部门列表信息 KosmosDubheApi.OrgDepartmentControllerApi | removeDepartment | DELETE /rest/department/remove/{departmentCode} | 删除部门信息 KosmosDubheApi.OrgDepartmentControllerApi | saveOrgDepartment | POST /rest/department/save | 保存部门信息 KosmosDubheApi.OrgOrganziationControllerApi | disableOrganization | PUT /rest/organization/disable/{organizationCode} | 禁用组织机构 KosmosDubheApi.OrgOrganziationControllerApi | enableOrganization | PUT /rest/organization/enable/{organizationCode} | 启用组织机构 KosmosDubheApi.OrgOrganziationControllerApi | fetchOrganizationDetail | GET /rest/organization/detail/{organizationCode} | 获取组织机构详细信息 KosmosDubheApi.OrgOrganziationControllerApi | fetchOrganizationList | GET /rest/organization/list | 获取组织机构列表信息 KosmosDubheApi.OrgOrganziationControllerApi | removeOrganization | DELETE /rest/organization/remove/{organizationCode} | 删除组织机构信息 KosmosDubheApi.OrgOrganziationControllerApi | saveOrgOrganization | POST /rest/organization/save | 保存组织机构信息 KosmosDubheApi.RecordControllerApi | fetchListRecords | GET /rest/record/fetchListRecords | 获取操作记录全部信息 KosmosDubheApi.SystemConfigControllerApi | fetchAllItemSettingUsingGET | GET /rest/systemConfig/fetchAllItemSetting | 获取全部配置项设置值 KosmosDubheApi.SystemConfigControllerApi | fetchConfigByGroupCodeUsingGET | GET /rest/systemConfig/fetchConfigByGroupCode/{groupCode} | 获取配置组信息 KosmosDubheApi.SystemConfigControllerApi | fetchItemSettingByItemCodeUsingGET | GET /rest/systemConfig/fetchItemSettingByItemCode/{itemCode} | 获取配置项设置值 KosmosDubheApi.SystemConfigControllerApi | updateConfigByGroupSettingUsingPUT | PUT /rest/systemConfig/updateSystemConfigGroupSetting | 保存组配置信息 KosmosDubheApi.SystemConfigControllerApi | updateDisableSystemConfigUsingPUT | PUT /rest/systemConfig/updateDisableSystemConfig/{itemCode} | 禁用配置项 KosmosDubheApi.SystemConfigControllerApi | updateEnableSystemConfigUsingPUT | PUT /rest/systemConfig/updateEnableSystemConfig/{itemCode} | 启用配置项 KosmosDubheApi.SystemConfigControllerApi | updateSystemConfigSettingUsingPUT | PUT /rest/systemConfig/updateSystemConfigItemSetting | 保存项配置信息 KosmosDubheApi.UserControllerApi | all | GET /rest/user/all | 获取当前用户信息 KosmosDubheApi.UserControllerApi | current | POST /rest/user/current | 获取当前用户信息 KosmosDubheApi.UserControllerApi | currentDetail | GET /rest/user/currentDetail | 获取当前用户信息 KosmosDubheApi.XhlReportControllerApi | addXhl | POST /rest/xhl/add | 保存报卡 KosmosDubheApi.XhlReportControllerApi | addXhlMulti | POST /rest/xhl/addMulti/{immediately} | 保存报卡 KosmosDubheApi.XhlReportControllerApi | detailXhl | GET /rest/xhl/detail/{id} | 获取现换率请求详情 KosmosDubheApi.XhlReportControllerApi | listXhl | GET /rest/xhl/list | 获取现换率全部上报请求 KosmosDubheApi.XhlReportControllerApi | removeXhl | DELETE /rest/xhl/delete/{id} | 撤销报卡 KosmosDubheApi.XhlReportControllerApi | reportXhl | POST /rest/xhl/organzation/{id} | 上报现换率
Documentation for Models
- KosmosDubheApi.AuthResponse
- KosmosDubheApi.CdcReportReq
- KosmosDubheApi.CdcReportRes
- KosmosDubheApi.IUser
- KosmosDubheApi.OrgDepartment
- KosmosDubheApi.OrgOrganization
- KosmosDubheApi.Record
- KosmosDubheApi.ReportBodyReq
- KosmosDubheApi.ReportBodyRes
- KosmosDubheApi.SysGroupResource
- KosmosDubheApi.SysSystemConfig
- KosmosDubheApi.Users
- KosmosDubheApi.XhlGrqkReq
- KosmosDubheApi.XhlGrqkRes
- KosmosDubheApi.XhlReportReq
- KosmosDubheApi.XhlReportRes
Documentation for Authorization
All endpoints do not require authorization.