Skip to content

Commit b8c0793

Browse files
Initial commit - code generated from swagger codegen
0 parents  commit b8c0793

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+7407
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

.swagger-codegen-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Swagger Codegen Ignore
2+
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.swagger-codegen/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.4.0-SNAPSHOT

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- "6"
4+
- "6.1"
5+
- "5"
6+
- "5.11"
7+

README.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# topcoder_meta_services_rest_api
2+
3+
TopcoderMetaServicesRestApi - JavaScript client for topcoder_meta_services_rest_api
4+
REST API for Topcoder Meta Services. This describes a service that can give information on other services existing on Topcoder. Available service links can be listed by sending GET request. Also, each service can return links to further services in their responses. ### Pagination Requests that return multiple items will be paginated to 20 items by default. You can specify further pages with the ```page``` parameter. You can also set a custom page size up to 100 with the ```perPage``` parameter. Pagination response data is included in http headers. By Default, the response header contains links with ```next```, ```last```, ```first```, ```prev``` resource links.
5+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
6+
7+
- API version: 5.0.0
8+
- Package version: 5.0.0
9+
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
10+
For more information, please visit [http://www.topcoder.com/support](http://www.topcoder.com/support)
11+
12+
## Installation
13+
14+
### For [Node.js](https://nodejs.org/)
15+
16+
#### npm
17+
18+
To publish the library as a [npm](https://www.npmjs.com/),
19+
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
20+
21+
Then install it via:
22+
23+
```shell
24+
npm install topcoder_meta_services_rest_api --save
25+
```
26+
27+
##### Local development
28+
29+
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
30+
into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
31+
32+
```shell
33+
npm install
34+
```
35+
36+
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
37+
38+
```shell
39+
npm link
40+
```
41+
42+
Finally, switch to the directory you want to use your topcoder_meta_services_rest_api from, and run:
43+
44+
```shell
45+
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
46+
```
47+
48+
You should now be able to `require('topcoder_meta_services_rest_api')` in javascript files from the directory you ran the last
49+
command above from.
50+
51+
#### git
52+
#
53+
If the library is hosted at a git repository, e.g.
54+
https://github.com/GIT_USER_ID/GIT_REPO_ID
55+
then install it via:
56+
57+
```shell
58+
npm install GIT_USER_ID/GIT_REPO_ID --save
59+
```
60+
61+
### For browser
62+
63+
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
64+
the above steps with Node.js and installing browserify with `npm install -g browserify`,
65+
perform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually
66+
use this library):
67+
68+
```shell
69+
browserify main.js > bundle.js
70+
```
71+
72+
Then include *bundle.js* in the HTML pages.
73+
74+
### Webpack Configuration
75+
76+
Using Webpack you may encounter the following error: "Module not found: Error:
77+
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
78+
the following section to your webpack config:
79+
80+
```javascript
81+
module: {
82+
rules: [
83+
{
84+
parser: {
85+
amd: false
86+
}
87+
}
88+
]
89+
}
90+
```
91+
92+
## Getting Started
93+
94+
Please follow the [installation](#installation) instruction and execute the following JS code:
95+
96+
```javascript
97+
var TopcoderMetaServicesRestApi = require('topcoder_meta_services_rest_api');
98+
99+
var defaultClient = TopcoderMetaServicesRestApi.ApiClient.instance;
100+
101+
// Configure API key authorization: Bearer
102+
var Bearer = defaultClient.authentications['Bearer'];
103+
Bearer.apiKey = "YOUR API KEY"
104+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
105+
//Bearer.apiKeyPrefix['Authorization'] = "Token"
106+
107+
var api = new TopcoderMetaServicesRestApi.EventsApi()
108+
109+
var body = new TopcoderMetaServicesRestApi.EventPayload(); // {EventPayload}
110+
111+
112+
var callback = function(error, data, response) {
113+
if (error) {
114+
console.error(error);
115+
} else {
116+
console.log('API called successfully.');
117+
}
118+
};
119+
api.postEvent(body, callback);
120+
121+
```
122+
123+
## Documentation for API Endpoints
124+
125+
All URIs are relative to *https://api.topcoder.com/v5*
126+
127+
Class | Method | HTTP request | Description
128+
------------ | ------------- | ------------- | -------------
129+
*TopcoderMetaServicesRestApi.EventsApi* | [**postEvent**](docs/EventsApi.md#postEvent) | **POST** /bus/events | Post event to the message bus.
130+
*TopcoderMetaServicesRestApi.HealthchecksApi* | [**getHealth**](docs/HealthchecksApi.md#getHealth) | **GET** /bus/health | Check API is healthy.
131+
*TopcoderMetaServicesRestApi.HealthchecksApi* | [**headHealth**](docs/HealthchecksApi.md#headHealth) | **HEAD** /bus/health | Get only response status and headers information but no response body for the endpoint.
132+
*TopcoderMetaServicesRestApi.PlaceholdersApi* | [**clearPlaceholdersCache**](docs/PlaceholdersApi.md#clearPlaceholdersCache) | **DELETE** /bus/placeholders | Clear placeholders cache.
133+
*TopcoderMetaServicesRestApi.ServiceApi* | [**createService**](docs/ServiceApi.md#createService) | **POST** /bus/services | Create a service.
134+
*TopcoderMetaServicesRestApi.ServiceApi* | [**createServicePayload**](docs/ServiceApi.md#createServicePayload) | **POST** /bus/services/{serviceName}/payloads | Create the service payload.
135+
*TopcoderMetaServicesRestApi.ServiceApi* | [**deleteService**](docs/ServiceApi.md#deleteService) | **DELETE** /bus/services/{serviceName} | Delete the service.
136+
*TopcoderMetaServicesRestApi.ServiceApi* | [**deleteServicePayload**](docs/ServiceApi.md#deleteServicePayload) | **DELETE** /bus/services/{serviceName}/payloads/{payloadName} | Delete the service payload.
137+
*TopcoderMetaServicesRestApi.ServiceApi* | [**getService**](docs/ServiceApi.md#getService) | **GET** /bus/services/{serviceName} | Get the service.
138+
*TopcoderMetaServicesRestApi.ServiceApi* | [**getServicePayload**](docs/ServiceApi.md#getServicePayload) | **GET** /bus/services/{serviceName}/payloads/{payloadName} | Get the service payload.
139+
*TopcoderMetaServicesRestApi.ServiceApi* | [**getServicePayloads**](docs/ServiceApi.md#getServicePayloads) | **GET** /bus/services/{serviceName}/payloads | Search the service payloads.
140+
*TopcoderMetaServicesRestApi.ServiceApi* | [**getServices**](docs/ServiceApi.md#getServices) | **GET** /bus/services | Get all services.
141+
*TopcoderMetaServicesRestApi.ServiceApi* | [**headService**](docs/ServiceApi.md#headService) | **HEAD** /bus/services/{serviceName} | Get only response status and headers information but no response body for the endpoint.
142+
*TopcoderMetaServicesRestApi.ServiceApi* | [**headServicePayload**](docs/ServiceApi.md#headServicePayload) | **HEAD** /bus/services/{serviceName}/payloads/{payloadName} | Get only response status and headers information but no response body for the endpoint.
143+
*TopcoderMetaServicesRestApi.ServiceApi* | [**headServicePayloads**](docs/ServiceApi.md#headServicePayloads) | **HEAD** /bus/services/{serviceName}/payloads | Get only response status and headers information but no response body for the endpoint.
144+
*TopcoderMetaServicesRestApi.ServiceApi* | [**headServices**](docs/ServiceApi.md#headServices) | **HEAD** /bus/services | Get only response status and headers information but no response body for the endpoint.
145+
*TopcoderMetaServicesRestApi.ServiceApi* | [**patchService**](docs/ServiceApi.md#patchService) | **PATCH** /bus/services/{serviceName} | Partially update the service.
146+
*TopcoderMetaServicesRestApi.ServiceApi* | [**patchServicePayload**](docs/ServiceApi.md#patchServicePayload) | **PATCH** /bus/services/{serviceName}/payloads/{payloadName} | Partially update the payload.
147+
*TopcoderMetaServicesRestApi.ServiceApi* | [**updateService**](docs/ServiceApi.md#updateService) | **PUT** /bus/services/{serviceName} | Update the service.
148+
*TopcoderMetaServicesRestApi.ServiceApi* | [**updateServicePayload**](docs/ServiceApi.md#updateServicePayload) | **PUT** /bus/services/{serviceName}/payloads/{payloadName} | Update the service payload.
149+
*TopcoderMetaServicesRestApi.TopicsApi* | [**getTopics**](docs/TopicsApi.md#getTopics) | **GET** /bus/topics | Get topics.
150+
*TopcoderMetaServicesRestApi.TopicsApi* | [**headTopics**](docs/TopicsApi.md#headTopics) | **HEAD** /bus/topics | Get only response status and headers information but no response body for the endpoint.
151+
152+
153+
## Documentation for Models
154+
155+
- [TopcoderMetaServicesRestApi.Accepted](docs/Accepted.md)
156+
- [TopcoderMetaServicesRestApi.BadRequest](docs/BadRequest.md)
157+
- [TopcoderMetaServicesRestApi.Body](docs/Body.md)
158+
- [TopcoderMetaServicesRestApi.Body1](docs/Body1.md)
159+
- [TopcoderMetaServicesRestApi.Conflict](docs/Conflict.md)
160+
- [TopcoderMetaServicesRestApi.EventPayload](docs/EventPayload.md)
161+
- [TopcoderMetaServicesRestApi.Forbidden](docs/Forbidden.md)
162+
- [TopcoderMetaServicesRestApi.HealthCheckStatus](docs/HealthCheckStatus.md)
163+
- [TopcoderMetaServicesRestApi.NoContent](docs/NoContent.md)
164+
- [TopcoderMetaServicesRestApi.NotFound](docs/NotFound.md)
165+
- [TopcoderMetaServicesRestApi.NotModified](docs/NotModified.md)
166+
- [TopcoderMetaServicesRestApi.Payload](docs/Payload.md)
167+
- [TopcoderMetaServicesRestApi.ServerError](docs/ServerError.md)
168+
- [TopcoderMetaServicesRestApi.Service](docs/Service.md)
169+
- [TopcoderMetaServicesRestApi.Unauthorized](docs/Unauthorized.md)
170+
- [TopcoderMetaServicesRestApi.ExtendedService](docs/ExtendedService.md)
171+
172+
173+
## Documentation for Authorization
174+
175+
176+
### Bearer
177+
178+
- **Type**: API key
179+
- **API key parameter name**: Authorization
180+
- **Location**: HTTP header
181+

docs/Accepted.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# TopcoderMetaServicesRestApi.Accepted
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+

docs/BadRequest.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# TopcoderMetaServicesRestApi.BadRequest
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**message** | **String** | The bad request error message. | [optional]
7+
8+

docs/Body.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# TopcoderMetaServicesRestApi.Body
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **String** | The service name. | [optional]
7+
**version** | **String** | The service version. | [optional]
8+
**commitHash** | **String** | The service commit hash. | [optional]
9+
**description** | **String** | The service description. | [optional]
10+
**baseURL** | **String** | The service base URL. | [optional]
11+
**payloads** | [**[Payload]**](Payload.md) | The service payloads | [optional]
12+
13+

docs/Body1.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# TopcoderMetaServicesRestApi.Body1
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **String** | The payload name. | [optional]
7+
**topics** | **[String]** | The list of topics for a payload. | [optional]
8+
**payloadMimeType** | **String** | The payload mime type. | [optional]
9+
**payloadFormat** | **Object** | The payload format. | [optional]
10+
11+

docs/Conflict.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# TopcoderMetaServicesRestApi.Conflict
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**message** | **String** | The conflict error message. |
7+
8+

docs/EventPayload.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# TopcoderMetaServicesRestApi.EventPayload
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**topic** | **String** | Topic name should be a dot separated fully qualified name i.e. domain.type.operation. |
7+
**originator** | **String** | Service repository name, from where message is published. |
8+
**timestamp** | **Date** | Timestamp at which message is published. The date-time notation as defined by RFC 3339, section 5.6, for example, 2018-04-13T00:00:00Z |
9+
**mimeType** | **String** | Mime-type for &#39;payload&#39;. |
10+
**payload** | **Object** | Actual payload depending on mime-type for consumer. |
11+
12+

docs/EventsApi.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# TopcoderMetaServicesRestApi.EventsApi
2+
3+
All URIs are relative to *https://api.topcoder.com/v5*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**postEvent**](EventsApi.md#postEvent) | **POST** /bus/events | Post event to the message bus.
8+
9+
10+
<a name="postEvent"></a>
11+
# **postEvent**
12+
> postEvent(body)
13+
14+
Post event to the message bus.
15+
16+
Post an event to the message bus.
17+
18+
### Example
19+
```javascript
20+
var TopcoderMetaServicesRestApi = require('topcoder_meta_services_rest_api');
21+
var defaultClient = TopcoderMetaServicesRestApi.ApiClient.instance;
22+
23+
// Configure API key authorization: Bearer
24+
var Bearer = defaultClient.authentications['Bearer'];
25+
Bearer.apiKey = 'YOUR API KEY';
26+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
27+
//Bearer.apiKeyPrefix = 'Token';
28+
29+
var apiInstance = new TopcoderMetaServicesRestApi.EventsApi();
30+
31+
var body = new TopcoderMetaServicesRestApi.EventPayload(); // EventPayload |
32+
33+
34+
var callback = function(error, data, response) {
35+
if (error) {
36+
console.error(error);
37+
} else {
38+
console.log('API called successfully.');
39+
}
40+
};
41+
apiInstance.postEvent(body, callback);
42+
```
43+
44+
### Parameters
45+
46+
Name | Type | Description | Notes
47+
------------- | ------------- | ------------- | -------------
48+
**body** | [**EventPayload**](EventPayload.md)| |
49+
50+
### Return type
51+
52+
null (empty response body)
53+
54+
### Authorization
55+
56+
[Bearer](../README.md#Bearer)
57+
58+
### HTTP request headers
59+
60+
- **Content-Type**: application/json
61+
- **Accept**: application/json
62+

docs/ExtendedService.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# TopcoderMetaServicesRestApi.ExtendedService
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**serviceId** | **String** | The service id. | [optional]
7+
8+

docs/Forbidden.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# TopcoderMetaServicesRestApi.Forbidden
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**message** | **String** | The forbidden error message. | [optional]
7+
8+

docs/HealthCheckStatus.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# TopcoderMetaServicesRestApi.HealthCheckStatus
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**health** | **String** | Health check status. | [default to &#39;ok&#39;]
7+
8+

0 commit comments

Comments
 (0)