@lab05/lab05_ v1.0.0
my_api
MyApi - JavaScript client for my_api No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) This SDK is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: v1
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
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 --save
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
Finally, switch to the directory you want to use your my_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('my_api')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/my_api then install it via:
npm install YOUR_USERNAME/my_api --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, that's to say your javascript file where you actually
use this library):
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 MyApi = require('my_api');
var api = new MyApi.AccountApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.accountAccessDeniedGet(callback);
Documentation for API Endpoints
All URIs are relative to https://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
MyApi.AccountApi | accountAccessDeniedGet | GET /Account/AccessDenied | |
MyApi.AccountApi | accountConfirmEmailGet | GET /Account/ConfirmEmail | |
MyApi.AccountApi | accountExternalLoginCallbackGet | GET /Account/ExternalLoginCallback | |
MyApi.AccountApi | accountExternalLoginConfirmationPost | POST /Account/ExternalLoginConfirmation | |
MyApi.AccountApi | accountExternalLoginPost | POST /Account/ExternalLogin | |
MyApi.AccountApi | accountForgotPasswordConfirmationGet | GET /Account/ForgotPasswordConfirmation | |
MyApi.AccountApi | accountForgotPasswordGet | GET /Account/ForgotPassword | |
MyApi.AccountApi | accountForgotPasswordPost | POST /Account/ForgotPassword | |
MyApi.AccountApi | accountLockoutGet | GET /Account/Lockout | |
MyApi.AccountApi | accountLoginGet | GET /Account/Login | |
MyApi.AccountApi | accountLoginPost | POST /Account/Login | |
MyApi.AccountApi | accountLoginWith2faGet | GET /Account/LoginWith2fa | |
MyApi.AccountApi | accountLoginWith2faPost | POST /Account/LoginWith2fa | |
MyApi.AccountApi | accountLoginWithRecoveryCodeGet | GET /Account/LoginWithRecoveryCode | |
MyApi.AccountApi | accountLoginWithRecoveryCodePost | POST /Account/LoginWithRecoveryCode | |
MyApi.AccountApi | accountLogoutPost | POST /Account/Logout | |
MyApi.AccountApi | accountRegisterGet | GET /Account/Register | |
MyApi.AccountApi | accountRegisterPost | POST /Account/Register | |
MyApi.AccountApi | accountResetPasswordConfirmationGet | GET /Account/ResetPasswordConfirmation | |
MyApi.AccountApi | accountResetPasswordGet | GET /Account/ResetPassword | |
MyApi.AccountApi | accountResetPasswordPost | POST /Account/ResetPassword | |
MyApi.CountryMedalCountsApiApi | apiCountryMedalCountsApiByIdDelete | DELETE /api/CountryMedalCountsApi/{id} | |
MyApi.CountryMedalCountsApiApi | apiCountryMedalCountsApiByIdGet | GET /api/CountryMedalCountsApi/{id} | |
MyApi.CountryMedalCountsApiApi | apiCountryMedalCountsApiByIdPut | PUT /api/CountryMedalCountsApi/{id} | |
MyApi.CountryMedalCountsApiApi | apiCountryMedalCountsApiGet | GET /api/CountryMedalCountsApi | |
MyApi.CountryMedalCountsApiApi | apiCountryMedalCountsApiPost | POST /api/CountryMedalCountsApi | |
MyApi.ManageApi | manageChangePasswordGet | GET /Manage/ChangePassword | |
MyApi.ManageApi | manageChangePasswordPost | POST /Manage/ChangePassword | |
MyApi.ManageApi | manageDisable2faPost | POST /Manage/Disable2fa | |
MyApi.ManageApi | manageDisable2faWarningGet | GET /Manage/Disable2faWarning | |
MyApi.ManageApi | manageEnableAuthenticatorGet | GET /Manage/EnableAuthenticator | |
MyApi.ManageApi | manageEnableAuthenticatorPost | POST /Manage/EnableAuthenticator | |
MyApi.ManageApi | manageExternalLoginsGet | GET /Manage/ExternalLogins | |
MyApi.ManageApi | manageGenerateRecoveryCodesGet | GET /Manage/GenerateRecoveryCodes | |
MyApi.ManageApi | manageIndexGet | GET /Manage/Index | |
MyApi.ManageApi | manageIndexPost | POST /Manage/Index | |
MyApi.ManageApi | manageLinkLoginCallbackGet | GET /Manage/LinkLoginCallback | |
MyApi.ManageApi | manageLinkLoginPost | POST /Manage/LinkLogin | |
MyApi.ManageApi | manageRemoveLoginPost | POST /Manage/RemoveLogin | |
MyApi.ManageApi | manageResetAuthenticatorPost | POST /Manage/ResetAuthenticator | |
MyApi.ManageApi | manageResetAuthenticatorWarningGet | GET /Manage/ResetAuthenticatorWarning | |
MyApi.ManageApi | manageSendVerificationEmailPost | POST /Manage/SendVerificationEmail | |
MyApi.ManageApi | manageSetPasswordGet | GET /Manage/SetPassword | |
MyApi.ManageApi | manageSetPasswordPost | POST /Manage/SetPassword | |
MyApi.ManageApi | manageTwoFactorAuthenticationGet | GET /Manage/TwoFactorAuthentication |
Documentation for Models
Documentation for Authorization
All endpoints do not require authorization.
6 years ago