@chaster/chaster (0.12.78)

Published 2024-05-01 11:32:59 +00:00 by PulseDev

Installation

@chaster:registry=
npm install @chaster/chaster@0.12.78
"@chaster/chaster": "0.12.78"

About this package

chaster

Chaster - JavaScript client for chaster Chaster Public API API documentation: https://docs.chaster.app/api/basics/introduction This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.12.78
  • Package version: 0.12.78
  • Build package: io.swagger.codegen.v3.generators.javascript.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 chaster --save

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 Chaster = require('chaster');
var defaultClient = Chaster.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new Chaster.BlocksApi()
var body = new Chaster.BlockUserDto(); // {BlockUserDto} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.blockControllerBlockUser(body, callback);

Documentation for API Endpoints

All URIs are relative to https://api.chaster.app

Class Method HTTP request Description
Chaster.BlocksApi blockControllerBlockUser POST /blocks Block user
Chaster.BlocksApi blockControllerFindBlocks GET /blocks Find blocked users
Chaster.BlocksApi blockControllerGetBlockInteraction GET /blocks/block-interaction/{targetUserId} Find block interaction with another user
Chaster.BlocksApi blockControllerUnblockUser POST /blocks/unblock Unblock user
Chaster.CombinationsApi combinationControllerCreateCode POST /combinations/code Create a code combination
Chaster.CombinationsApi combinationControllerUploadImage POST /combinations/image Upload a combination image
Chaster.CommunityEventsApi communityEventControllerGetCategories GET /community-event/categories Get community event categories
Chaster.CommunityEventsApi communityEventControllerGetPeriodDetails POST /community-event/details Get community event task details for a given day
Chaster.ExtensionsApi extensionListControllerGetExtensions GET /extensions Get the list of extensions
Chaster.ExtensionsTemporaryOpeningApi temporaryOpeningExtensionControllerGetCombination GET /extensions/temporary-opening/{lockId}/combination Get a lock combination
Chaster.ExtensionsTemporaryOpeningApi temporaryOpeningExtensionControllerGetCombinationFromHistoryEntry GET /extensions/temporary-opening/{lockId}/action-log/{actionLogId}/combination Find a combination from an action log
Chaster.ExtensionsTemporaryOpeningApi temporaryOpeningExtensionControllerSetCombination POST /extensions/temporary-opening/{lockId}/combination Set the new combination
Chaster.ExtensionsVerificationPictureApi verificationPictureControllerGetVerificationPictures GET /locks/{lockId}/verification-pictures Get the history of verification pictures
Chaster.ExtensionsVerificationPictureApi verificationPictureControllerSubmitPicture POST /extensions/verification-picture/{lockId}/submit Submit a verification picture
Chaster.FilesApi storageControllerGetFileFromKey GET /files/{fileKey} Find a file
Chaster.FilesApi storageControllerUploadFiles POST /files/upload Upload attachments
Chaster.KeyholderApi keyholderControllerSearchLocks POST /keyholder/locks/search Search locked users
Chaster.LockCreationApi lockCreationControllerCreate POST /locks Create a lock
Chaster.LockCreationApi lockCreationControllerCreateLockFromSharedLock POST /public-locks/{sharedLockId}/create-lock Create a lock from a shared lock
Chaster.LockCreationApi lockCreationControllerSetLockExtensions POST /locks/{lockId}/extensions Edit lock extensions
Chaster.LocksApi lockControllerArchive POST /locks/{lockId}/archive Archive a lock
Chaster.LocksApi lockControllerArchiveKeyholder POST /locks/{lockId}/archive/keyholder Archive a lock as a keyholder
Chaster.LocksApi lockControllerCombination GET /locks/{lockId}/combination Find a lock combination
Chaster.LocksApi lockControllerConvertToSelfLock POST /locks/{lockId}/convert-to-self-lock Convert a lock to a self lock
Chaster.LocksApi lockControllerFindAll GET /locks Get user locks
Chaster.LocksApi lockControllerFindOne GET /locks/{lockId} Get a lock by id
Chaster.LocksApi lockControllerGetLockHistory POST /locks/{lockId}/history Return lock history
Chaster.LocksApi lockControllerSetAsTestLock PUT /locks/{lockId}/is-test-lock Set an archived lock as a test lock
Chaster.LocksApi lockControllerSetFreeze POST /locks/{lockId}/freeze Freeze a lock
Chaster.LocksApi lockControllerSetMaxLimitDate POST /locks/{lockId}/max-limit-date Increase the max limit date
Chaster.LocksApi lockControllerSetSettings POST /locks/{lockId}/settings Update lock settings
Chaster.LocksApi lockControllerTrustKeyholder POST /locks/{lockId}/trust-keyholder Trust the keyholder
Chaster.LocksApi lockControllerUnlock POST /locks/{lockId}/unlock Unlock a lock
Chaster.LocksApi lockControllerUpdateTime POST /locks/{lockId}/update-time Update lock duration
Chaster.LocksApi lockExtensionControllerGetLockInfoFromExtension GET /locks/{lockId}/extensions/{extensionId} Get information from an extension for a given lock
Chaster.LocksApi lockExtensionControllerTriggerAction POST /locks/{lockId}/extensions/{extensionId}/action Trigger an action for a lock extension
Chaster.LocksApi lockVisitorControllerGetUserLocks GET /locks/user/{userId} Return the public locks of a user
Chaster.MessagingApi ignoredUserControllerFindIgnoredUsers GET /messaging/ignored-users
Chaster.MessagingApi messagingControllerCreateConversation POST /conversations Create a conversation
Chaster.MessagingApi messagingControllerGetConversation GET /conversations/{conversationId} Find a conversation
Chaster.MessagingApi messagingControllerGetConversationByUserId GET /conversations/by-user/{userId} Find conversation by user id
Chaster.MessagingApi messagingControllerGetConversations GET /conversations Find a list of conversations
Chaster.MessagingApi messagingControllerGetMessages GET /conversations/{conversationId}/messages Find messages in a conversation
Chaster.MessagingApi messagingControllerSendMessage POST /conversations/{conversationId} Add a new message to a conversation
Chaster.MessagingApi messagingControllerSetConversationStatus PUT /conversations/{conversationId}/status Set a conversation status
Chaster.MessagingApi messagingControllerSetConversationUnread PUT /conversations/{conversationId}/unread Set a conversation unread status
Chaster.PartnerConfigurationsApi partnerConfigurationCreationControllerCreateLockPartnerConfiguration POST /locks/{lockId}/partner-extensions/{partnerExtensionId}/partner-configurations Create a partner configuration from a lock extension configuration
Chaster.PartnerConfigurationsApi partnerConfigurationCreationControllerCreatePartnerConfiguration POST /partner-extensions/{partnerExtensionId}/partner-configurations Create a partner configuration with the default configuration
Chaster.PartnerConfigurationsApi partnerConfigurationCreationControllerCreateSharedLockPartnerConfiguration POST /shared-locks/{sharedLockId}/partner-extensions/{partnerExtensionId}/partner-configurations Create a partner configuration from a shared lock extension configuration
Chaster.PartnerExtensionsApi partnerActionsControllerDoAction POST /api/extensions/sessions/{sessionId}/action Run an action on the lock
Chaster.PartnerExtensionsApi partnerActionsControllerGetExtensionSession GET /api/extensions/sessions/{sessionId} Retrieve information from an extension lock session
Chaster.PartnerExtensionsApi partnerActionsControllerGetLogs POST /api/extensions/sessions/{sessionId}/logs/search List log entries for an extension lock session
Chaster.PartnerExtensionsApi partnerActionsControllerPatchExtensionSession PATCH /api/extensions/sessions/{sessionId} Update partial information for an extension lock session
Chaster.PartnerExtensionsApi partnerActionsControllerSetMetadata PUT /api/extensions/sessions/{sessionId}/metadata Update metadata for an extension lock session
Chaster.PartnerExtensionsApi partnerConfigurationControllerGetConfiguration GET /api/extensions/configurations/{token} Retrieve the extension configuration from a configuration token. The configuration token is passed in hash parameters of your configuration page.
Chaster.PartnerExtensionsApi partnerConfigurationControllerUpdateConfiguration PUT /api/extensions/configurations/{token} Update the extension configuration from a configuration token. The configuration token is passed in hash parameters of your configuration page.
Chaster.PartnerExtensionsApi partnerExtensionControllerCreate POST /api/developers/extensions Create an extension
Chaster.PartnerExtensionsApi partnerExtensionControllerDelete DELETE /api/developers/extensions/{extensionId} Delete an extension
Chaster.PartnerExtensionsApi partnerExtensionControllerFindAll GET /api/developers/extensions Return a list of extensions
Chaster.PartnerExtensionsApi partnerExtensionControllerFindOne GET /api/developers/extensions/{extensionId} Find an extension
Chaster.PartnerExtensionsApi partnerExtensionControllerUpdate PUT /api/developers/extensions/{extensionId} Update an extension
Chaster.PartnerExtensionsApi partnerLogControllerLogCustomAction POST /api/extensions/sessions/{sessionId}/logs/custom Create a custom log entry for an extension lock session
Chaster.PartnerExtensionsApi partnerMainAuthorizationControllerGetSessionAuth GET /api/extensions/auth/sessions/{token} Get a session authorization
Chaster.PartnerExtensionsApi partnerSessionControllerGetSessions POST /api/extensions/sessions/search Search for extension sessions
Chaster.PartnerExtensionsApi sessionDataControllerSetData PUT /api/extensions/sessions/{sessionId}/data Set session custom data
Chaster.PartnerExtensionsApi sessionRegularActionControllerGetRegularActions GET /api/extensions/sessions/{sessionId}/regular-actions Get submitted regular actions
Chaster.PartnerExtensionsApi sessionRegularActionControllerSubmitRegularAction POST /api/extensions/sessions/{sessionId}/regular-actions Submit a regular action on the lock
Chaster.ProfileApi authMeControllerGetUpdatedProfile GET /auth/profile/update Update profile from the authentication server
Chaster.ProfileApi authMeControllerMe GET /auth/profile Get logged user information
Chaster.ProfileApi lockVisitorControllerGetUserLocks GET /locks/user/{userId} Return the public locks of a user
Chaster.ProfileApi profileControllerGetUser GET /users/profile/{username} Find a user profile
Chaster.ProfileApi profileControllerGetUserById GET /users/profile/by-id/{userId} Find a user by id
Chaster.ProfileApi profileControllerGetUserProfile GET /users/profile/{username}/details Find a user profile with details
Chaster.ProfileApi userBadgeControllerGetUserBadgeCount GET /users/badge/count Get the user badge count
Chaster.PublicLocksApi publicLockControllerFindOne GET /public-locks/{sharedLockId} Find a public shared lock
Chaster.PublicLocksApi publicLockControllerGetSharedLockImage GET /public-locks/images/{sharedLockId} Generate a shared lock image
Chaster.PublicLocksApi publicLockControllerSearch POST /public-locks/search Search for locks
Chaster.PublicLocksApi publicLockExploreControllerFindAll GET /explore/categories Find Explore page locks
Chaster.ReportsApi reportCreationControllerCreateReport POST /reports Create a report
Chaster.SessionOfferApi sessionOfferControllerAcceptKeyholdingRequest GET /session-offer/token/{offerToken}/accept Accept a keyholding request
Chaster.SessionOfferApi sessionOfferControllerArchiveKeyholdingOffer GET /session-offer/{sessionRequestId}/archive Archive a keyholding offer
Chaster.SessionOfferApi sessionOfferControllerCreateKeyholdingOffer POST /session-offer/lock/{lockId} Create a keyholding offer
Chaster.SessionOfferApi sessionOfferControllerGetKeyholderRequests GET /session-offer/requests Return keyholding offers from wearers
Chaster.SessionOfferApi sessionOfferControllerGetLockKeyholdingRequest GET /session-offer/token/{offerToken} Retrive public information of a lock
Chaster.SessionOfferApi sessionOfferControllerGetOfferRequestStatus GET /session-offer/lock/{lockId}/status Return a list of keyholding offers
Chaster.SessionOfferApi sessionOfferControllerValidateOfferRequest POST /session-offer/{sessionRequestId} Accept or reject a keyholding offer from a wearer
Chaster.SettingsApi settingsControllerGetAppSettings GET /settings Get app settings
Chaster.SharedLocksApi legacySharedLockControllerArchive POST /locks/shared-locks/{sharedLockId}/archive Archive a shared lock
Chaster.SharedLocksApi legacySharedLockControllerFindAll GET /locks/shared-locks Find all user shared locks
Chaster.SharedLocksApi legacySharedLockControllerFindOne GET /locks/shared-locks/{sharedLockId} Find a shared lock by id
Chaster.SharedLocksApi sharedLockControllerCreate POST /locks/shared-locks Create a shared lock
Chaster.SharedLocksApi sharedLockControllerUpdate PUT /locks/shared-locks/{sharedLockId} Update a shared lock
Chaster.SharedLocksApi sharedLockFavoriteControllerIsFavorite GET /shared-locks/{sharedLockId}/favorite Check if the shared lock is in user favorites
Chaster.SharedLocksApi sharedLockFavoriteControllerRemoveFavorite DELETE /shared-locks/{sharedLockId}/favorite Remove a favorite shared lock
Chaster.SharedLocksApi sharedLockFavoriteControllerSetFavorite PUT /shared-locks/{sharedLockId}/favorite Set a shared lock as favorite
Chaster.SharedLocksApi sharedLockFavoritesControllerGetFavoriteSharedLocks POST /favorites/shared-locks Get user favorite shared locks
Chaster.SharedLocksApi sharedLockTagControllerFindAllTags GET /shared-lock-tags Find all shared lock tags
Chaster.SharedLocksApi sharedLockTagControllerFindSuggestedTags POST /shared-lock-tags/suggested Find suggested shared lock tags
Chaster.UsersApi userSearchControllerGetUserByDiscordId GET /users/search/by-discord-id/{discordId} Search a user by its Discord id
Chaster.UsersApi userSearchControllerSearchByUsername POST /users/search/by-username Search a user by its username

Documentation for Models

Documentation for Authorization

bearer

clientId

  • Type: API key
  • API key parameter name: X-Chaster-Client-Id
  • Location: HTTP header

clientSecret

  • Type: API key
  • API key parameter name: X-Chaster-Client-Secret
  • Location: HTTP header

oauth2

Dependencies

Dependencies

ID Version
@babel/cli ^7.0.0
superagent ^5.3.0

Development Dependencies

ID Version
@babel/core ^7.0.0
@babel/plugin-proposal-class-properties ^7.0.0
@babel/plugin-proposal-decorators ^7.0.0
@babel/plugin-proposal-do-expressions ^7.0.0
@babel/plugin-proposal-export-default-from ^7.0.0
@babel/plugin-proposal-export-namespace-from ^7.0.0
@babel/plugin-proposal-function-bind ^7.0.0
@babel/plugin-proposal-function-sent ^7.0.0
@babel/plugin-proposal-json-strings ^7.0.0
@babel/plugin-proposal-logical-assignment-operators ^7.0.0
@babel/plugin-proposal-nullish-coalescing-operator ^7.0.0
@babel/plugin-proposal-numeric-separator ^7.0.0
@babel/plugin-proposal-optional-chaining ^7.0.0
@babel/plugin-proposal-pipeline-operator ^7.0.0
@babel/plugin-proposal-throw-expressions ^7.0.0
@babel/plugin-syntax-dynamic-import ^7.0.0
@babel/plugin-syntax-import-meta ^7.0.0
@babel/preset-env ^7.0.0
@babel/register ^7.0.0
expect.js ^0.3.1
mocha ^8.0.1
sinon ^7.2.0
Details
npm
2024-05-01 11:32:59 +00:00
12
Unlicense
latest
266 KiB
Assets (1)
Versions (1) View all
0.12.78 2024-05-01