microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ef14e11b4dec66f85f409f65f431d7e9549c601d

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

lib/app-center-node-client/src/appCenterClient.js

36lines · modecode

1/*
2 * Code generated by Microsoft (R) SwaggerTools.
3 * Changes may cause incorrect behavior and will be lost if the code is
4 * regenerated.
5 */
6
7/* jshint latedef:false */
8/* jshint forin:false */
9/* jshint noempty:false */
10
11'use strict';
12
13const AppCenterClientCredentials = require('./appCenterClientCredentials');
14const Account = require('./account/accountClient');
15const Codepush = require('./codepush/codepushClient');
16
17
18class AppCenterClient {
19 constructor(credentials, baseUrl = null, options = {}) {
20 let credentialsObject;
21 if (typeof(credentials) === 'string') {
22 credentialsObject = new AppCenterClientCredentials(credentials);
23 } else if (credentials instanceof AppCenterClientCredentials) {
24 credentialsObject = credentials;
25 } else {
26 throw new Error('Credentials is not a token or credentials object');
27 }
28
29 this.account = new Account(credentialsObject, baseUrl, options);
30
31 this.codepush = new Codepush(credentialsObject, baseUrl, options);
32
33 }
34}
35
36module.exports = AppCenterClient;