@glvnzn/web-sdk
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -1,1 +0,1 @@ | ||
function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},t.apply(this,arguments)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r=/*#__PURE__*/function(t){var r,i;function o(){return t.apply(this,arguments)||this}return i=t,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,e(r,i),o.prototype.get=function(t){return this.request("/games",{method:"GET"},{first:t.first?t.first.toString():"10"})},o}(/*#__PURE__*/function(){function e(t){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"http://site-api.opexacms.io/v1",this.siteId=t.siteId||"XubL48WAbKNdpyQ3h"}return e.prototype.request=function(e,r,i){var o=""+this.baseUrl+e,n={"Access-Control-Allow-Origin":"*","Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},s="";i&&(s=new URLSearchParams(i).toString());var a=t({},r,{headers:n});return fetch(o+(s?"?"+s:""),t({},a,{method:(null==r?void 0:r.method)||"GET"})).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},e}());exports.ScaleCMS=function(t){this.games=void 0,this.games=new r(t)}; | ||
function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},t.apply(this,arguments)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r=function t(e,r){void 0===r&&(r="");var i={};for(var o in e)if(e.hasOwnProperty(o)){var n=e[o],s=r?r+"."+o:o;"object"==typeof n&&null!==n?Object.assign(i,t(n,s)):i[s]=n}return i},i=/*#__PURE__*/function(r){var i,o;function n(){return r.apply(this,arguments)||this}return o=r,(i=n).prototype=Object.create(o.prototype),i.prototype.constructor=i,e(i,o),n.prototype.get=function(e){return this.request("/games",{method:"GET"},t({},{first:"10",pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},e))},n}(/*#__PURE__*/function(){function e(t){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"http://site-api.opexacms.io/v1",this.siteId=t.siteId||"XubL48WAbKNdpyQ3h"}return e.prototype.request=function(e,i,o){var n=""+this.baseUrl+e,s={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},a="";if(o){var p=r(o);a=new URLSearchParams(p).toString()}var u=t({},i,{headers:s});return fetch(n+(a?"?"+a:""),t({},u,{method:(null==i?void 0:i.method)||"GET"})).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},e}());exports.ScaleCMS=function(t){this.games=void 0,this.games=new i(t)}; |
@@ -1,1 +0,1 @@ | ||
function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},t.apply(this,arguments)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r=/*#__PURE__*/function(t){var r,i;function o(){return t.apply(this,arguments)||this}return i=t,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,e(r,i),o.prototype.get=function(t){return this.request("/games",{method:"GET"},{first:t.first?t.first.toString():"10"})},o}(/*#__PURE__*/function(){function e(t){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"http://site-api.opexacms.io/v1",this.siteId=t.siteId||"XubL48WAbKNdpyQ3h"}return e.prototype.request=function(e,r,i){var o=""+this.baseUrl+e,n={"Access-Control-Allow-Origin":"*","Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},s="";i&&(s=new URLSearchParams(i).toString());var a=t({},r,{headers:n});return fetch(o+(s?"?"+s:""),t({},a,{method:(null==r?void 0:r.method)||"GET"})).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},e}()),i=function(t){this.games=void 0,this.games=new r(t)};export{i as ScaleCMS}; | ||
function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},t.apply(this,arguments)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r=function t(e,r){void 0===r&&(r="");var i={};for(var o in e)if(e.hasOwnProperty(o)){var n=e[o],s=r?r+"."+o:o;"object"==typeof n&&null!==n?Object.assign(i,t(n,s)):i[s]=n}return i},i=/*#__PURE__*/function(r){var i,o;function n(){return r.apply(this,arguments)||this}return o=r,(i=n).prototype=Object.create(o.prototype),i.prototype.constructor=i,e(i,o),n.prototype.get=function(e){return this.request("/games",{method:"GET"},t({},{first:"10",pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},e))},n}(/*#__PURE__*/function(){function e(t){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"http://site-api.opexacms.io/v1",this.siteId=t.siteId||"XubL48WAbKNdpyQ3h"}return e.prototype.request=function(e,i,o){var n=""+this.baseUrl+e,s={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},a="";if(o){var p=r(o);a=new URLSearchParams(p).toString()}var u=t({},i,{headers:s});return fetch(n+(a?"?"+a:""),t({},u,{method:(null==i?void 0:i.method)||"GET"})).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},e}()),o=function(t){this.games=void 0,this.games=new i(t)};export{o as ScaleCMS}; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).webSdk={})}(this,function(t){function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},e.apply(this,arguments)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=/*#__PURE__*/function(t){var e,o;function n(){return t.apply(this,arguments)||this}return o=t,(e=n).prototype=Object.create(o.prototype),e.prototype.constructor=e,i(e,o),n.prototype.get=function(t){return this.request("/games",{method:"GET"},{first:t.first?t.first.toString():"10"})},n}(/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"http://site-api.opexacms.io/v1",this.siteId=t.siteId||"XubL48WAbKNdpyQ3h"}return t.prototype.request=function(t,i,o){var n=""+this.baseUrl+t,r={"Access-Control-Allow-Origin":"*","Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},s="";o&&(s=new URLSearchParams(o).toString());var a=e({},i,{headers:r});return fetch(n+(s?"?"+s:""),e({},a,{method:(null==i?void 0:i.method)||"GET"})).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},t}());t.ScaleCMS=function(t){this.games=void 0,this.games=new o(t)}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).webSdk={})}(this,function(t){function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},e.apply(this,arguments)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=function t(e,i){void 0===i&&(i="");var o={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r],s=i?i+"."+r:r;"object"==typeof n&&null!==n?Object.assign(o,t(n,s)):o[s]=n}return o},r=/*#__PURE__*/function(t){var o,r;function n(){return t.apply(this,arguments)||this}return r=t,(o=n).prototype=Object.create(r.prototype),o.prototype.constructor=o,i(o,r),n.prototype.get=function(t){return this.request("/games",{method:"GET"},e({},{first:"10",pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},t))},n}(/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"http://site-api.opexacms.io/v1",this.siteId=t.siteId||"XubL48WAbKNdpyQ3h"}return t.prototype.request=function(t,i,r){var n=""+this.baseUrl+t,s={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},a="";if(r){var p=o(r);a=new URLSearchParams(p).toString()}var f=e({},i,{headers:s});return fetch(n+(a?"?"+a:""),e({},f,{method:(null==i?void 0:i.method)||"GET"})).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},t}());t.ScaleCMS=function(t){this.games=void 0,this.games=new r(t)}}); |
@@ -0,1 +1,2 @@ | ||
import { QueryParams } from './games/types'; | ||
type Config = { | ||
@@ -11,4 +12,4 @@ apiKey: string; | ||
constructor(config: Config); | ||
protected request<T>(endpoint: string, options?: RequestInit, queryParams?: Record<string, string>): Promise<T>; | ||
protected request<T>(endpoint: string, options?: RequestInit, queryParams?: QueryParams): Promise<T>; | ||
} | ||
export {}; |
import { Base } from '../base'; | ||
import { Game } from './types'; | ||
import { QueryParams } from './types'; | ||
export declare class Games extends Base { | ||
get(params?: Record<string, string>): Promise<Game[]>; | ||
get(params?: QueryParams): Promise<Game[]>; | ||
} |
@@ -12,1 +12,10 @@ export declare type Game = { | ||
}; | ||
export declare type QueryParams = { | ||
first?: string; | ||
pageSize?: string; | ||
nextPageCursor?: string; | ||
filter?: { | ||
provider?: string; | ||
type?: string; | ||
}; | ||
}; |
{ | ||
"name": "@glvnzn/web-sdk", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
7999
10
75