### Start and Manage a Call Session Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/call.md Initiate and manage a call using `CallSession`. This example demonstrates starting a session, sending audio data, and ending the call. It uses `PlanetTransport` for PLANET audio, requiring a `00` payload prefix. ```typescript const session = client.call.startSession({ to, kind: "AUDIO", transport: new PlanetTransport({ localMid, mediaKeyMode: "audio-reverse-stage", }), }); await session.start(); await session.sendBuffer({ samples, sampleRate: 48_000, channels: 1, }); await session.end(); ``` -------------------------------- ### Install LINEJS with npm, Bun, or Deno Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/start.md Use these commands to install the LINEJS library depending on your package manager. ```bash npx jsr add @evex/linejs # If you use npm ``` ```bash bunx --bun jsr add @evex/linejs # If you use Bun ``` ```bash deno add @evex/linejs # If you use Deno ``` -------------------------------- ### Install @evex/linejs Source: https://github.com/evex-dev/linejs/blob/main/skills/linejs/SKILL.md Install the @evex/linejs package and its types using Deno. The latest release can be checked on JSR. ```sh deno add jsr:@evex/linejs # Types are also available standalone: deno add jsr:@evex/linejs-types ``` -------------------------------- ### Install LINEJS using JSR Source: https://github.com/evex-dev/linejs/blob/main/packages/linejs/README.md Install LINEJS using npm, bunx, or deno. This command adds the library to your project. ```bash npx jsr add @evex/linejs bunx --bun jsr add @evex/linejs denp add @evex/linejs ``` -------------------------------- ### Start Photobooth Session Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/CallService.txt Initiates a photobooth session. This method requires parameters for starting the photobooth and client configuration. ```typescript async startPhotobooth( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.startPhotobooth_args(...param), "startPhotobooth", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Install LINEJS using JSR Source: https://github.com/evex-dev/linejs/blob/main/README.md Install the LINEJS library using the JSR package manager for Node.js, Deno, or Bun. ```llvm npx jsr add @evex/linejs bunx --bun jsr add @evex/linejs deno add @evex/linejs ``` -------------------------------- ### Notify Installed API Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Notifies that an application has been installed. ```APIDOC ## POST /api/notifyInstalled ### Description Notifies that an application has been installed. ### Method POST ### Endpoint /api/notifyInstalled ### Parameters #### Request Body - **param** (Parameters) - Required - Arguments for notifying installation. ### Response #### Success Response (200) - **void** - Indicates successful execution. ### Request Example ```json { "param": { /* arguments for notifyInstalled */ } } ``` ### Response Example ```json {} ``` ``` -------------------------------- ### GET /products/by-version/{productId}/{version} Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves a specific version of a product. ```APIDOC ## GET /products/by-version/{productId}/{version} ### Description Retrieves a specific version of a product. ### Method GET ### Endpoint /products/by-version/{productId}/{version} ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. - **version** (string) - Required - The specific version of the product to retrieve. ### Response #### Success Response (200) - **productId** (string) - The unique identifier of the product. - **productName** (string) - The name of the product. - **version** (string) - The version of the product. - **releaseDate** (string) - The release date of this product version. #### Response Example ```json { "productId": "prod_456", "productName": "Super Widget", "version": "1.5", "releaseDate": "2023-05-15T00:00:00Z" } ``` ``` -------------------------------- ### Install LINEJS as an AI coding agent skill Source: https://github.com/evex-dev/linejs/blob/main/packages/linejs/README.md Install LINEJS as a skill for AI coding agents like Codex and Claude Code. This allows agents to understand and work with the library. ```sh npx skills add evex-dev/linejs --skill linejs ``` -------------------------------- ### GET /purchased-products Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves a list of products purchased by the user. ```APIDOC ## GET /purchased-products ### Description Retrieves a list of products purchased by the user. ### Method GET ### Endpoint /purchased-products ### Parameters #### Query Parameters - **userId** (string) - Required - The unique identifier of the user. ### Response #### Success Response (200) - **purchasedProducts** (array) - A list of purchased product objects. - **productId** (string) - The unique identifier of the product. - **productName** (string) - The name of the product. - **purchaseDate** (string) - The date and time of purchase. - **orderId** (string) - The identifier of the order associated with the purchase. #### Response Example ```json { "purchasedProducts": [ { "productId": "prod_abc", "productName": "Digital Art Pack", "purchaseDate": "2023-10-26T14:30:00Z", "orderId": "order_xyz789" } ] } ``` ``` -------------------------------- ### GET /products/owned/summaries Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves summaries of products owned by the user. ```APIDOC ## GET /products/owned/summaries ### Description Retrieves summaries of products owned by the user. ### Method GET ### Endpoint /products/owned/summaries ### Parameters #### Query Parameters - **userId** (string) - Required - The unique identifier of the user. ### Response #### Success Response (200) - **ownedProducts** (array) - A list of owned product summary objects. - **productId** (string) - The unique identifier of the product. - **productName** (string) - The name of the product. - **purchaseDate** (string) - The date the product was purchased. #### Response Example ```json { "ownedProducts": [ { "productId": "prod_xyz", "productName": "Premium Subscription", "purchaseDate": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Get Coin Products Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/CoinService.txt Retrieves a list of available coin products for purchase. ```APIDOC ## GET /coin/products ### Description Retrieves a list of available coin products for purchase. ### Method GET ### Endpoint /coin/products ### Parameters #### Query Parameters - **userId** (string) - Required - The ID of the user. - **country** (string) - Optional - The country code for filtering products. ### Response #### Success Response (200) - **products** (array) - A list of available coin products. - **productId** (string) - The ID of the product. - **name** (string) - The name of the product. - **description** (string) - The description of the product. - **price** (integer) - The price of the product. - **amount** (integer) - The number of coins included in the product. #### Response Example ```json { "products": [ { "productId": "prod789", "name": "100 Coins Pack", "description": "Get 100 LINE Coins.", "price": 1000, "amount": 100 } ] } ``` ``` -------------------------------- ### Get Buddy Live Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/BuddyService.txt Retrieves live information about a buddy. ```APIDOC ## GET /evex-dev/linejs/getBuddyLive ### Description Retrieves live information about a buddy. ### Method GET ### Endpoint /evex-dev/linejs/getBuddyLive ### Parameters #### Query Parameters - **...param** (any) - Required - Parameters for the getBuddyLive function. ### Response #### Success Response (200) - **result** (object) - The result of the getBuddyLive operation. ``` -------------------------------- ### GET /products/validation-scheme Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves the validation scheme for product data. ```APIDOC ## GET /products/validation-scheme ### Description Retrieves the validation scheme for product data. ### Method GET ### Endpoint /products/validation-scheme ### Response #### Success Response (200) - **validationScheme** (object) - An object detailing the validation rules for product fields. - **productId** (object) - Rules for the productId field. - **type** (string) - Data type (e.g., "string"). - **required** (boolean) - Whether the field is required. - **maxLength** (integer) - Maximum allowed length. - **productName** (object) - Rules for the productName field. - **type** (string) - Data type (e.g., "string"). - **required** (boolean) - Whether the field is required. - **minLength** (integer) - Minimum allowed length. #### Response Example ```json { "validationScheme": { "productId": { "type": "string", "required": true, "maxLength": 50 }, "productName": { "type": "string", "required": true, "minLength": 3 } } } ``` ``` -------------------------------- ### Start Update Verification - LINE API Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Initiates the verification process for an update. Requires specific arguments. ```typescript async startUpdateVerification( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.startUpdateVerification_args(...param), "startUpdateVerification", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Start Update Verification API Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Initiates the process to update verification status. ```APIDOC ## POST /api/startUpdateVerification ### Description Initiates the process to update verification status. ### Method POST ### Endpoint /api/startUpdateVerification ### Parameters #### Request Body - **param** (Parameters) - Required - Arguments for starting the verification update. ### Response #### Success Response (200) - **result** (LINETypes.startUpdateVerification_result["success"]) - The result of initiating the verification update. ### Request Example ```json { "param": { /* arguments for startUpdateVerification */ } } ``` ### Response Example ```json { "result": { /* verification update initiation details */ } } ``` ``` -------------------------------- ### Get Suggest Dictionary Setting Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves the suggest dictionary setting. Ensure parameters match LINEStruct.getSuggestDictionarySetting_args. ```typescript async getSuggestDictionarySetting( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.getSuggestDictionarySetting_args(...param), "getSuggestDictionarySetting", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Get LINE Settings Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Fetches the settings for the LINE service. The operation is identified as 'getSettings'. ```typescript async getSettings( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.getSettings_args(...param), "getSettings", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### GET /products/v2/{productId} Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves detailed information for a specific product using version 2 of the API. ```APIDOC ## GET /products/v2/{productId} ### Description Retrieves detailed information for a specific product using version 2 of the API. ### Method GET ### Endpoint /products/v2/{productId} ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. ### Response #### Success Response (200) - **productId** (string) - The unique identifier of the product. - **productName** (string) - The name of the product. - **description** (string) - A detailed description of the product. - **price** (number) - The price of the product. - **version** (string) - The version of the product. #### Response Example ```json { "productId": "prod_123", "productName": "Awesome Gadget", "description": "A revolutionary gadget that will change your life.", "price": 99.99, "version": "2.0" } ``` ``` -------------------------------- ### Initialize and Use BaseClient Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/methods.md Demonstrates initializing BaseClient with device and version, setting up event listeners for pincall, qrcall, and update:authtoken, and performing various login methods. ```typescript import { BaseClient } from "@evex/linejs/base"; const client = new BaseClient({ device: "DESKTOPWIN", version: "9.7.0.3556" }); client.on("pincall", (pin) => { }); client.on("qrcall", (qrUrl) => { }); client.on("update:authtoken", (authToken) => { }); await client.loginProcess.login({ authToken: "...", }); await client.loginProcess.login({ email: "...", password: "...", pincode: "123456", }); await client.loginProcess.login({ qr: true, }); client.square // = SquareService client.talk // = TalkService // event polling const polling = client.createPolling(); for await (const operation of polling.listenTalkEvents()) { } for await (const event of polling.listenSquareEvents()) { } ``` -------------------------------- ### Initialize Line.js Client with Options Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/client-options.md Demonstrates initializing the client with various options like device, version, endpoint, custom fetch, and storage. ```typescript const client = await loginWithPassword({ email: "", password: "", onPincodeRequest(pin) { console.log(pin); }, }, { device: "IOSIPAD", version: "14.0.1", endpoint: "example.com", fetch: (req) => fetch(req), storage: new FileStorage("./storage.json"), }); ``` -------------------------------- ### Get Popular Keywords - LINE SDK Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SquareService.txt Retrieves a list of popular keywords within the square service. This method does not require specific parameters beyond the standard request setup. ```typescript async getPopularKeywords( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.SquareService_getPopularKeywords_args(...param), "getPopularKeywords", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Login with Password and Initialize Client Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/start.md Demonstrates how to log in using email and password and set up the LINEJS client. Requires an email, password, and a pincode handler for authentication. ```typescript import { loginWithPassword } from "@evex/linejs"; const client = await loginWithPassword({ email: 'you@example.com', // e-mail address password: 'password', // Password onPincodeRequest(pincode) { console.log('Enter this pincode to your LINE app:', pincode) } }, { device: "IOSIPAD" }) ``` -------------------------------- ### Notify Installed - LINE API Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Notifies LINE services that an application has been installed. This operation returns void. ```typescript async notifyInstalled( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.notifyInstalled_args(...param), "notifyInstalled", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Get Settings API Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Retrieves the user's current settings within the LINE application. ```APIDOC ## GET /settings ### Description Retrieves the current settings of the user. ### Method GET ### Endpoint /settings ### Response #### Success Response (200) - **notificationSetting** (boolean) - Indicates if notifications are enabled. - **privacySetting** (object) - User's privacy settings. - **allowFriendRequest** (boolean) - Whether to allow friend requests. #### Response Example ```json { "notificationSetting": true, "privacySetting": { "allowFriendRequest": false } } ``` ``` -------------------------------- ### Start Audio Call with Custom WAV Source: https://github.com/evex-dev/linejs/blob/main/example/call/README.md Initiates an audio call and streams a custom WAV file specified as a command-line argument. Ensure the WAV file is 16-bit PCM. ```sh LINE_AUTH_TOKEN_FILE=/path/to/auth-token.txt \ LINE_DEVICE=ANDROID \ deno run -A example/call/call_on_command.ts ./voice.wav ``` -------------------------------- ### GET /evex-dev/linejs/chats Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Retrieves a list of chats. ```APIDOC ## GET /evex-dev/linejs/chats ### Description Retrieves a list of chats. ### Method GET ### Endpoint /evex-dev/linejs/chats ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **result** (object) - A list of chats. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Login with Email and Password Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/start-2.md Use this method to log in with your email and password. It requires handling a pincode request and returns a client instance. The device type can be specified. ```typescript import { loginWithPassword } from "@evex/linejs"; const client = await loginWithPassword({ email: 'you@example.com', // e-mail address password: 'password', // Password onPincodeRequest(pincode) { console.log('Enter this pincode to your LINE app:', pincode) } }, { device: "IOSIPAD" }) console.log(await client.getMyProfile()); ``` -------------------------------- ### Start Audio Call with Default WAV Source: https://github.com/evex-dev/linejs/blob/main/example/call/README.md Initiates an audio call in a Talk chat and streams the default 'unity.wav'. Works for both 1:1 and group chats. ```sh LINE_AUTH_TOKEN_FILE=/path/to/auth-token.txt \ LINE_DEVICE=ANDROID \ deno run -A example/call/call_on_command.ts ``` -------------------------------- ### GET /student-information Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves information about a student. ```APIDOC ## GET /student-information ### Description Retrieves information about a student. ### Method GET ### Endpoint /student-information ### Parameters #### Query Parameters - **studentId** (string) - Required - The unique identifier of the student. ### Response #### Success Response (200) - **studentId** (string) - The unique identifier of the student. - **studentName** (string) - The name of the student. - **major** (string) - The student's major. - **enrollmentStatus** (string) - The student's enrollment status. #### Response Example ```json { "studentId": "stu_456", "studentName": "Jane Doe", "major": "Computer Science", "enrollmentStatus": "Enrolled" } ``` ``` -------------------------------- ### Implement bulkGetSetting Method Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SettingsService.txt This method facilitates bulk retrieval of settings using the LINE API client. Ensure the client is properly initialized and the protocol type is correctly set. ```typescript async bulkGetSetting( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.bulkGetSetting_args(...param), "bulkGetSetting", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### GET /evex-dev/linejs/notification/settings Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Retrieves the current notification settings. ```APIDOC ## GET /evex-dev/linejs/notification/settings ### Description Retrieves the current notification settings. ### Method GET ### Endpoint /evex-dev/linejs/notification/settings ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **result** (object) - The user's notification settings. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Initialize Line.js Client with FileStorage Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/client-options.md Configures the client to use FileStorage for persistent storage of decryption keys and caches. Requires importing FileStorage. ```typescript import { FileStorage } from "@evex/linejs/storage"; const client = await loginWithPassword({ email: "", password: "", onPincodeRequest(pin) { console.log(pin); }, }, { device: "IOSIPAD", storage: new FileStorage("./storage.json"), }); ``` -------------------------------- ### GET /evex-dev/linejs/chats/all/mids Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Retrieves the MIDs (Message IDs) of all chats. ```APIDOC ## GET /evex-dev/linejs/chats/all/mids ### Description Retrieves the MIDs (Message IDs) of all chats. ### Method GET ### Endpoint /evex-dev/linejs/chats/all/mids ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **result** (object) - A list of chat MIDs. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /api/square/featureSet Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SquareService.txt Retrieves the feature set configuration for squares. ```APIDOC ## GET /api/square/featureSet ### Description Retrieves the feature set configuration for squares. ### Method GET ### Endpoint /api/square/featureSet ### Response #### Success Response (200) - **featureSet** (object) - An object containing various feature flags and settings for squares. - **supportChatHistory** (boolean) - Whether chat history is supported. - **maxChatMembers** (integer) - The maximum number of members allowed in a chat. ``` -------------------------------- ### Send Setup Request Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/call.md Initiates the call by sending a Cassini setup_req packet within an encrypted PLANET frame, causing the peer to ring. This initial packet has special bootstrap framing and includes device and media information. ```typescript transport.inviteDetailed({ to }) ``` -------------------------------- ### PLANET SETUP/INVITE Signaling Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/call.md The `inviteDetailed()` function is used for PLANET SETUP/INVITE signaling. ```text inviteDetailed() ``` -------------------------------- ### GET /presents/sent Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves a list of presents sent by the user. ```APIDOC ## GET /presents/sent ### Description Retrieves a list of presents sent by the user. ### Method GET ### Endpoint /presents/sent ### Parameters #### Query Parameters - **userId** (string) - Required - The unique identifier of the user. ### Response #### Success Response (200) - **sentPresents** (array) - A list of present objects sent by the user. - **presentId** (string) - The unique identifier of the present. - **recipientId** (string) - The identifier of the user who received the present. - **presentName** (string) - The name of the present. - **sentDate** (string) - The date and time the present was sent. #### Response Example ```json { "sentPresents": [ { "presentId": "present_ghi", "recipientId": "user_654", "presentName": "Digital Sticker Pack", "sentDate": "2023-10-24T18:00:00Z" } ] } ``` ``` -------------------------------- ### GET /presents/received Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves a list of presents received by the user. ```APIDOC ## GET /presents/received ### Description Retrieves a list of presents received by the user. ### Method GET ### Endpoint /presents/received ### Parameters #### Query Parameters - **userId** (string) - Required - The unique identifier of the user. ### Response #### Success Response (200) - **receivedPresents** (array) - A list of present objects received by the user. - **presentId** (string) - The unique identifier of the present. - **senderId** (string) - The identifier of the user who sent the present. - **presentName** (string) - The name of the present. - **receivedDate** (string) - The date and time the present was received. #### Response Example ```json { "receivedPresents": [ { "presentId": "present_def", "senderId": "user_987", "presentName": "Virtual Gift Card", "receivedDate": "2023-10-25T09:00:00Z" } ] } ``` ``` -------------------------------- ### POST /evex-dev/linejs/SquareService_inviteToListen Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SquareLiveTalkService.txt Invites a user to listen in a live talk session. ```APIDOC ## POST /evex-dev/linejs/SquareService_inviteToListen ### Description Invites a user to listen in a live talk session. ### Method POST ### Endpoint /evex-dev/linejs/SquareService_inviteToListen ### Parameters #### Request Body - **liveTalkId** (string) - Required - The ID of the live talk session. - **userId** (string) - Required - The ID of the user to invite. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the invitation was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Open Session with LINE Client Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/AccountAuthFactorEapConnectService.txt Initiates a new session using the LINE client. This method requires specific arguments for opening the session and handles the request through the client's request mechanism. ```typescript async openSession( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.openSession_args(...param), "openSession", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Get Recommendation List Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Fetches a list of recommended products. This method is useful for personalizing user experiences by suggesting relevant items. ```typescript async getRecommendationList( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.getRecommendationList_args(...param), "getRecommendationList", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Get Country Info API Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/PrimaryAccountInitService.txt Retrieves country-specific information. ```APIDOC ## GET /getCountryInfo ### Description Retrieves country-specific information. ### Method GET ### Endpoint /getCountryInfo ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (parameters are passed via function arguments) ### Request Example ```json { "example": "(parameters defined by LINEStruct.getCountryInfo_args)" } ``` ### Response #### Success Response (200) - **countryInfo** (object) - Information about the country. #### Response Example ```json { "example": "(country info structure defined by LINETypes.getCountryInfo_result)" } ``` ``` -------------------------------- ### BaseClient.loginProcess.login Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/methods.md Handles the login process using various authentication methods. ```APIDOC ## BaseClient.loginProcess.login ### Description Handles the login process using various authentication methods. ### Method ``` await client.loginProcess.login({ // Options can include: // authToken: "string" // email: "string", password: "string", pincode: "string" // qr: boolean }); ``` ### Parameters #### Request Body - **authToken** (string) - Optional - Authentication token for login. - **email** (string) - Optional - Email address for login. - **password** (string) - Optional - Password for login. - **pincode** (string) - Optional - PIN code for login. - **qr** (boolean) - Optional - Whether to use QR code for login. ``` -------------------------------- ### POST /evex-dev/linejs/SquareService_joinLiveTalk Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SquareLiveTalkService.txt Allows a user to join a live talk session. ```APIDOC ## POST /evex-dev/linejs/SquareService_joinLiveTalk ### Description Allows a user to join a live talk session. ### Method POST ### Endpoint /evex-dev/linejs/SquareService_joinLiveTalk ### Parameters #### Request Body - **liveTalkId** (string) - Required - The ID of the live talk session to join. ### Response #### Success Response (200) - **success** (boolean) - Indicates if joining the live talk was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Get Disaster Cases Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/HomeSafetyCheckService.txt Retrieves a list of disaster cases. ```APIDOC ## GET /evex-dev/linejs/disasterCases ### Description Retrieves disaster cases. ### Method GET ### Endpoint /evex-dev/linejs/disasterCases ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **result** (object) - The result of the getDisasterCases operation. ``` -------------------------------- ### Get Attestation Challenge Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/DeviceAttestationService.txt Retrieves a challenge for generating an attestation. ```APIDOC ## POST /evex-dev/linejs/getAttestationChallenge ### Description Retrieves a challenge for generating an attestation. This is used in device or platform attestation processes. ### Method POST ### Endpoint /evex-dev/linejs/getAttestationChallenge ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body This endpoint accepts arguments for `LINEStruct.getAttestationChallenge_args`. ### Request Example ```json { "example": "request body for getAttestationChallenge" } ``` ### Response #### Success Response (200) Returns the attestation challenge result. #### Response Example ```json { "example": "attestation challenge result" } ``` ``` -------------------------------- ### Get Product by Version V2 Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Fetches product details for a specific version using the V2 endpoint. Requires appropriate parameters for version and product identification. ```typescript async getProductV2( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.getProductV2_args(...param), "getProductV2", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Get Assertion Challenge Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/DeviceAttestationService.txt Retrieves a challenge for generating an assertion. ```APIDOC ## POST /evex-dev/linejs/getAssertionChallenge ### Description Retrieves a challenge for generating an assertion. This is typically the first step in an assertion-based authentication flow. ### Method POST ### Endpoint /evex-dev/linejs/getAssertionChallenge ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body This endpoint accepts arguments for `LINEStruct.getAssertionChallenge_args`. ### Request Example ```json { "example": "request body for getAssertionChallenge" } ``` ### Response #### Success Response (200) Returns the assertion challenge result. #### Response Example ```json { "example": "assertion challenge result" } ``` ``` -------------------------------- ### Fetch and Sync LINE APK Source: https://github.com/evex-dev/linejs/blob/main/scripts/apk/README.md Fetch the latest LINE APK and then synchronize its contents. Ensure you have the correct path to the new APK version. ```powershell python scripts\fetch_line_apk.py ``` ```powershell deno run -A scripts\apk\sync_from_apk.ts --apk apks\jp.naver.line.android\\base.apk ``` -------------------------------- ### Get Group Call Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/CallService.txt Retrieves information about a group call. ```APIDOC ## POST /getGroupCall ### Description Retrieves information about a group call. ### Method POST ### Endpoint /getGroupCall ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body This endpoint accepts parameters defined by `LINEStruct.getGroupCall_args`. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) Returns information about the group call. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Place Free Product Purchase Order Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Initiates a purchase order for a free product. This method handles the transaction for zero-cost items. ```typescript async placePurchaseOrderForFreeProduct( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.placePurchaseOrderForFreeProduct_args(...param), "placePurchaseOrderForFreeProduct", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Get Buddy Detail Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/BuddyService.txt Retrieves detailed information about a buddy. ```APIDOC ## GET /evex-dev/linejs/getBuddyDetail ### Description Retrieves detailed information about a buddy. ### Method GET ### Endpoint /evex-dev/linejs/getBuddyDetail ### Parameters #### Query Parameters - **...param** (any) - Required - Parameters for the getBuddyDetail function. ### Response #### Success Response (200) - **result** (object) - The result of the getBuddyDetail operation. ``` -------------------------------- ### POST /evex-dev/linejs/SquareService_inviteToSpeak Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SquareLiveTalkService.txt Invites a user to speak in a live talk session. ```APIDOC ## POST /evex-dev/linejs/SquareService_inviteToSpeak ### Description Invites a user to speak in a live talk session. ### Method POST ### Endpoint /evex-dev/linejs/SquareService_inviteToSpeak ### Parameters #### Request Body - **liveTalkId** (string) - Required - The ID of the live talk session. - **userId** (string) - Required - The ID of the user to invite. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the invitation was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### POST /purchase/free Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Places a purchase order for a free product. ```APIDOC ## POST /purchase/free ### Description Places a purchase order for a free product. ### Method POST ### Endpoint /purchase/free ### Parameters #### Request Body - **userId** (string) - Required - The unique identifier of the user placing the order. - **productId** (string) - Required - The unique identifier of the free product. ### Request Example ```json { "userId": "user_111", "productId": "prod_free_001" } ``` ### Response #### Success Response (200) - **orderId** (string) - The unique identifier of the placed order. - **status** (string) - The status of the order (e.g., "Completed"). #### Response Example ```json { "orderId": "order_abc123", "status": "Completed" } ``` ``` -------------------------------- ### GET /evex-dev/linejs Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Retrieves the list of users currently in the follow blacklist. ```APIDOC ## GET /evex-dev/linejs ### Description Retrieves the list of users currently in the follow blacklist. ### Method GET ### Endpoint /evex-dev/linejs ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **result** (object) - The list of users in the follow blacklist. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Get Extended Profile Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Retrieves the extended profile information for a user. ```APIDOC ## GET /evex-dev/linejs/getExtendedProfile ### Description Retrieves the extended profile information for a user. ### Method GET ### Endpoint /evex-dev/linejs/getExtendedProfile ### Parameters #### Query Parameters - **param** (any) - Required - Parameters for fetching the extended profile. ### Response #### Success Response (200) - **result** (object) - The extended profile data. ### Response Example ```json { "result": { "userId": "string", "displayName": "string", "pictureUrl": "string", "statusMessage": "string" } } ``` ``` -------------------------------- ### loginWithPassword Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/auth.md Logs in using email and password. Requires an `onPincodeRequest` callback for two-factor authentication if needed. Client initialization options, including the device to emulate, are also required. ```APIDOC ## loginWithPassword ### Description Logs in using email and password. Requires an `onPincodeRequest` callback for two-factor authentication if needed. Client initialization options, including the device to emulate, are also required. ### Method `loginWithPassword` ### Parameters #### Options Object - **email** (string) - Required - The user's email address. - **password** (string) - Required - The user's password. - **onPincodeRequest** (function) - Optional - A callback function that receives a pincode when required for authentication. #### Client Init Options - **device** (string) - Required - The device to emulate (e.g., "IOSIPAD", "ANDROIDSECONDARY"). ### Request Example ```ts import { loginWithPassword } from "@evex/linejs"; const client = await loginWithPassword({ email: 'you@example.com', password: 'password', onPincodeRequest(pincode) { console.log('Enter this pincode to your LINE app:', pincode) } }, { device: "IOSIPAD", }) ``` ``` -------------------------------- ### GET /api/square/members Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SquareService.txt Retrieves a list of members within a specified square. ```APIDOC ## GET /api/square/members ### Description Retrieves a list of members within a specified square. ### Method GET ### Endpoint /api/square/members ### Parameters #### Query Parameters - **squareId** (string) - Required - The ID of the square. - **limit** (integer) - Optional - The maximum number of members to return. - **continuationToken** (string) - Optional - Token for pagination. ### Response #### Success Response (200) - **members** (object[]) - A list of square members. - **memberId** (string) - The ID of the member. - **displayName** (string) - The display name of the member. - **pictureUrl** (string) - The URL of the member's profile picture. - **nextContinuationToken** (string) - Token for the next page of results. ``` -------------------------------- ### GET /evex-dev/linejs/SquareService_getSquareInfoByChatMid Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/SquareLiveTalkService.txt Retrieves information about a square based on its chat MID. ```APIDOC ## GET /evex-dev/linejs/SquareService_getSquareInfoByChatMid ### Description Retrieves information about a square using its chat MID. ### Method GET ### Endpoint /evex-dev/linejs/SquareService_getSquareInfoByChatMid ### Parameters #### Query Parameters - **chatMid** (string) - Required - The chat MID of the square. ### Response #### Success Response (200) - **squareInfo** (object) - Detailed information about the square. #### Response Example ```json { "squareInfo": { "squareId": "string", "squareName": "string", "squareMid": "string", "squareType": "string", "memberCount": 0, "description": "string", "iconUrl": "string", "coverUrl": "string", "creationTime": 0, "lastUpdatedTime": 0, "creatorInfo": {}, "inviteeInfo": {}, "memberInfo": {}, "privacy": "string", "state": "string" } } ``` ``` -------------------------------- ### Clone and run LINEJS development version in Deno Source: https://github.com/evex-dev/linejs/blob/main/README.md Clone the latest development version of LINEJS from GitHub and run it using Deno. ```llvm git clone https://github.com/evex-dev/linejs.git cd linejs touch main.js deno run main.js ``` -------------------------------- ### Get Chats API Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/TalkService.txt Retrieves a list of chats the user is a part of. ```APIDOC ## GET /chats ### Description Retrieves a list of chats the user is currently participating in. ### Method GET ### Endpoint /chats ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of chats to return. - **from** (string) - Optional - A cursor for pagination, to fetch chats after a specific point. ### Response #### Success Response (200) - **chats** (array) - An array of chat objects. - **chatId** (string) - The ID of the chat. - **type** (string) - The type of chat (e.g., 'group', 'room', '1on1'). - **lastMessage** (object) - Information about the last message in the chat. - **text** (string) - The content of the last message. - **timestamp** (integer) - The timestamp of the last message. #### Response Example ```json { "chats": [ { "chatId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "type": "group", "lastMessage": { "text": "See you later!", "timestamp": 1678886400000 } } ] } ``` ``` -------------------------------- ### Get Product by Version Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves product information based on its version. This method is distinct from the V2 endpoint and may have different parameter requirements. ```typescript async getProductByVersion( ...param: Parameters ): Promise { return await this.client.request.request( LINEStruct.getProductByVersion_args(...param), "getProductByVersion", this.protocolType, true, this.requestPath, ); } ``` -------------------------------- ### Clone and run LINEJS development version with Deno Source: https://github.com/evex-dev/linejs/blob/main/packages/linejs/README.md Clone the latest development version of LINEJS from GitHub and run it using Deno. This is useful for testing or contributing to the development version. ```bash git clone https://github.com/evex-dev/linejs.git cd linejs touch main.js denp run main.js ``` -------------------------------- ### GET /products/by-author Source: https://github.com/evex-dev/linejs/blob/main/scripts/function/ShopService.txt Retrieves a list of products associated with a specific author. ```APIDOC ## GET /products/by-author ### Description Retrieves a list of products associated with a specific author. ### Method GET ### Endpoint /products/by-author ### Parameters #### Query Parameters - **authorId** (string) - Required - The unique identifier of the author. ### Response #### Success Response (200) - **products** (array) - A list of product objects. - **productId** (string) - The unique identifier of the product. - **productName** (string) - The name of the product. - **authorName** (string) - The name of the author. - **price** (number) - The price of the product. #### Response Example ```json { "products": [ { "productId": "prod_123", "productName": "Awesome Gadget", "authorName": "Tech Guru", "price": 99.99 } ] } ``` ``` -------------------------------- ### Login with Auth Token and File Storage Source: https://github.com/evex-dev/linejs/blob/main/docs/docs/start-2.md This method shows how to log in using an auth token while persisting client data using FileStorage. This is crucial for maintaining client state across sessions and enabling access to encrypted message history. ```typescript import { FileStorage } from "@evex/linejs/storage"; const client = await loginWithAuthToken(authtoken, { device: "IOSIPAD", storage: new FileStorage("./storage.json"), // path to storage file (This is secret file) }); ```