feyin api

feyin api application

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.feyin.api
Идентификатор

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

feyin-api
Последняя версия

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

1.0.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

feyin api
feyin api application
Ссылка на сайт

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

https://github.com/FeyinPub/feyin-api-java
Система контроля версий

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

https://github.com/FeyinPub/feyin-api-java.git

Скачать feyin-api

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.apache.httpcomponents : httpclient jar 4.5.3
com.alibaba : fastjson jar 1.2.14

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

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

飞印api

飞印开放接口说明文档

文档地址:https://www.showdoc.cc/feyin

使用方法

maven 依赖包

<dependency>
    <groupId>net.feyin.api</groupId>
    <artifactId>feyin-api</artifactId>
    <version>1.0.5</version>
</dependency>

code samples

初始化 client

String memberCode="*********8111e68c6c52540008b6e6"; // 开发帐号,请在http://my.feyin.net 中获取
String apiKey = "*****d12"; //开发密钥,请在http://my.feyin.net 中获取
FeyinClient feyinClient = new FeyinClient(memberCode, apiKey);

发送打印消息

String deviceNo = "4600xxxxxxxxxxxx";

String msg = "需要打印的消息内容"; // 消息排版以及支持的格式请参考 api文档中"打印内容相关"一栏。
int result = feyiniClient.sendMsg(deviceNo, msg);
if(result == 0){
    System.out.println("打印成功");
}

清除未打印消息

FeyinResponse response = feyinClient.clearPendingMsgs(deviceNo); 
if(response.isSuccess()){
    System.out.println("未打印消息已成功清除");
}
else{
    System.err.println(String.format("清除失败,原因:%s", response.getErrMsg()));
}

绑定机器

FeyinResponse response = feyinClient.bindPrinter(deviceNo); // 请注意,本接口针对第三方开发平台,需申请开通
if(response.isSuccess()){
    System.out.println("绑定成功");
}
else{
    System.err.println(String.format("绑定失败,原因:%s", response.getErrMsg()));
}

解绑机器

FeyinResponse response = feyinClient.unbindPrinter(deviceNo); // 请注意,本接口针对第三方开发平台,需申请开通
if(response.isSuccess()){
    System.out.println("解除绑定成功");
}
else{
    System.err.println(String.format("解除绑定失败,原因:%s", response.getErrMsg()));
}

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

Версия
1.0.5
1.0.4
1.0.3