# crowdflow_organiser_api

> Javascript client for consuming the CrowdFlow organiser API

Latest version **1.8.0** (published 2020-05-15) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install crowdflow_organiser_api
pnpm add crowdflow_organiser_api
yarn add crowdflow_organiser_api
bun add crowdflow_organiser_api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.0 |
| Published | 2020-05-15 |
| First published | 2020-04-01 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 94.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | schoolmeister |

## Links

- npm: https://www.npmjs.com/package/crowdflow_organiser_api
- npm.io page: https://npm.io/package/crowdflow_organiser_api

## Dependencies (2)

- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.0.0
- [superagent](https://npm.io/package/superagent.md) 3.7.0

## Recent versions

- 1.8.0 (latest) — 2020-05-15
- 1.7.0 — 2020-04-26
- 1.6.1 — 2020-04-25
- 1.6.0 — 2020-04-15
- 1.5.4 — 2020-04-15
- 1.5.3 — 2020-04-15
- 1.5.2 — 2020-04-14
- 1.5.1 — 2020-04-14
- 1.5.0 — 2020-04-14
- 1.2.0 — 2020-04-07
- 1.1.1 — 2020-04-01
- 1.1.0 — 2020-04-01

## README

# crowdflow_organiser_api

CrowdflowOrganiserApi - JavaScript client for crowdflow_organiser_api
CrowdFlow Event API for organisers

This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.8.0
- Package version: 1.8.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install crowdflow_organiser_api --save
```

Finally, you need to build the module:

```shell
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:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your crowdflow_organiser_api from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
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:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). 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):

```shell
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:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var CrowdflowOrganiserApi = require('crowdflow_organiser_api');


var api = new CrowdflowOrganiserApi.AuthApi()
var username = "username_example"; // {String} The user name for login
var password = "password_example"; // {String} The password for login in clear text
api.generateToken(username, password).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://admin.crowdflow.idlab.ugent.be:30083*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CrowdflowOrganiserApi.AuthApi* | [**generateToken**](docs/AuthApi.md#generateToken) | **GET** /auth/login | Log in and return JWT token
*CrowdflowOrganiserApi.AuthApi* | [**getSecret**](docs/AuthApi.md#getSecret) | **GET** /auth/secret | Return secret string
*CrowdflowOrganiserApi.AuthApi* | [**getUserInfo**](docs/AuthApi.md#getUserInfo) | **GET** /auth/me | Return decoded token
*CrowdflowOrganiserApi.EventApi* | [**addEvent**](docs/EventApi.md#addEvent) | **POST** /event | Add a new event to the store
*CrowdflowOrganiserApi.EventApi* | [**deleteEvent**](docs/EventApi.md#deleteEvent) | **DELETE** /event/{eventId} | Deletes an event
*CrowdflowOrganiserApi.EventApi* | [**getCurrentEvent**](docs/EventApi.md#getCurrentEvent) | **GET** /current-event | Get current active event
*CrowdflowOrganiserApi.EventApi* | [**getEventById**](docs/EventApi.md#getEventById) | **GET** /event/{eventId} | Find event by ID
*CrowdflowOrganiserApi.EventApi* | [**getEvents**](docs/EventApi.md#getEvents) | **GET** /event | Get all events
*CrowdflowOrganiserApi.EventApi* | [**updateEvent**](docs/EventApi.md#updateEvent) | **PUT** /event/{eventId} | Update an existing event
*CrowdflowOrganiserApi.EventApi* | [**updateStateEvent**](docs/EventApi.md#updateStateEvent) | **PUT** /event/{eventId}/state | Update the state of an event


## Documentation for Models

 - [CrowdflowOrganiserApi.Camera](docs/Camera.md)
 - [CrowdflowOrganiserApi.CameraCorners](docs/CameraCorners.md)
 - [CrowdflowOrganiserApi.Coordinate](docs/Coordinate.md)
 - [CrowdflowOrganiserApi.Event](docs/Event.md)
 - [CrowdflowOrganiserApi.EventMap](docs/EventMap.md)
 - [CrowdflowOrganiserApi.EventMapWorldCoordinates](docs/EventMapWorldCoordinates.md)
 - [CrowdflowOrganiserApi.GeoCoordinate](docs/GeoCoordinate.md)
 - [CrowdflowOrganiserApi.Poi](docs/Poi.md)
 - [CrowdflowOrganiserApi.Queue](docs/Queue.md)
 - [CrowdflowOrganiserApi.Terminal](docs/Terminal.md)
 - [CrowdflowOrganiserApi.UserInfo](docs/UserInfo.md)
 - [CrowdflowOrganiserApi.Zone](docs/Zone.md)


## Documentation for Authorization



### jwt

- **Type**: Bearer authentication (JWT)

---
_Source: https://npm.io/package/crowdflow_organiser_api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
