mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-12-22 19:01:27 +00:00
Adding some comments.
This commit is contained in:
parent
c4e66821c6
commit
9bd5dab517
7 changed files with 491 additions and 482 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* All of the websocket operations available
|
||||
*/
|
||||
export enum UserOperation {
|
||||
Login,
|
||||
Register,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { ListingType, SortType } from './others';
|
||||
|
||||
export interface UserSafe {
|
||||
id: number;
|
||||
name: string;
|
||||
|
|
|
@ -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() {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue