Skip to content

CodeForPoznan/small-eod-sdk-javascript

 
 

Repository files navigation

small_eod_client

SmallEodClient - JavaScript client for small_eod_client 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: 1.0.4
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install small_eod_client --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 small_eod_client from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('small_eod_client') 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/watchdogpolska/small-eod-sdk-javascript then install it via:

    npm install watchdogpolska/small-eod-sdk-javascript --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 SmallEodClient = require('small_eod_client');

var defaultClient = SmallEodClient.ApiClient.instance;
// Configure HTTP basic authorization: Basic
var Basic = defaultClient.authentications['Basic'];
Basic.username = 'YOUR USERNAME'
Basic.password = 'YOUR PASSWORD'
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new SmallEodClient.CasesApi()
var data = new SmallEodClient.CaseCount(); // {CaseCount} 
api.casesCreate(data).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:8000/api

Class Method HTTP request Description
SmallEodClient.CasesApi casesCreate POST /cases/
SmallEodClient.CasesApi casesDelete DELETE /cases/{id}/
SmallEodClient.CasesApi casesList GET /cases/
SmallEodClient.CasesApi casesNotifiedUserList GET /cases/{case_pk}/notifiedUser/
SmallEodClient.CasesApi casesNotifiedUserRead GET /cases/{case_pk}/notifiedUser/{id}/
SmallEodClient.CasesApi casesPartialUpdate PATCH /cases/{id}/
SmallEodClient.CasesApi casesRead GET /cases/{id}/
SmallEodClient.CasesApi casesResponsibleUserList GET /cases/{case_pk}/responsibleUser/
SmallEodClient.CasesApi casesResponsibleUserRead GET /cases/{case_pk}/responsibleUser/{id}/
SmallEodClient.CasesApi casesUpdate PUT /cases/{id}/
SmallEodClient.ChannelsApi channelsCreate POST /channels/
SmallEodClient.ChannelsApi channelsDelete DELETE /channels/{id}/
SmallEodClient.ChannelsApi channelsList GET /channels/
SmallEodClient.ChannelsApi channelsPartialUpdate PATCH /channels/{id}/
SmallEodClient.ChannelsApi channelsRead GET /channels/{id}/
SmallEodClient.ChannelsApi channelsUpdate PUT /channels/{id}/
SmallEodClient.CollectionsApi collectionsCasesEventsList GET /collections/{collection_pk}/cases/{case_pk}/events/
SmallEodClient.CollectionsApi collectionsCasesEventsRead GET /collections/{collection_pk}/cases/{case_pk}/events/{id}/
SmallEodClient.CollectionsApi collectionsCasesLettersList GET /collections/{collection_pk}/cases/{case_pk}/letters/
SmallEodClient.CollectionsApi collectionsCasesLettersRead GET /collections/{collection_pk}/cases/{case_pk}/letters/{id}/
SmallEodClient.CollectionsApi collectionsCasesList GET /collections/{collection_pk}/cases/
SmallEodClient.CollectionsApi collectionsCasesNotesList GET /collections/{collection_pk}/cases/{case_pk}/notes/
SmallEodClient.CollectionsApi collectionsCasesNotesRead GET /collections/{collection_pk}/cases/{case_pk}/notes/{id}/
SmallEodClient.CollectionsApi collectionsCasesRead GET /collections/{collection_pk}/cases/{id}/
SmallEodClient.CollectionsApi collectionsCreate POST /collections/
SmallEodClient.CollectionsApi collectionsDelete DELETE /collections/{id}/
SmallEodClient.CollectionsApi collectionsList GET /collections/
SmallEodClient.CollectionsApi collectionsPartialUpdate PATCH /collections/{id}/
SmallEodClient.CollectionsApi collectionsRead GET /collections/{id}/
SmallEodClient.CollectionsApi collectionsTokensCreate POST /collections/{collection_pk}/tokens/
SmallEodClient.CollectionsApi collectionsUpdate PUT /collections/{id}/
SmallEodClient.DocumentTypesApi documentTypesCreate POST /document_types/
SmallEodClient.DocumentTypesApi documentTypesDelete DELETE /document_types/{id}/
SmallEodClient.DocumentTypesApi documentTypesList GET /document_types/
SmallEodClient.DocumentTypesApi documentTypesPartialUpdate PATCH /document_types/{id}/
SmallEodClient.DocumentTypesApi documentTypesRead GET /document_types/{id}/
SmallEodClient.DocumentTypesApi documentTypesUpdate PUT /document_types/{id}/
SmallEodClient.EventsApi eventsCreate POST /events/
SmallEodClient.EventsApi eventsDelete DELETE /events/{id}/
SmallEodClient.EventsApi eventsList GET /events/
SmallEodClient.EventsApi eventsPartialUpdate PATCH /events/{id}/
SmallEodClient.EventsApi eventsRead GET /events/{id}/
SmallEodClient.EventsApi eventsUpdate PUT /events/{id}/
SmallEodClient.FeaturesApi featuresCreate POST /features/
SmallEodClient.FeaturesApi featuresDelete DELETE /features/{id}/
SmallEodClient.FeaturesApi featuresFeatureoptionCreate POST /features/{feature_pk}/featureoption/
SmallEodClient.FeaturesApi featuresFeatureoptionDelete DELETE /features/{feature_pk}/featureoption/{id}/
SmallEodClient.FeaturesApi featuresFeatureoptionList GET /features/{feature_pk}/featureoption/
SmallEodClient.FeaturesApi featuresFeatureoptionPartialUpdate PATCH /features/{feature_pk}/featureoption/{id}/
SmallEodClient.FeaturesApi featuresFeatureoptionRead GET /features/{feature_pk}/featureoption/{id}/
SmallEodClient.FeaturesApi featuresFeatureoptionUpdate PUT /features/{feature_pk}/featureoption/{id}/
SmallEodClient.FeaturesApi featuresList GET /features/
SmallEodClient.FeaturesApi featuresPartialUpdate PATCH /features/{id}/
SmallEodClient.FeaturesApi featuresRead GET /features/{id}/
SmallEodClient.FeaturesApi featuresUpdate PUT /features/{id}/
SmallEodClient.InstitutionsApi institutionsCreate POST /institutions/
SmallEodClient.InstitutionsApi institutionsDelete DELETE /institutions/{id}/
SmallEodClient.InstitutionsApi institutionsList GET /institutions/
SmallEodClient.InstitutionsApi institutionsPartialUpdate PATCH /institutions/{id}/
SmallEodClient.InstitutionsApi institutionsRead GET /institutions/{id}/
SmallEodClient.InstitutionsApi institutionsUpdate PUT /institutions/{id}/
SmallEodClient.LettersApi lettersCreate POST /letters/
SmallEodClient.LettersApi lettersDelete DELETE /letters/{id}/
SmallEodClient.LettersApi lettersFileSignCreate POST /letters/file/sign
SmallEodClient.LettersApi lettersFilesCreate POST /letters/{letter_pk}/files/
SmallEodClient.LettersApi lettersFilesDelete DELETE /letters/{letter_pk}/files/{id}/
SmallEodClient.LettersApi lettersFilesList GET /letters/{letter_pk}/files/
SmallEodClient.LettersApi lettersFilesPartialUpdate PATCH /letters/{letter_pk}/files/{id}/
SmallEodClient.LettersApi lettersFilesRead GET /letters/{letter_pk}/files/{id}/
SmallEodClient.LettersApi lettersFilesUpdate PUT /letters/{letter_pk}/files/{id}/
SmallEodClient.LettersApi lettersList GET /letters/
SmallEodClient.LettersApi lettersPartialUpdate PATCH /letters/{id}/
SmallEodClient.LettersApi lettersRead GET /letters/{id}/
SmallEodClient.LettersApi lettersUpdate PUT /letters/{id}/
SmallEodClient.NotesApi notesCreate POST /notes/
SmallEodClient.NotesApi notesDelete DELETE /notes/{id}/
SmallEodClient.NotesApi notesList GET /notes/
SmallEodClient.NotesApi notesPartialUpdate PATCH /notes/{id}/
SmallEodClient.NotesApi notesRead GET /notes/{id}/
SmallEodClient.NotesApi notesUpdate PUT /notes/{id}/
SmallEodClient.TagsApi tagsCreate POST /tags/
SmallEodClient.TagsApi tagsDelete DELETE /tags/{id}/
SmallEodClient.TagsApi tagsList GET /tags/
SmallEodClient.TagsApi tagsPartialUpdate PATCH /tags/{id}/
SmallEodClient.TagsApi tagsRead GET /tags/{id}/
SmallEodClient.TagsApi tagsUpdate PUT /tags/{id}/
SmallEodClient.UsersApi usersAuth GET /users/auth/
SmallEodClient.UsersApi usersCreate POST /users/
SmallEodClient.UsersApi usersDelete DELETE /users/{id}/
SmallEodClient.UsersApi usersExchange GET /users/exchange/
SmallEodClient.UsersApi usersList GET /users/
SmallEodClient.UsersApi usersPartialUpdate PATCH /users/{id}/
SmallEodClient.UsersApi usersRead GET /users/{id}/
SmallEodClient.UsersApi usersRefresh POST /users/refresh/
SmallEodClient.UsersApi usersUpdate PUT /users/{id}/

Documentation for Models

Documentation for Authorization

Basic

  • Type: HTTP basic authentication

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

CollectionToken

  • Type: API key
  • API key parameter name: authorization
  • Location: URL query string

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.4%
  • Other 0.6%