0.1.0 • Published 6 years ago

@digitale-kultur/evoke-api-client-js v0.1.0

Weekly downloads
1
License
Unlicense
Repository
-
Last release
6 years ago

digitale-kultur/evoke-api-client-js

DigitaleKulturEvokeApiClientJs - JavaScript client for digitale-kultur/evoke-api-client-js This API provides endpoints used by the Evoke demoparty website. ImprintPrivacy Information This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.1.0
  • Package version: 0.1.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 digitale-kultur/evoke-api-client-js --save

git

If the library is hosted at a git repository, e.g.https://github.com/digitale-kultur/evoke-api-client-js then install it via:

    npm install digitale-kultur/evoke-api-client-js --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 DigitaleKulturEvokeApiClientJs = require('digitale-kultur/evoke-api-client-js');


var api = new DigitaleKulturEvokeApiClientJs.ContactApi()
var contactMessage = new DigitaleKulturEvokeApiClientJs.ContactMessage(); // {ContactMessage} Information about the message to be sent
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createMessage(contactMessage, callback);

Documentation for API Endpoints

All URIs are relative to http://localhost/api

ClassMethodHTTP requestDescription
DigitaleKulturEvokeApiClientJs.ContactApicreateMessagePOST /contactSend a new message
DigitaleKulturEvokeApiClientJs.ContactApishowAllCategoriesGET /contact/categoriesGet a list of all contact categories
DigitaleKulturEvokeApiClientJs.RegistrationApicreateRegistrationPOST /registration/{year}Create a new registration
DigitaleKulturEvokeApiClientJs.RegistrationApideleteRegistrationDELETE /registration/{year}/{id}Delete a single registration
DigitaleKulturEvokeApiClientJs.RegistrationApinumberOfRegistrationsGET /registration/{year}/countGet the number of registrations
DigitaleKulturEvokeApiClientJs.RegistrationApishowAllCountriesGET /registration/countriesGet a list of countries
DigitaleKulturEvokeApiClientJs.RegistrationApishowAllRegistrationsGET /registration/{year}Get a list of all registrations

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.