Skip to content

Commit

Permalink
add jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
EdamAme-x committed Aug 19, 2024
1 parent 4806fef commit 7a00af2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
8 changes: 8 additions & 0 deletions packages/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* @module
* LINE SelfBot Client
*/

/**
* @description LINE SelfBot Client
*/
export class Client {
constructor() {
throw new Error("not impl")
Expand Down
17 changes: 16 additions & 1 deletion packages/utils/obs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Utility for LINE OBS
*/

import { ALL_STRING, WEB_SCHEME_PREFIX } from "../common/types.ts";
import type { ALL_STRING, WEB_SCHEME_PREFIX } from "../common/types.ts";

type LINE_OBS_PREFIX =
| "obs://"
Expand All @@ -12,19 +12,34 @@ type LINE_OBS_PREFIX =
| WEB_SCHEME_PREFIX<"obs.line-apps.com/">
| ALL_STRING;

/**
* @description LINE Obs Utility
*/
class LINE_OBS_BASE {
constructor(
public prefix: LINE_OBS_PREFIX = "obs://",
) {}

/**
* @param hash {string} obs hash
* @returns line-obs url
*/
public createURI(hash: string): string {
return this.prefix + hash;
}

/**
* @param mid {string} user mid
* @returns line-obs profile-image url
*/
public createProfileImage(mid: string): string {
return this.prefix + "os/p/" + mid;
}

/**
* @param gid {string} group id
* @returns line-obs group-image url
*/
public createGroupImage(gid: string): string {
return this.prefix + "os/g/" + gid;
}
Expand Down
11 changes: 10 additions & 1 deletion packages/utils/scheme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@
* Utility for LINE Scheme URI
*/

import { ALL_STRING, WEB_SCHEME_PREFIX } from "../common/types.ts";
import type { ALL_STRING, WEB_SCHEME_PREFIX } from "../common/types.ts";

type LINE_SCHEME_PREFIX =
| "line://"
| WEB_SCHEME_PREFIX<"line.me/R/">
| WEB_SCHEME_PREFIX<"line.naver.jp/R/">
| ALL_STRING;

/**
* @description LINE Scheme Utility
*/
class LINE_SCHEME_BASE {
constructor(
public prefix: LINE_SCHEME_PREFIX = "line://",
) {}

/**
* @returns home url
*/
public getHome(): string {
return this.prefix + "home";
}

/**
* @returns user profile setting url
*/
public getProfile(): string {
return this.prefix + "profile";
}
Expand Down

0 comments on commit 7a00af2

Please sign in to comment.