Adding some comments.

This commit is contained in:
Dessalines 2021-01-24 12:37:04 -05:00
parent c4e66821c6
commit 9bd5dab517
7 changed files with 491 additions and 482 deletions

View file

@ -103,6 +103,11 @@ export class LemmyHttp {
private baseUrl: string;
private headers: { [key: string]: string } = {};
/**
* Generates a new instance of LemmyHttp
* @param baseUrl the full base url: https://lemmy.ml/api/v2
* @param headers optional headers. Should contain x-real-ip and x-forwarded-for
*/
constructor(baseUrl: string, headers?: { [key: string]: string }) {
this.baseUrl = baseUrl;

View file

@ -105,7 +105,7 @@ export interface ResolveCommentReportResponse {
export interface ListCommentReports {
page?: number;
limit?: number;
/// if no community is given, it returns reports for all communities moderated by the auth user
// if no community is given, it returns reports for all communities moderated by the auth user
community?: number;
auth: string;
}

View file

@ -94,7 +94,7 @@ export interface SiteResponse {
}
export interface GetSiteResponse {
site_view?: SiteView; // Because the site might not be set up y,
site_view?: SiteView; // Because the site might not be set up yet
admins: UserViewSafe[];
banned: UserViewSafe[];
online: number;

View file

@ -1,3 +1,6 @@
/**
* All of the websocket operations available
*/
export enum UserOperation {
Login,
Register,

View file

@ -1,5 +1,3 @@
import { ListingType, SortType } from './others';
export interface UserSafe {
id: number;
name: string;

View file

@ -66,6 +66,9 @@ import {
import { UserJoin, PostJoin, CommunityJoin } from './interfaces/api/websocket';
import { UserOperation } from './interfaces/others';
/**
* Helps build lemmy websocket message requests, that you can use in your Websocket sends
*/
export class LemmyWebsocket {
constructor() {}

956
yarn.lock

File diff suppressed because it is too large Load diff