twitter-openapi-typescript 0.0.36 → 0.0.38
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/README.md +23 -9
- package/cookies.json +85 -33
- package/dist/src/api.d.ts +11 -8
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +42 -66
- package/dist/src/api.js.map +1 -1
- package/dist/src/apis/postApi.d.ts +3 -0
- package/dist/src/apis/postApi.d.ts.map +1 -1
- package/dist/src/apis/postApi.js +19 -10
- package/dist/src/apis/postApi.js.map +1 -1
- package/dist/src/apis/tweetApi.d.ts.map +1 -1
- package/dist/src/apis/tweetApi.js +4 -4
- package/dist/src/apis/tweetApi.js.map +1 -1
- package/dist/src/apis/userListApi.d.ts.map +1 -1
- package/dist/src/apis/userListApi.js +2 -2
- package/dist/src/apis/userListApi.js.map +1 -1
- package/dist/src/utils/api.d.ts +1 -0
- package/dist/src/utils/api.d.ts.map +1 -1
- package/dist/src/utils/api.js +8 -1
- package/dist/src/utils/api.js.map +1 -1
- package/package.json +2 -2
- package/src/api.ts +39 -57
- package/src/apis/postApi.ts +15 -4
- package/src/apis/tweetApi.ts +5 -4
- package/src/apis/userListApi.ts +3 -2
- package/src/utils/api.ts +7 -0
- package/test/api/auth.test.ts +14 -0
- package/test/init.ts +3 -0
- package/dist/a.d.ts +0 -2
- package/dist/a.d.ts.map +0 -1
- package/dist/a.js +0 -57
- package/dist/a.js.map +0 -1
package/dist/a.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var api_1 = require("./src/api");
|
|
40
|
-
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var api, client, res;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
api = new api_1.TwitterOpenApi();
|
|
46
|
-
return [4 /*yield*/, api.getGuestClient()];
|
|
47
|
-
case 1:
|
|
48
|
-
client = _a.sent();
|
|
49
|
-
return [4 /*yield*/, client.getDefaultApi().getTweetResultByRestId({ tweetId: "1771078537694601545" })];
|
|
50
|
-
case 2:
|
|
51
|
-
res = _a.sent();
|
|
52
|
-
console.log(res.data);
|
|
53
|
-
return [2 /*return*/];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}); })();
|
|
57
|
-
//# sourceMappingURL=a.js.map
|
package/dist/a.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a.js","sourceRoot":"","sources":["../a.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAAuC;AAEvC,CAAC;;;;;gBACS,GAAG,GAAG,IAAI,oBAAc,EAAE,CAAC;gBAClB,qBAAM,GAAG,CAAC,cAAc,EAAE,EAAA;;gBAAnC,MAAM,GAAG,SAA0B;gBAC7B,qBAAM,MAAM,CAAC,aAAa,EAAE,CAAC,sBAAsB,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,EAAA;;gBAA7F,GAAG,GAAG,SAAuF;gBACnG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;;;;KACzB,CAAC,EAAE,CAAA"}
|