@intocode-io/line-api-cli v1.3.6
line-api-cli-nodejs
This package naming is DEPRECATED, Please use another package by running the following commands
npm uninstall -g @intocode-io/line-api-cli
npm i -g line-api-cliCommand line interface for LINE APIs. This module will help you to easily work with LINE APIs via CLI.
Short summary
LINE API CLI helps you to work with LINE-API-related projects faster as you do not need to switch between a web browser and IDE ( after your first-time setup :P ). If you already are a hardcore "Terminal/Console" fanboy that using cURL to work with LINE APIs, using this package will reduce your time typing same long API cURL commands.
Available commands, operations, and options
LINE API configuration and token management
lineinittoken--issue--revoke
Richmenu API
richmenuaddremovelistdefaultlinkunlink
LIFF API v1
liffaddremoveupdatelist
LINE Things API
thingsadd:trialremove:triallist:trialget:deviceget:devicesget:product
Scenario management API for automatic communication
thingsregister:scenario-setremove:scenario-setget:scenario-set
LINE TV API
linetvlist:modulesget:spotlightlist:categoryget:categorylist:stationget:stationrankingsearchlive
Installation
npm i @intocode-io/line-api-cli -gProject setup with line command
Let's start, to initialize project configuration file. Please go to your LINE Developer Console and get Channel ID and Channel secret. If you do not want to issue a short-lived access token later on, you will also need a long-lived access token.
Once you have the information, run line command with init operation.
line initThis command will create .line-api-cli.yml configuration file containing necessary information for the CLI to handle API request/response for you.
Issue a short-lived access token
Long-lived access token is nice and easy to use for developers but it is not as secured as a short-lived access token.
To issue a short-lived access token, run the following command.
line token --issueIt will issue a short-lived access token. You can choose whether to replace the token into .line-api-cli.yml
Do not forget to replace a short-lived. It is recommended to write a script to replace the token monthly.
Revoke access token
Ok, sometime you may feel insecure after exposing access token somewhere. No problem, you can revoke it with --revoke option.
line token --revokeWorking with richmenu command
It's time to display nice UI menu to your users, or maybe some menu to some specific user(s). You can do those tasks with richmenu command.
Add a rich menu
First you need to prepare a data file and an image file for rich menu. After you have those in your project directory, you can run richmenu command with add operation to add a rich menu.
richmenu addList rich menus
Rich menus can be listed with list operation.
richmenu listRemove a rich menu
Get bored of old rich menu? You can remove a rich menu with remove operation.
richmenu removeThen choose a rich menu to be removed.
Set a rich menu as default
If you'd like to set a rich menu as default for all users, run the following command.
richmenu defaultLink a rich menu to a user
Rich menu can be linked to a specific user. For example, if you want a rich menu assigned only to LINE user with Administrator role. You can get a user ID and link a rich menu for the user with this command.
richmenu linkUnlink a rich menu from a user
Rich menu can be unlinked from a specific user using unlink operation.
richmenu unlinkWorking with LIFF app using liff command
To develop more advanced LINE Bot, LIFF app may required. You can use liff command to manage LIFF apps.
Add a LIFF app
liff addList LIFF apps
liff listRemove a LIFF app
liff removeUpdate a LIFF app
liff updateWorking with LINE Things using things command
List all LINE Things trial products
things list:trialAdd a trial product
things add:trialRemove a trial product
things remove:trialGet device information by device ID and user ID
things get:deviceSpecify the product ID and user ID, and acquire the device information
things get:devicesSpecify the device ID, and acquire the product ID and PSDI
things get:productScenario management API for automatic communication
Register (create or update) a scenario set for automatic communication under a product
things register:scenario-setGet the scenario set registered under a product
things get:scenario-setDelete a scenario set registered under a product
things remove:scenario-setWorking with LINE TV using linetv command
List sportlight curation module types
linetv list:modulesTo get sportlight curation module types in JSON use --format option.
linetv list:modules --format jsonGet sportlight data
linetv get:spotlightTo get sportlight data in JSON use --format option.
linetv get:sportlight --format jsonCategory List
linetv list:categoryTo get category list in JSON use --format option.
linetv get:sportlight --format jsonGets category home data
linetv get:categoryTo get category home data in JSON use --format option.
linetv get:category --format jsonTo get category home data start from selected page use --page option.
linetv get:station --page <number>Gets clip ranking data
linetv rankingTo get clip ranking data in JSON use --format option.
linetv ranking --format jsonTo get clip ranking data start from selected page use --page option.
linetv ranking --page <number>Gets a clip search result
linetv searchTo get clip search result in JSON use --format option.
linetv search --format jsonTo get clip search result from selected page use --page option.
linetv search --page <number>Gets the station home (TV station) list.
linetv list:stationTo get station home (TV station) list in JSON use --format option.
linetv list:station --format jsonGets the Station Home (TV Station) data.
linetv get:stationTo get TV Station data in JSON use --format option.
linetv get:station --format jsonTo get TV Station data start from selected page use --page option.
linetv get:station --page <number>Gets live schedule information.
linetv liveTo get live schedule data in JSON use --format option.
linetv live --format jsonComprehensive usage
We provide comprehensive usage of each command / operation / option with CLI. Simply run a command with/without operation and follow by --help option. For example,
line token --helpOr
line --helpMIT License
Copyright (c) 2019-2020 intocode Co., Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Images copyright notice
Images used in this repository are not own by any maintainers. Do NOT distribute the images. They are used only for friendly-looking CLI. If a copyright owner would like to remove any image, please open an issue here and we will remove as soon as possible.
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago