New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fishpi

Package Overview
Dependencies
Maintainers
0
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fishpi - npm Package Compare versions

Comparing version 0.0.53 to 0.0.54

18

lib/article.d.ts

@@ -1,2 +0,2 @@

import { ApiResponse, ArticlePost, ArticleListType, ArticleDetail, VoteStatus, ArticleList, ArticleType } from './typing';
import { ApiResponse, ArticlePost, ArticleListType, ArticleDetail, ArticleList, ArticleType, VoteType } from './typing';
import ReconnectingWebSocket from 'reconnecting-websocket';

@@ -38,8 +38,20 @@ declare class Article {

*/
list({ type, page, tag }: {
list({ type, page, size, tag }: {
type: ArticleListType;
page?: number;
size?: number;
tag?: string;
}): Promise<ApiResponse<ArticleList>>;
/**
* 查询文章列表
* @param type 查询类型
* @param tag 指定查询标签,可选
* @returns 文章列表
*/
listByUser({ user, page, size }: {
user: string;
page?: number;
size?: number;
}): Promise<ApiResponse<ArticleList>>;
/**
* 查询用户文章列表

@@ -70,3 +82,3 @@ * @param userName 用户名

msg?: string;
type?: VoteStatus;
type?: VoteType;
}>;

@@ -73,0 +85,0 @@ /**

90

lib/article.js

@@ -158,17 +158,17 @@ "use strict";

Article.prototype.list = function (_a) {
var type = _a.type, _b = _a.page, page = _b === void 0 ? 1 : _b, tag = _a.tag;
var type = _a.type, _b = _a.page, page = _b === void 0 ? 1 : _b, _c = _a.size, size = _c === void 0 ? 20 : _c, tag = _a.tag;
return __awaiter(this, void 0, void 0, function () {
var rsp, e_3;
return __generator(this, function (_c) {
switch (_c.label) {
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
_c.trys.push([0, 2, , 3]);
_d.trys.push([0, 2, , 3]);
return [4 /*yield*/, (0, utils_1.request)({
url: "api/articles/".concat(tag !== undefined ? "tag/".concat(tag) : 'recent').concat(type, "?p=").concat(page, "&").concat(this._apiKey ? "apiKey=".concat(this._apiKey) : ''),
url: "api/articles/".concat(tag !== undefined ? "tag/".concat(tag) : 'recent').concat(type, "?p=").concat(page, "&size=").concat(size, "&").concat(this._apiKey ? "apiKey=".concat(this._apiKey) : ''),
})];
case 1:
rsp = _c.sent();
rsp = _d.sent();
return [2 /*return*/, rsp];
case 2:
e_3 = _c.sent();
e_3 = _d.sent();
throw e_3;

@@ -181,2 +181,30 @@ case 3: return [2 /*return*/];

/**
* 查询文章列表
* @param type 查询类型
* @param tag 指定查询标签,可选
* @returns 文章列表
*/
Article.prototype.listByUser = function (_a) {
var user = _a.user, _b = _a.page, page = _b === void 0 ? 1 : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
return __awaiter(this, void 0, void 0, function () {
var rsp, e_4;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
_d.trys.push([0, 2, , 3]);
return [4 /*yield*/, (0, utils_1.request)({
url: "api/user/".concat(user, "articles?p=").concat(page, "&size=").concat(size, "&").concat(this._apiKey ? "apiKey=".concat(this._apiKey) : ''),
})];
case 1:
rsp = _d.sent();
return [2 /*return*/, rsp];
case 2:
e_4 = _d.sent();
throw e_4;
case 3: return [2 /*return*/];
}
});
});
};
/**
* 查询用户文章列表

@@ -189,3 +217,3 @@ * @param userName 用户名

return __awaiter(this, void 0, void 0, function () {
var rsp, e_4;
var rsp, e_5;
return __generator(this, function (_c) {

@@ -202,4 +230,4 @@ switch (_c.label) {

case 2:
e_4 = _c.sent();
throw e_4;
e_5 = _c.sent();
throw e_5;
case 3: return [2 /*return*/];

@@ -218,3 +246,3 @@ }

return __awaiter(this, void 0, void 0, function () {
var rsp, i, i, e_5;
var rsp, i, i, e_6;
return __generator(this, function (_a) {

@@ -238,4 +266,4 @@ switch (_a.label) {

case 2:
e_5 = _a.sent();
throw e_5;
e_6 = _a.sent();
throw e_6;
case 3: return [2 /*return*/];

@@ -254,3 +282,3 @@ }

return __awaiter(this, void 0, void 0, function () {
var rsp, e_6;
var rsp, e_7;
return __generator(this, function (_a) {

@@ -272,4 +300,4 @@ switch (_a.label) {

case 2:
e_6 = _a.sent();
throw e_6;
e_7 = _a.sent();
throw e_7;
case 3: return [2 /*return*/];

@@ -286,3 +314,3 @@ }

return __awaiter(this, void 0, void 0, function () {
var rsp, e_7;
var rsp, e_8;
return __generator(this, function (_a) {

@@ -303,4 +331,4 @@ switch (_a.label) {

case 2:
e_7 = _a.sent();
throw e_7;
e_8 = _a.sent();
throw e_8;
case 3: return [2 /*return*/];

@@ -317,3 +345,3 @@ }

return __awaiter(this, void 0, void 0, function () {
var rsp, e_8;
var rsp, e_9;
return __generator(this, function (_a) {

@@ -335,4 +363,4 @@ switch (_a.label) {

case 2:
e_8 = _a.sent();
throw e_8;
e_9 = _a.sent();
throw e_9;
case 3: return [2 /*return*/];

@@ -349,3 +377,3 @@ }

return __awaiter(this, void 0, void 0, function () {
var rsp, e_9;
var rsp, e_10;
return __generator(this, function (_a) {

@@ -367,4 +395,4 @@ switch (_a.label) {

case 2:
e_9 = _a.sent();
throw e_9;
e_10 = _a.sent();
throw e_10;
case 3: return [2 /*return*/];

@@ -381,3 +409,3 @@ }

return __awaiter(this, void 0, void 0, function () {
var rsp, e_10;
var rsp, e_11;
return __generator(this, function (_a) {

@@ -398,4 +426,4 @@ switch (_a.label) {

case 2:
e_10 = _a.sent();
throw e_10;
e_11 = _a.sent();
throw e_11;
case 3: return [2 /*return*/];

@@ -412,3 +440,3 @@ }

return __awaiter(this, void 0, void 0, function () {
var rsp, e_11;
var rsp, e_12;
return __generator(this, function (_a) {

@@ -428,4 +456,4 @@ switch (_a.label) {

case 2:
e_11 = _a.sent();
throw e_11;
e_12 = _a.sent();
throw e_12;
case 3: return [2 /*return*/];

@@ -432,0 +460,0 @@ }

@@ -1,2 +0,2 @@

import { ApiResponse, BreezemoonContent } from './typing';
import { ApiResponse, BreezemoonContent, BreezemoonList } from './typing';
declare class Breezemoon {

@@ -20,2 +20,8 @@ private _apiKey;

/**
* 获取清风明月列表
* @param page 消息页码
* @param size 每页个数
*/
listByUser(user: string, page?: number, size?: number): Promise<ApiResponse<BreezemoonList>>;
/**
* 发送清风明月

@@ -22,0 +28,0 @@ * @param content 内容

@@ -85,2 +85,30 @@ "use strict";

/**
* 获取清风明月列表
* @param page 消息页码
* @param size 每页个数
*/
Breezemoon.prototype.listByUser = function (user, page, size) {
if (page === void 0) { page = 1; }
if (size === void 0) { size = 20; }
return __awaiter(this, void 0, void 0, function () {
var rsp, e_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, (0, utils_1.request)({
url: "api/user/".concat(user, "breezemoons?p=").concat(page, "&size=").concat(size, "&apiKey=").concat(this._apiKey)
})];
case 1:
rsp = _a.sent();
return [2 /*return*/, rsp];
case 2:
e_2 = _a.sent();
throw e_2;
case 3: return [2 /*return*/];
}
});
});
};
/**
* 发送清风明月

@@ -91,3 +119,3 @@ * @param content 内容

return __awaiter(this, void 0, void 0, function () {
var rsp, e_2;
var rsp, e_3;
return __generator(this, function (_a) {

@@ -109,4 +137,4 @@ switch (_a.label) {

case 2:
e_2 = _a.sent();
throw e_2;
e_3 = _a.sent();
throw e_3;
case 3: return [2 /*return*/];

@@ -113,0 +141,0 @@ }

@@ -535,6 +535,4 @@ "use strict";

data_1 = JSON.parse(content);
if (data_1.msgType === 'redPacket') {
content = data_1;
msg.type = 'redPacket';
}
content = data_1;
msg.type = data_1.msgType;
}

@@ -541,0 +539,0 @@ catch (e) { }

@@ -1,2 +0,2 @@

import { ApiResponse, CommentPost, VoteStatus } from './typing';
import { ApiResponse, CommentPost, VoteType } from './typing';
declare class Comment {

@@ -36,3 +36,3 @@ private _apiKey;

msg?: string;
type?: VoteStatus;
type?: VoteType;
}>;

@@ -39,0 +39,0 @@ /**

@@ -661,2 +661,6 @@ /**

/**
* 发送用户 Id
*/
userOId: string;
/**
* 发送者用户名

@@ -1230,2 +1234,18 @@ */

}
/**
* 用户清风明月列表
*/
export interface BreezemoonList {
/**
* 分页信息
*/
pagination: {
paginationPageCount: number;
paginationPageNums: Array<number>;
};
/**
* 清风明月列表
*/
breezemoons: Array<BreezemoonContent>;
}
export interface BreezemoonContent {

@@ -1834,3 +1854,3 @@ /**

/**
* 作者头像缩略图
* 文章缩略图
*/

@@ -2273,3 +2293,3 @@ articleThumbnailURL: string;

*/
export declare enum VoteStatus {
export declare enum VoteType {
/**

@@ -2276,0 +2296,0 @@ * 点赞

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArticleListType = exports.ArticleStatus = exports.YesNoStatus = exports.VoteStatus = exports.PublicStatus = exports.ArticleType = exports.ReportType = exports.ReportDataType = exports.NoticeType = exports.ChatRoomMessageType = exports.ChatMessageType = exports.ChatContentType = exports.ClientType = exports.MetalBase = exports.MetalAttr = exports.RedPacketType = exports.GestureType = exports.UserAppRole = exports.DataType = void 0;
exports.VoteType = exports.ArticleListType = exports.ArticleStatus = exports.YesNoStatus = exports.VoteStatus = exports.PublicStatus = exports.ArticleType = exports.ReportType = exports.ReportDataType = exports.NoticeType = exports.ChatRoomMessageType = exports.ChatMessageType = exports.ChatContentType = exports.ClientType = exports.MetalBase = exports.MetalAttr = exports.RedPacketType = exports.GestureType = exports.UserAppRole = exports.DataType = void 0;
var utils_1 = require("./utils");

@@ -584,11 +584,12 @@ /**

*/
(function (VoteStatus) {
var VoteType;
(function (VoteType) {
/**
* 点赞
*/
VoteStatus[VoteStatus["Voted"] = 0] = "Voted";
VoteType[VoteType["Voted"] = 0] = "Voted";
/**
* 取消点赞
*/
VoteStatus[VoteStatus["Unvote"] = -1] = "Unvote";
})(VoteStatus = exports.VoteStatus || (exports.VoteStatus = {}));
VoteType[VoteType["Unvote"] = -1] = "Unvote";
})(VoteType = exports.VoteType || (exports.VoteType = {}));
{
"name": "fishpi",
"version": "0.0.53",
"version": "0.0.54",
"description": "A Package to use API of fishpi.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc