flex-plugins-api-client
Advanced tools
Comparing version 0.1.0 to 0.2.0
import { HttpClient } from 'flex-plugins-api-utils'; | ||
import { Realm } from 'flex-plugins-api-utils/dist/env'; | ||
export interface PaginationMeta { | ||
@@ -13,7 +14,10 @@ meta: { | ||
} | ||
export interface PluginServiceHttpOption { | ||
realm?: Realm; | ||
} | ||
export default class PluginServiceHttp extends HttpClient { | ||
private static realms; | ||
private static version; | ||
constructor(username: string, password: string); | ||
constructor(username: string, password: string, options?: PluginServiceHttpOption); | ||
private static getRealm; | ||
} |
@@ -19,5 +19,5 @@ "use strict"; | ||
__extends(PluginServiceHttp, _super); | ||
function PluginServiceHttp(username, password) { | ||
function PluginServiceHttp(username, password, options) { | ||
return _super.call(this, { | ||
baseURL: "https://flex-api" + PluginServiceHttp.getRealm() + ".twilio.com/" + PluginServiceHttp.version + "/PluginService", | ||
baseURL: "https://flex-api" + PluginServiceHttp.getRealm(options && options.realm) + ".twilio.com/" + PluginServiceHttp.version + "/PluginService", | ||
auth: { username: username, password: password }, | ||
@@ -28,4 +28,7 @@ }) || this; | ||
PluginServiceHttp.version = 'v1'; | ||
PluginServiceHttp.getRealm = function () { | ||
var realm = flex_plugins_api_utils_1.env.getRealm(); | ||
PluginServiceHttp.getRealm = function (realm) { | ||
if (realm && PluginServiceHttp.realms.includes(realm)) { | ||
return "." + realm; | ||
} | ||
realm = flex_plugins_api_utils_1.env.getRealm(); | ||
if (!realm) { | ||
@@ -32,0 +35,0 @@ return ''; |
{ | ||
"name": "flex-plugins-api-client", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Flex Plugins API Client", | ||
@@ -52,5 +52,5 @@ "keywords": [ | ||
"dependencies": { | ||
"flex-plugins-api-utils": "^0.1.0" | ||
"flex-plugins-api-utils": "^0.2.0" | ||
}, | ||
"gitHead": "2ea63ced69f0378658bc6b9a632995afa4fad622" | ||
"gitHead": "a00bb3685f9ba77b075f921b87c736683827f4a4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
39236
24
626
0
38
+ Addedflex-plugins-api-utils@0.2.0(transitive)
- Removedflex-plugins-api-utils@0.1.0(transitive)