Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit 16e900a

Browse files
Merge review summation resource methods
1 parent 939fe51 commit 16e900a

13 files changed

+1618
-57
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
.env
3+
env.sh

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Wrapper library for Topcoder Submission API
1212

1313
2. Create an instance of this wrapper with the configuration variables listed below
1414

15-
```bash
15+
```javascript
1616
const submissionApi = require('tc-submission-api-wrapper')
1717
const submissionApiClient = submissionApi(_.pick(config,
1818
['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME',
@@ -79,6 +79,19 @@ Method | HTTP request | Description
7979
[**patchReview**](docs/ReviewsApi.md#patchReview) | **PATCH** /reviews/{reviewId} | Partially update review.
8080
[**deleteReview**](docs/ReviewsApi.md#deleteReview) | **DELETE** /reviews/{reviewId} | Delete the review.
8181

82+
### Review Summations wrapper methods
83+
84+
Method | HTTP request | Description
85+
------------- | ------------- | -------------
86+
[**searchReviewSummations**](docs/ReviewSummationsApi.md#searchReviewSummations) | **GET** /reviewSummations | Search review summations.
87+
[**headReviewSummations**](docs/ReviewSummationsApi.md#headReviewSummations) | **HEAD** /reviewSummations | Same to search review summations, but only response status and headers information return.
88+
[**createReviewSummation**](docs/ReviewSummationsApi.md#createReviewSummation) | **POST** /reviewSummations | Create a review summation.
89+
[**getReviewSummation**](docs/ReviewSummationsApi.md#getReviewSummation) | **GET** /reviewSummations/{reviewSummationId} | Get the review summation.
90+
[**headReviewSummation**](docs/ReviewSummationsApi.md#headReviewSummation) | **HEAD** /reviewSummations/{reviewSummationId} | Same to get review summation, but only response status and headers information return.
91+
[**updateReviewSummation**](docs/ReviewSummationsApi.md#updateReviewSummation) | **PUT** /reviewSummations/{reviewSummationId} | Fully update review summation.
92+
[**patchReviewSummation**](docs/ReviewSummationsApi.md#patchReviewSummation) | **PATCH** /reviewSummations/{reviewSummationId} | Partially update review summation.
93+
[**deleteReviewSummation**](docs/ReviewSummationsApi.md#deleteReviewSummation) | **DELETE** /reviewSummations/{reviewSummationId} | Delete the review summation.
94+
8295
## Authorization
8396

8497
The wrapper internally generates a **JWT token using Auth0 credentials** and pass it in the `Authorization` header.

Verification.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
# Topcoder Submission API Wrapper
22

33
## Step to run tests
4-
1. run `source env.sh` to initialize process environment
4+
5+
1. Set the environment variables found in `test/testConfig.js`
56
2. run `npm run test` to run unit tests
67
3. run `npm run cov` to run unit tests and generate coverage report
78

89
## Test Coverage Report
910

10-
105 passing (2m)
11-
12-
-----------------------------------|----------|----------|----------|----------|-------------------|
13-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
14-
-----------------------------------|----------|----------|----------|----------|-------------------|
15-
All files | 98.86 | 84.62 | 100 | 98.86 | |
16-
submission-api-wrapper | 100 | 100 | 100 | 100 | |
17-
index.js | 100 | 100 | 100 | 100 | |
18-
submission-api-wrapper/src | 100 | 100 | 100 | 100 | |
19-
ReviewTypesApi.js | 100 | 100 | 100 | 100 | |
20-
ReviewsApi.js | 100 | 100 | 100 | 100 | |
21-
submission-api-wrapper/src/common | 96 | 81.82 | 100 | 96 | |
22-
helper.js | 96 | 81.82 | 100 | 96 | 63 |
23-
-----------------------------------|----------|----------|----------|----------|-------------------|
11+
172 passing (9m)
2412

13+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
14+
------------------------------------------ | ------- | -------- | ------- | ------- | -----------------
15+
All files | 99.14 | 84.62 | 100 | 99.14 |
16+
topcoder-submission-api-wrapper | 100 | 100 | 100 | 100 |
17+
index.js | 100 | 100 | 100 | 100 |
18+
topcoder-submission-api-wrapper/src | 100 | 100 | 100 | 100 |
19+
ReviewSummationsApi.js | 100 | 100 | 100 | 100 |
20+
ReviewTypesApi.js | 100 | 100 | 100 | 100 |
21+
ReviewsApi.js | 100 | 100 | 100 | 100 |
22+
topcoder-submission-api-wrapper/src/common | 96 | 81.82 | 100 | 96 |
23+
helper.js | 96 | 81.82 | 100 | 96 | 63

docs/ReviewSummation.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Review Summation
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **String** | The review summation id. |
7+
**submissionId** | **String** | The submission id. |
8+
**aggregateScore** | **Number** | The aggregate score. |Double
9+
**scoreCardId** | **Number or String** | The score card id. |GUID string in swagger but integer in implementation
10+
**isPassing** | **Boolean** | The passing boolean flag. |
11+
**metadata** | **Object** | The review summation's metadata. | Optional
12+
**created** | **String** | The ISO date string of created date. |
13+
**updated** | **String** | The ISO date string of updated date. |
14+
**createdBy** | **String** | The created by user. |
15+
**updatedBy** | **String** | The updated by user. |
16+

docs/ReviewSummationData.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ReviewSummationData
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**submissionId** | **String** | The submission id. |
7+
**aggregateScore** | **Number** | The aggregate score. |Double
8+
**scoreCardId** | **Number or String** | The score card id. |GUID string in swagger but integer in implementation
9+
**isPassing** | **Boolean** | The passing boolean flag. |
10+
**metadata** | **Object** | The review summation's metadata. | Optional
11+

0 commit comments

Comments
 (0)