@xtsea/tgcore-ts 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +25 -1
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +25 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -166,6 +166,29 @@ var CallMethods = class {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
+
// src/orweb/pinterest.ts
|
|
170
|
+
var PinterestBuilder = class extends BaseCallBuilder {
|
|
171
|
+
query(text) {
|
|
172
|
+
return this.set("query", text);
|
|
173
|
+
}
|
|
174
|
+
limit(limit = 10) {
|
|
175
|
+
return this.set("limit", limit);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// src/orweb/index.ts
|
|
180
|
+
var OrWebMethods = class {
|
|
181
|
+
constructor(client) {
|
|
182
|
+
this.client = client;
|
|
183
|
+
}
|
|
184
|
+
pinterest() {
|
|
185
|
+
return new PinterestBuilder(
|
|
186
|
+
this.client,
|
|
187
|
+
"/api/web/pinterest"
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
169
192
|
// src/client.ts
|
|
170
193
|
function tgcore(options) {
|
|
171
194
|
return new Client(options);
|
|
@@ -178,11 +201,12 @@ var Client = class {
|
|
|
178
201
|
}
|
|
179
202
|
this.http = new Http({
|
|
180
203
|
api_key: opts.api_key,
|
|
181
|
-
base_url: opts.base_url ?? "https://
|
|
204
|
+
base_url: opts.base_url ?? "https://tgcore.ryzenths.dpdns.org",
|
|
182
205
|
timeout_ms: opts.timeout_ms ?? 3e4
|
|
183
206
|
});
|
|
184
207
|
this.calls = new CallMethods(this);
|
|
185
208
|
this.raw = new RawMethods(this);
|
|
209
|
+
this.orweb = new OrWebMethods(this);
|
|
186
210
|
}
|
|
187
211
|
use(mw) {
|
|
188
212
|
this.middlewares.push(mw);
|
package/dist/index.d.cts
CHANGED
|
@@ -49,6 +49,17 @@ declare class CallMethods {
|
|
|
49
49
|
sendPhoto(): SendPhotoBuilder;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
declare class PinterestBuilder extends BaseCallBuilder {
|
|
53
|
+
query(text: string): this;
|
|
54
|
+
limit(limit?: number): this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare class OrWebMethods {
|
|
58
|
+
private client;
|
|
59
|
+
constructor(client: any);
|
|
60
|
+
pinterest(): PinterestBuilder;
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
type ClientOptions = {
|
|
53
64
|
api_key: string;
|
|
54
65
|
base_url?: string;
|
|
@@ -67,6 +78,7 @@ declare class Client {
|
|
|
67
78
|
private middlewares;
|
|
68
79
|
raw: RawMethods;
|
|
69
80
|
calls: CallMethods;
|
|
81
|
+
orweb: OrWebMethods;
|
|
70
82
|
use(mw: Middleware): this;
|
|
71
83
|
constructor(opts: ClientOptions);
|
|
72
84
|
request(path: string, body?: any): Promise<any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,17 @@ declare class CallMethods {
|
|
|
49
49
|
sendPhoto(): SendPhotoBuilder;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
declare class PinterestBuilder extends BaseCallBuilder {
|
|
53
|
+
query(text: string): this;
|
|
54
|
+
limit(limit?: number): this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare class OrWebMethods {
|
|
58
|
+
private client;
|
|
59
|
+
constructor(client: any);
|
|
60
|
+
pinterest(): PinterestBuilder;
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
type ClientOptions = {
|
|
53
64
|
api_key: string;
|
|
54
65
|
base_url?: string;
|
|
@@ -67,6 +78,7 @@ declare class Client {
|
|
|
67
78
|
private middlewares;
|
|
68
79
|
raw: RawMethods;
|
|
69
80
|
calls: CallMethods;
|
|
81
|
+
orweb: OrWebMethods;
|
|
70
82
|
use(mw: Middleware): this;
|
|
71
83
|
constructor(opts: ClientOptions);
|
|
72
84
|
request(path: string, body?: any): Promise<any>;
|
package/dist/index.js
CHANGED
|
@@ -138,6 +138,29 @@ var CallMethods = class {
|
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
+
// src/orweb/pinterest.ts
|
|
142
|
+
var PinterestBuilder = class extends BaseCallBuilder {
|
|
143
|
+
query(text) {
|
|
144
|
+
return this.set("query", text);
|
|
145
|
+
}
|
|
146
|
+
limit(limit = 10) {
|
|
147
|
+
return this.set("limit", limit);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// src/orweb/index.ts
|
|
152
|
+
var OrWebMethods = class {
|
|
153
|
+
constructor(client) {
|
|
154
|
+
this.client = client;
|
|
155
|
+
}
|
|
156
|
+
pinterest() {
|
|
157
|
+
return new PinterestBuilder(
|
|
158
|
+
this.client,
|
|
159
|
+
"/api/web/pinterest"
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
141
164
|
// src/client.ts
|
|
142
165
|
function tgcore(options) {
|
|
143
166
|
return new Client(options);
|
|
@@ -150,11 +173,12 @@ var Client = class {
|
|
|
150
173
|
}
|
|
151
174
|
this.http = new Http({
|
|
152
175
|
api_key: opts.api_key,
|
|
153
|
-
base_url: opts.base_url ?? "https://
|
|
176
|
+
base_url: opts.base_url ?? "https://tgcore.ryzenths.dpdns.org",
|
|
154
177
|
timeout_ms: opts.timeout_ms ?? 3e4
|
|
155
178
|
});
|
|
156
179
|
this.calls = new CallMethods(this);
|
|
157
180
|
this.raw = new RawMethods(this);
|
|
181
|
+
this.orweb = new OrWebMethods(this);
|
|
158
182
|
}
|
|
159
183
|
use(mw) {
|
|
160
184
|
this.middlewares.push(mw);
|