line/line-bot-sdk-java

Name: line-bot-sdk-java

Owner: LINE

Description: Java SDK for Messaging API BOT

Created: 2016-04-12 12:32:40.0

Updated: 2018-05-23 10:38:38.0

Pushed: 2018-05-23 10:38:35.0

Homepage: https://developers.line.me/

Size: 1529

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

The Messaging API SDK for Java

Build Status Maven Central javadoc.io

What is this?

This is a Java SDK for the LINE Messaging API.

How do I install it?

We've uploaded this library to the Maven Central Repository. You can install the modules using Maven or Gradle.

http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.linecorp.bot%22

About the LINE Messaging API

See the official API documentation for more information.

Spring Boot integration

The line-bot-spring-boot module lets you build a bot application as a Spring Boot application.


opyright 2018 LINE Corporation

INE Corporation licenses this file to you under the Apache License,
ersion 2.0 (the "License"); you may not use this file except in compliance
ith the License. You may obtain a copy of the License at:

 http://www.apache.org/licenses/LICENSE-2.0

nless required by applicable law or agreed to in writing, software
istributed under the License is distributed on an "AS IS" BASIS, WITHOUT
ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
icense for the specific language governing permissions and limitations
nder the License.


age com.example.bot.spring.echo;

rt org.springframework.boot.SpringApplication;
rt org.springframework.boot.autoconfigure.SpringBootApplication;

rt com.linecorp.bot.model.event.Event;
rt com.linecorp.bot.model.event.MessageEvent;
rt com.linecorp.bot.model.event.message.TextMessageContent;
rt com.linecorp.bot.model.message.TextMessage;
rt com.linecorp.bot.spring.boot.annotation.EventMapping;
rt com.linecorp.bot.spring.boot.annotation.LineMessageHandler;

ingBootApplication
eMessageHandler
ic class EchoApplication {
public static void main(String[] args) {
    SpringApplication.run(EchoApplication.class, args);
}

@EventMapping
public TextMessage handleTextMessageEvent(MessageEvent<TextMessageContent> event) {
    System.out.println("event: " + event);
    return new TextMessage(event.getMessage().getText());
}

@EventMapping
public void handleDefaultMessageEvent(Event event) {
    System.out.println("event: " + event);
}

Modules

This project contains the following modules:

This project contains the following sample projects:

Requirements

This library requires Java 8 or later.

Versioning

This project respects semantic versioning.

See http://semver.org/.

FAQ
How do I use a proxy server?

You can use LineMessagingServiceBuilder to configure a proxy server. It accepts your own OkHttpBuilder instance.

Note: You don't need to use an add-on like Fixie to have static IP addresses for proxy servers. You can make API calls without entering IP addresses on the server IP whitelist.

LICENSE
Copyright (C) 2016 LINE Corp.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.