capsulecrm-java

Unofficial Capsule CRM API Java Client

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Capsule Компиляция и сборка Distribution
Группа

Группа

uk.co.coen
Идентификатор

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

capsulecrm-java
Последняя версия

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

1.3.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

capsulecrm-java
Unofficial Capsule CRM API Java Client
Ссылка на сайт

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

https://github.com/analytically/capsulecrm-java
Организация-разработчик

Организация-разработчик

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

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

https://github.com/analytically/capsulecrm-java

Скачать capsulecrm-java

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

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

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
com.typesafe : config jar 1.3.0
com.google.guava : guava jar 19.0
joda-time : joda-time jar 2.9.3
com.ning : async-http-client jar 1.9.37
com.thoughtworks.xstream : xstream jar 1.4.9

test (5)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.20
ch.qos.logback : logback-classic jar 1.1.7
org.jsoup : jsoup jar 1.7.3
org.easytesting : fest-assert jar 1.4
com.novocode : junit-interface jar 0.11

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

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

capsulecrm-java Build Status

NOTE: this client library implements version 1 of the Capsule API. Deprecation warning - version 1 of the Capsule API will not be available after October 27, 2017.

Unofficial Capsule CRM API Java Client.

Depends on Async Http Client, Google Guava, XStream and Joda-Time. Development sponsored by Coen Education. Follow @analytically for updates.

Requirements

Java 8 or later. A Capsule CRM account and token.

Using with Maven

Add this dependency to your project's POM file:

<dependency>
  <groupId>uk.co.coen</groupId>
  <artifactId>capsulecrm-java</artifactId>
  <version>1.3.4</version>
</dependency>

Using with SBT

Add this dependency to your project's build.sbt or project/Build.scala file:

libraryDependencies += "uk.co.coen" % "capsulecrm-java" % "1.3.4"

Configuration

Add an application.conf property file to your application's classpath with the Capsule CRM url and token. Capsule CRM users can find their API token by visiting My Preferences via their username menu in the Capsule navigation bar.

capsulecrm.url="https://<yourdomain>.capsulecrm.com"
capsulecrm.token="<your token here>"

Google Custom Search Engine for your Capsule CRM contact's websites

If you need a Google Custom Search searching all websites of your contacts, see the gcse directory for a Play Framework application hosting custom search annotations files. Point Google Custom Search to a server hosting this application.

  • In gcse/conf/application.conf, change capsulecrm.url and capsulecrm.token to your Capsule CRM account details
  • In gcse/conf/application.conf, change gcs.label to your Custom Search Engine label.
  • Run the application by using the play run command, see here for more information.
  • Under Control panel > Advanced > Add annotations feed, add http://yourhost/cse/persons for all person annotations, or http://yourhost/cse/organisations for all organisation annotations.

See Hosting the Annotation Files Yourself for more details.

Usage

Start by importing the client package and the necessary classes:

import java.util.concurrent.Future;
import uk.co.coen.capsulecrm.client.*

import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import static com.google.common.util.concurrent.JdkFutureAdapters.listenInPoolThread;

Fetch all parties, change something and save - asynchronous:

Futures.addCallback(listenInPoolThread(CParty.listAll()), new FutureCallback<CParties>() {
    @Override
    public void onSuccess(CParties parties) {
        for (CParty party : parties) {
            party.about = "...";

            if (party instanceof COrganisation) {
                COrganisation org = (COrganisation) party;

                // if it's an organisation, change it's name
                org.name = "...";
            }

            // save changes - blocking
            Response response = party.save().get();
            if (response.getStatusCode() < 200 || response.getStatusCode() > 206) {
                log.info("Failure saving party " + party + ", response " + response.getStatusCode() + " " + response.getStatusText());
            }
        }

    }
});

Add a tag to a party:

party.add(new CTag("iamatag"));

Add a note to a party:

party.add(new CHistoryItem("hello I'm a note"));

Add a task to a party:

party.add(new CTask("do this in two days", DateTime.now().plus(2)));

Click here for more examples.

Javadoc

http://www.javadoc.io/doc/uk.co.coen/capsulecrm-java

License

Licensed under the Apache License, Version 2.0.

Copyright 2011-2016 Mathias Bogaert.

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

Версия
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.6
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1