0.21.0 • Published 4 years ago

@docket/docket.js v0.21.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

docket.js

DocketJs - JavaScript client for docket.js Docket API This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.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 docket.js --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 docket.js 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 DocketJs = require('docket.js');


var api = new DocketJs.DocsApi()
api.getDocs().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:3001/v1

ClassMethodHTTP requestDescription
DocketJs.DocsApigetDocsGET /docsGet the OpenAPI 3.x spec
DocketJs.EventsApicreateMyEventPOST /my/eventsCreate a new event for the current user
DocketJs.EventsApideleteMyEventByIdDELETE /my/events/{eventId}Delete an event for the current user by it's ID
DocketJs.EventsApigetMyEventByIdGET /my/events/{eventId}Get an event for the current user by it's ID
DocketJs.EventsApiimportMyEventsPOST /my/events/importBulk import events for the current user
DocketJs.EventsApilistMyEventsGET /my/eventsList the current user's events
DocketJs.EventsApiupdateMyEventByIdPATCH /my/events/{eventId}Update an event for the current user by it's ID
DocketJs.GoogleApigetGoogleOAuthUrlGET /google/oauth-urlGet the OAuth2 URL for Google services
DocketJs.GoogleApigoogleGetAccessTokensGET /google/tokensGet Google access tokens
DocketJs.GoogleApigoogleListCalendarListsGET /google/calendars-listsList calendar lists
DocketJs.GoogleApigoogleListEventInstancesGET /google/calendars/{calendarId}/events/{eventId}/instancesGet event instances by ID
DocketJs.GoogleApigoogleListEventsByCalendarIdGET /google/calendars/{calendarId}/eventsList events by calendar ID
DocketJs.GoogleApigoogleShowCalendarByIdGET /google/calendars/{calendarId}Get calendar by ID
DocketJs.GoogleApigoogleShowCalendarListByIdGET /google/calendars-lists/{calendarListId}Get a Google calendar list by ID
DocketJs.GoogleApigoogleShowEventByIdGET /google/calendars/{calendarId}/events/{eventId}Get event by ID
DocketJs.GoogleApigoogleWatchCalendarListsPOST /google/calendars-lists/watchWatch calendar lists
DocketJs.GoogleApigoogleWatchEventsPOST /google/calendars/{calendarId}/events/watchWatch events
DocketJs.HealthCheckApilistHealthCheckGET /health-checkHealth check
DocketJs.LocalesApilistLocalesGET /localesList locales
DocketJs.MicrosoftApigetMicrosoftOAuthUrlGET /microsoft/oauth-urlGet Microsoft OAuth URL
DocketJs.MicrosoftApimicrosoftGetAccessTokensGET /microsoft/tokensGet Microsoft access tokens
DocketJs.MicrosoftApimicrosoftListCalendarsGET /microsoft/calendarsList Microsoft calendars
DocketJs.MicrosoftApimicrosoftListEventsByCalendarIdGET /microsoft/calendars/{calendarId}/eventsList Microsoft events by calendar ID
DocketJs.SearchApilistSearchResultsGET /searchPerform a search
DocketJs.SessionsApicreateSessionPOST /sessionsCreate a new session
DocketJs.TranslationsApilistTranslationsByLocaleGET /locales/{localeCode}/translationsList translations by locale code
DocketJs.UsersApiconfirmRegistrationPOST /users/confirm-registrationConfirm a new user's registration
DocketJs.UsersApicreateUserPOST /usersCreate a new user
DocketJs.UsersApidestroyMyProfileDELETE /my/profileDelete the current user
DocketJs.UsersApiforgotPasswordPOST /users/forgot-passwordFacilitates a user to reset their password
DocketJs.UsersApigetMyProfileGET /my/profileReturn the current user's profile
DocketJs.UsersApiresetPasswordPOST /users/reset-passwordReset a user's password
DocketJs.UsersApishowMyMembershipGET /my/membershipGet the current user's membership status
DocketJs.UsersApiupdateMyMembershipPATCH /my/membershipUpdate the current user's membership status
DocketJs.UsersApiupdateMyProfilePATCH /my/profileUpdate the current user's profile

Documentation for Models

Documentation for Authorization

bearerAuth

  • Type: Bearer authentication (JWT)
0.21.0

4 years ago

0.20.0

4 years ago

0.19.0

4 years ago

0.18.0

5 years ago

0.17.0

5 years ago

0.16.0

5 years ago

0.15.0

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago