0.0.82 • Published 4 years ago

@weego/sunubus-sdk v0.0.82

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Sunubus SDK

This repository contains the javascript SDK for communicating with Sunubus API's

How to setup

First you need node.js v8.12.0 and yarn installed. We recommend using nvm to be able to install and switch between different versions of node.js.

Clone the repository by running:

git clone git@github.com:SunuBus/sunubus-sdk.git

Then cd into it:

cd sunubus-sdk

Run yarn to install the dependencies

yarn install

Run it

Since the sdk is headless, the only thing we run in it are tests that validate that it's components are functioning correctly.

To run them, run:

yarn test

You can also live test the sdk in the projects it is used in (such as sunubus-mobile) by using the yarn link command. This allows you to directly test your changes in the project without deploying to NPM first. For that you will need to first run:

yarn link

and then run the webpack server in watch mode by running:

yarn webpack -w

After that, go into the project that uses the sdk and run:

yarn link @weego/sunubus-sdk

Your changes should now be reflected in real time.

Developing features

The sdk is split into multiple clients, one for each api we consume. Every client is a singleton in the sdk and contains methods that allow it to communicate with the diffrerent API's. Information is usually not shared between the clients to keep them simple. They only act as wrappers around the API's to ease their consumption. To exchange authentication data, a TokenRepository is shared between all the clients.

Deployment

The sdk is deployed to our private organization on npm. To deploy, run:

yarn publish

Make sure you have been added to the npm organization first and that you are logged in with your npm account.

0.0.82

4 years ago

0.0.81

4 years ago

0.0.80

4 years ago

0.0.79

4 years ago

0.0.78

4 years ago

0.0.76

4 years ago

0.0.77

4 years ago

0.0.75

4 years ago

0.0.74

4 years ago

0.0.73

4 years ago

0.0.72

4 years ago

0.0.71

4 years ago

0.0.70

4 years ago

0.0.69

4 years ago

0.0.68

4 years ago

0.0.67

4 years ago

0.0.66

4 years ago

0.0.65

5 years ago

0.0.64

5 years ago

0.0.63

5 years ago

0.0.62

5 years ago

0.0.61

5 years ago

0.0.60

5 years ago

0.0.59

5 years ago

0.0.58

5 years ago

0.0.57

5 years ago

0.0.56

5 years ago

0.0.55

5 years ago

0.0.54

5 years ago

0.0.53

5 years ago

0.0.52

5 years ago

0.0.51

5 years ago

0.0.50

5 years ago

0.0.49

5 years ago

0.0.48

5 years ago

0.0.47

5 years ago

0.0.46

5 years ago

0.0.45

5 years ago

0.0.44

5 years ago

0.0.43

5 years ago

0.0.42

5 years ago

0.0.41

5 years ago

0.0.40

5 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.35

5 years ago

0.0.34

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago