You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for taking the time to contribute to the ChannelApe SDK project!
3
+
4
+
The following is a guide for contributing to the project. These are mostly guidelines and not rules. We are open for discussion on changes to this document in a Pull Request.
5
+
6
+
## Table of contents
7
+
-[Just have a question?](#just-have-a-question)
8
+
-[Prerequisites](#prerequisites)
9
+
-[Getting Started](#getting-started)
10
+
-[Building and Testing](#building-and-testing)
11
+
-[Reporting a bug](#reporting-a-bug)
12
+
-[Suggesting a new feature](#suggesting-a-new-feature)
13
+
-[Pull Request Template](#pull-request-template)
14
+
-[Style Guide](#style-guide)
15
+
-[Update README if applicable](#update-readme-if-applicable)
16
+
17
+
## Just have a question?
18
+
If you have a question please refrain from opening a GitHub issue. We have an official message board with a detailed FAQ and where the community chimes in with helpful advice if you have questions.
- vscode (This repo contains configuration files that will get you up and running straight away with vscode)
26
+
27
+
## Getting Started
28
+
ChannelApe uses the [gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) workflow for managing our projects. So depending on what you are working on will dictate which branch to start from and merge to.
29
+
- Clone the repository locally.
30
+
- New Features/Improvements start from the **'develop'** branch.
31
+
- Hotfixes start from the **'master'** branch.
32
+
- Run ``npm install `` from the root directory of the project.
33
+
34
+
35
+
## Building and Testing
36
+
ChannelApe uses different types of tests to verify functionality.
37
+
1.**Unit tests** - Automated tests that validate a specific piece of functionality within code. Any new code added by the contributor should be covered.
38
+
2.**Integration tests** - End to End tests to validate the logical flow of the program. Cucumber is used to automate the integration tests.
39
+
3.**Driver Test** - Tests that actually make calls to external dependencies to validate your code works without having to run it locally. These aren't run during the building of the project.
40
+
41
+
#### Running all tests
42
+
43
+
``npm run test``
44
+
45
+
#### Coverage
46
+
The goal is to get line and branch coverage to **100%** on new code.
47
+
48
+
ChannelApe uses [Mocha](https://mochajs.org/) for running tests and [NYC](https://www.npmjs.com/package/nyc) for simple code coverage.
49
+
50
+
Additionally ChannelApe uses [Stryker](https://stryker-mutator.io/) for running mutations on unit tests. This ensures that tests are well written. The goal for mutation coverage is equal to or greater than the threshold. The threshold is defined in **stryker.conf.js**. If you are to increase mutation coverage, please update the threshold to reflect the new coverage percentage.
51
+
52
+
## Reporting a bug
53
+
If you find a bug and would like to report it, please follow the guidelines below:
54
+
- Verify that a bug for this doesn't already exist [here](https://github.com/ChannelApe/channelape-typescript-sdk/issues).
55
+
- If a bug is closed and you find that it is possibly still an issue, open a new one and reference the old one.
56
+
- Use a clear descriptive title.
57
+
- Describe in detail how to reproduce the issue.
58
+
- Examples can help if you have them (especially if you can't reliably reproduce).
59
+
- Describe expected behavior and why.
60
+
61
+
## Suggesting a new feature
62
+
If you would like to suggest a new feature, please follow the guidelines below:
63
+
- Verify that a feature request doesn't already exist [here](https://github.com/ChannelApe/channelape-typescript-sdk/issues).
64
+
- Use a clear descriptive title.
65
+
- Describe in detail how the new feature should work.
66
+
- Examples can help if you have them.
67
+
- Describe expected behavior and why.
68
+
69
+
## Pull Request Template
70
+
All of the following should be filled out as descriptive as possible or the pull request will be denied at the maintainers discretion.
71
+
72
+
#### Title
73
+
Pull requests titles should be meaningful to the context of what you are adding/fixing.
74
+
75
+
#### Description of Changes
76
+
What you are adding/fixing and why.
77
+
78
+
#### Possible Drawbacks
79
+
If there are known caveats or tradeoffs with the code, please note them here and why we should consider this change.
80
+
81
+
## Style Guide
82
+
83
+
Please review our style guide. ChannelApe will request changes based on this style guide if needed on Pull Requests. The JavaScript style guide can be found [here](https://channelape.github.io/styleguide/js/javascriptguide.html).
84
+
85
+
## Update README if applicable
86
+
If you make any changes that affect the end user, please update the README.md to reflect this.
Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,13 @@ TypeScript and JavaScript SDK for the [ChannelApe REST API](https://docs.channel
15
15
16
16
The ChannelApe SDK is asynchronous and all functions return promises.
17
17
18
+
### Using in a browser based app?
19
+
20
+
Make sure when you install the SDK you install with the *--no-optional* flag
21
+
```
22
+
npm i channelape-sdk --save --no-optional
23
+
```
24
+
18
25
#### Creating a client
19
26
20
27
Create a new instance of the ChannelApeClient with your sessionId.
@@ -31,6 +38,8 @@ const channelApeClient = new ChannelApeClient({
31
38
* endpoint - Envrionment endpoint you would like to hit. Defaults to https://api.channelape.com
32
39
* logLevel - Level of logs you wish to see from the SDK. Defaults to OFF.
33
40
* maximumRequestRetryTimeout - Number of milliseconds to keep retrying a request for when an undesired response status code is received. Defaults to 180000 (3 minutes). Cannot be set lower than 2000 (2 seconds).
41
+
* minimumRequestRetryRandomDelay - Minimum number of milliseconds to randomly delay by when an undesired response status code is received. Defaults to 1000 (1 second). Cannot be set lower than 1000 (1 second).
42
+
* maximumRequestRetryRandomDelay - Maximum number of milliseconds to randomly delay by when an undesired response status code is received. Defaults to 5000 (5 seconds). Cannot be set lower than 2000 (2 seconds).
0 commit comments