1.1.7 • Published 3 years ago

my_api_v1 v1.1.7

Weekly downloads
-
License
Unlicense
Repository
-
Last release
3 years ago

my_api_v1

MyApiV1 - JavaScript client for my_api_v1 No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: v1
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://github.com/Secret0-OchkA

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 my_api_v1 --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 my_api_v1 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 MyApiV1 = require('my_api_v1');


var api = new MyApiV1.BugetPlanApi()
var companyId = 56; // {Number} 
var departmnetId = 56; // {Number} 
var opts = {
  'bugetPlanView': new MyApiV1.BugetPlanView() // {BugetPlanView} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createBugetPlan(companyId, departmnetId, opts, callback);

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
MyApiV1.BugetPlanApicreateBugetPlanPOST /api/Company/{companyId}/Department/{departmnetId}/BugetPlanможно создать только 1 на департамент
MyApiV1.BugetPlanApideletBugetPlanDELETE /api/Company/{companyId}/Department/{departmnetId}/BugetPlan/{bugetPlanId}delet bugetplan
MyApiV1.BugetPlanApigetBugetPlanGET /api/Company/{companyId}/Department/{departmnetId}/BugetPlanget buget plan by department
MyApiV1.BugetPlanApigetBugetPlanByIdGET /api/Company/{companyId}/Department/{departmnetId}/BugetPlan/{bugetPlanId}get buget plan
MyApiV1.BugetPlanApisetMonthBugetPUT /api/Company/{companyId}/Department/{departmnetId}/BugetPlan/{bugetPlanId}/SetMonthBuget
MyApiV1.BugetPlanApiupdateBugetPlanPUT /api/Company/{companyId}/Department/{departmnetId}/BugetPlan/{bugetPlanId}
MyApiV1.CompanyApichangeNamePUT /api/Company/{id}/{name}change name company by id
MyApiV1.CompanyApicreateCompanyPOST /api/Companycreate company from object
MyApiV1.CompanyApideletCompanyDELETE /api/Company/{id}Delete company by id
MyApiV1.CompanyApigetCompanyGET /api/Company/{id}get company by id
MyApiV1.CompanyApigetCompanyesGET /api/Companyget all company
MyApiV1.DepartmentApicreateDepartmentPOST /api/Company/{companyId}/Departmentcreate department in company
MyApiV1.DepartmentApideleteDepartmentDELETE /api/Company/{companyId}/DepartmentDelete department in company
MyApiV1.DepartmentApigetDepartmentGET /api/Company/{companyId}/Department/{departmnetId}get department by id in company
MyApiV1.DepartmentApigetDepartmentsGET /api/Company/{companyId}/Departmentget departments in company
MyApiV1.DepartmentApisetBugetDeparmtnetPUT /api/Company/{companyId}/Department/{departmnetId}set buget department by id in company
MyApiV1.EmployeeApicreateEmployeePOST /api/Employee
MyApiV1.EmployeeApideleteEmployeeDELETE /api/Employee/{id}
MyApiV1.EmployeeApigetEmployeeGET /api/Employee/{id}
MyApiV1.EmployeeApigetEmployeesGET /api/Employee
MyApiV1.EmployeeFromDepartmentApidismissEmployeeDELETE /api/Company/{companyId}/Department/{departmnetId}/EmployeeFromDepartment/{employeeId}remove employee from department in company
MyApiV1.EmployeeFromDepartmentApigetEmployeeInDepartmentGET /api/Company/{companyId}/Department/{departmnetId}/EmployeeFromDepartment/{employeeId}get employee in department in company by id
MyApiV1.EmployeeFromDepartmentApigetEmployeesInDepartmentGET /api/Company/{companyId}/Department/{departmnetId}/EmployeeFromDepartmentget employees in department in company
MyApiV1.EmployeeFromDepartmentApihireEmployeePOST /api/Company/{companyId}/Department/{departmnetId}/EmployeeFromDepartment/{employeeId}add epmployee to department
MyApiV1.ExpenseFromDepartmentApigetExpenseInDeparmentGET /api/Company/{companyId}/ExpenseFromDepartment/department/{departmnetId}/{expenseId}get expense in department by id
MyApiV1.ExpenseFromDepartmentApigetExpesesInCompanyGET /api/Company/{companyId}/ExpenseFromDepartmentget expenses in company
MyApiV1.ExpenseFromDepartmentApigetExpesesInDepartmentGET /api/Company/{companyId}/ExpenseFromDepartment/department/{departmnetId}get expenses in department
MyApiV1.ExpenseFromEmployeeApichangeAmmountPUT /api/Employee/{employeeId}/ExpenseFromEmployee/{expenseId}/ChangeAmmountChange ammout if not confirmed
MyApiV1.ExpenseFromEmployeeApiconfirmExpensePUT /api/Employee/{employeeId}/ExpenseFromEmployee/{expenseId}/Confirmconfirm expense if expense is valid
MyApiV1.ExpenseFromEmployeeApicreateExpensePOST /api/Employee/{employeeId}/ExpenseFromEmployeecreate expense for employee
MyApiV1.ExpenseFromEmployeeApideleteExpenseDELETE /api/Employee/{employeeId}/ExpenseFromEmployee/{id}Delete expense
MyApiV1.ExpenseFromEmployeeApigetExpenseGET /api/Employee/{employeeId}/ExpenseFromEmployee/{expenseId}get expense in employee
MyApiV1.ExpenseFromEmployeeApigetExpensesGET /api/Employee/{employeeId}/ExpenseFromEmployeeget expenses in emploee
MyApiV1.ExpenseFromEmployeeApisetExpenseTypePUT /api/Employee/{employeeId}/ExpenseFromEmployee/{expenseId}/SetType/{expenseTypeId}change type if not confirmed
MyApiV1.ExpenseFromEmployeeApivalidateEpxensePUT /api/Employee/{employeeId}/ExpenseFromEmployee/{expenseId}/Validatevalidate expense
MyApiV1.ExpenseTypeApicreateExpenseTypeInCompanyPOST /api/Company/{companyId}/ExpenseTypecreate new expenseType in company
MyApiV1.ExpenseTypeApideleteExpenseTypeInCompanyDELETE /api/Company/{companyId}/ExpenseType/{expenseTypeId}delete expense type in company
MyApiV1.ExpenseTypeApigetEpxensTypesInCompanyGET /api/Company/{companyId}/ExpenseTypeget expense types in company
MyApiV1.ExpenseTypeApigetExpenseTypeInCompanyGET /api/Company/{companyId}/ExpenseType/{expenseTypeId}get expense type in company by id
MyApiV1.ExpenseTypeApiupdateExpenseTypePUT /api/Company/{companyId}/ExpenseType/{expenseTypeId}can change name,limit, description
MyApiV1.OkApicheckConnectToApiGET /api/Okfor check connect

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago