line-bot-helper

description

Лицензия

Лицензия

Группа

Группа

org.riversun
Идентификатор

Идентификатор

line-bot-helper
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

line-bot-helper
description
Ссылка на сайт

Ссылка на сайт

https://github.com/riversun/line-bot-helper
Система контроля версий

Система контроля версий

https://github.com/riversun/line-bot-helper

Скачать line-bot-helper

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.riversun/line-bot-helper/ -->
<dependency>
    <groupId>org.riversun</groupId>
    <artifactId>line-bot-helper</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.riversun/line-bot-helper/
implementation 'org.riversun:line-bot-helper:1.0.0'
// https://jarcasting.com/artifacts/org.riversun/line-bot-helper/
implementation ("org.riversun:line-bot-helper:1.0.0")
'org.riversun:line-bot-helper:jar:1.0.0'
<dependency org="org.riversun" name="line-bot-helper" rev="1.0.0">
  <artifact name="line-bot-helper" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.riversun', module='line-bot-helper', version='1.0.0')
)
libraryDependencies += "org.riversun" % "line-bot-helper" % "1.0.0"
[org.riversun/line-bot-helper "1.0.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.linecorp.bot : line-bot-servlet jar 1.6.0
org.json : json jar 20160810

provided (1)

Идентификатор библиотеки Тип Версия
javax.servlet : javax.servlet-api jar 3.1.0

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.7

Модули Проекта

Данный проект не имеет модулей.

Overview

Java library for creating "LINE BOT" as HttpServlet.

It is licensed under MIT.

Maven Central

Example for HttpServlet

@SuppressWarnings("serial")
public class LineBotExample01Servlet extends LineBotServlet {

	private static final String CHANNEL_SECRET ="[YOUR_CHANNEL_SECRET_HERE]" ;
	private static final String CHANNEL_ACCESS_TOKEN ="[YOUR_CHANNEL_ACCESS_TOKEN_HERE]";
	@Override
	protected ReplyMessage handleTextMessageEvent(MessageEvent<TextMessageContent> event) throws IOException {

		TextMessageContent userMessage = event.getMessage();

		// Get user profile
		UserProfileResponse userProfile = getUserProfile(event.getSource().getUserId());


		String botResponseText = "Hi,"+userProfile.getDisplayName() + ","
				+ "You say '" + userMessage.getText() + "' !";

		TextMessage textMessage = new TextMessage(botResponseText);

		return new ReplyMessage(event.getReplyToken(), Arrays.asList(textMessage));
	}

	@Override
	protected ReplyMessage handleDefaultMessageEvent(Event event) {
		//When other messages not overridden as handle* is received, do nothing (returns null)
		return null;
	}

	@Override
	public String getChannelSecret() {
		return CHANNEL_SECRET;
	}

	@Override
	public String getChannelAccessToken() {
		return CHANNEL_ACCESS_TOKEN;
	}

Версии библиотеки

Версия
1.0.0