0.4.9 • Published 3 years ago

cherrytwist-lib v0.4.9

Weekly downloads
4
License
EUPL-1.2
Repository
github
Last release
3 years ago

Cherrytwist Client Library

The cherrytwist-lib package is for working directly with the Cherrytwist server, primarily using the graphql based api. For more details about Cherrytwist please visit either the webiste or repo.

The key capabilities of this package include:

  • Managing connections to the Cherrytwist api
  • Wrapping key Cherrytwist api capabilities in convenient local javascript calls, taking care of generating the graphql query / mutation and filling in parameters as appropriate
  • Command line authentication with AAD, which is the Identity Provider supported out of the box by Cherrytwist platform
  • Using the authentication to obtain a Token to allow command line interaction with Cherrytwist api elements that require authorisation (and thus authentication)

This package also provides a sample script, src/test-connection.ts, to demonstrate the usage of the package.

Finally, this package provides a utility for carrying out performance test data population for a Cherrytwist server.

Connecting to the Cherrytwist platform api

To use this package, first instantiate an instance of the CherrytwistClient class, passing in the Cherrytwist server end point:

  const ctClient = new CherrytwistClient({
    graphqlEndpoint: 'http://localhost:4000/graphql',
  });

The ctClient can then be used to access the Cherrytwist server api using provided wrapper methods e.g.

  await ctClient.testConnection();

The capabilities provided by the Cherrytwist server api is continually expanding, so not all capabillities of the server are guaranteed to be exposed by this package. For full details of the graphql api exposed by the Cherrytwist server please browse the schema for the graphql api via our Dev environment.

The set of wrapper calls provided is based on needs to date; feel free to augment with new ones as the needs arise.

0.4.9

3 years ago

0.4.8

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago