cacoo4j

A Java library for the Cacoo API

Лицензия

Лицензия

Группа

Группа

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

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

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

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

cacoo4j
A Java library for the Cacoo API
Ссылка на сайт

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

http://cacoo4j.org/
Система контроля версий

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

https://github.com/den2sn/cacoo4j

Скачать cacoo4j

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
oauth.signpost : signpost-core jar 1.2.1.1

test (1)

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

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

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

#Cacoo4J

Cacoo4J is a Cacoo API binding library for the Java language licensed under Apache License 2.0.

##Install

###Maven

<dependency>
    <groupId>org.cacoo4j</groupId>
    <artifactId>cacoo4j</artifactId>
    <version>1.0.1</version>
</dependency>

###Download

https://github.com/den2sn/cacoo4j/releases/download/1.0.1/cacoo4j.zip

##Usage

###Authentication

####API Key

Cacoo c = new Cacoo("[API Key]");

You can make an API key here. https://cacoo.com/profile/api

####OAuth

Cacoo c = new Cacoo("[consumerKey]", "[consumerSecret]");
AccessToken accessToken = new AccessToken("[token]", "[tokenSecret]");
c.setAccessToken(accessToken);

You can register applications here. https://cacoo.com/profile/apps

You can get your Access Token from the following code.(exec console)

AccessToken accessToken = c.retrieve();

###Get Diagrams

Returns a list of your diagrams

Diagrams diagrams = c.getDiagrams();
for (Diagram diagram : diagrams.getResult()) {
    //...
}

###Get Diagram

Diagram diagram = c.getDiagram("[diagramId]");

###Output Image

Diagram diagram = c.getDiagram("[diagramId]");
FileOutputStream out = new FileOutputStream("/Users/username/Desktop/diagram.png");
c.outputImage(diagram, out);
out.close();

###Get Chat Messages

Messages messages = c.getChatMessages("[diagramId]");

###Get Folders

Folders folders = c.getFolders();
for (Folder folder : folders.getResult()) {
    //...
}

###Get User

CacooUser user = c.getUser("[username]");

###Get Account

CacooUser user = c.getAccount();

###Get License

License license = c.getLicense();

###Create Diagram

Diagram diagram = c.createDiagram(new CreateDiagramRequest("[titlename]"));

###Copy Diagram

Diagram diagram = c.copyDiagram("[diagramId]");

###Delete Diagram

c.deleteDiagram("[diagramId]");

###Post Comment

c.postComment("[diagramId]", "[comment]");

###Get Diagram Contents

String contents = c.getDiagramContents("[diagramId]");

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

Версия
1.0.1
1.0.0