Ohloh Java API

A Java library for the Ohloh service

License

License

GroupId

GroupId

com.github.fedy2
ArtifactId

ArtifactId

johloh
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Ohloh Java API
A Java library for the Ohloh service
Project URL

Project URL

https://github.com/fedy2/johloh
Source Code Management

Source Code Management

https://github.com/fedy2/johloh

Download johloh

How to add to project

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

Dependencies

test (4)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-all jar 1.9.5
com.google.guava : guava jar 15.0
xmlunit : xmlunit jar 1.5

Project Modules

There are no modules declared in this project.

johloh

A Java API for Ohloh.

Dependency declaration:

<dependency>
  <groupId>com.github.fedy2</groupId>
  <artifactId>johloh</artifactId>
  <version>1.0.1</version>
</dependency>

##Usage

Retrieve an account:

OhlohClient client = new OhlohClient("YOUR API KEY");
Account account = client.getAccount("113399");
System.out.println(account.getName());

Retrieve all the accounts containing the word "Alex" in the name:

OhlohClient client = new OhlohClient("YOUR API KEY");
Query<Account> query = QueryBuilders.accountQuery().query("alex").build();
Iterator<Account> accounts = client.getAccounts(query);
while(accounts.hasNext()) System.out.println(accounts.next().getName());

Retrieve all the projects sorted by name:

OhlohClient client = new OhlohClient("YOUR API KEY");
Query<Project> query = QueryBuilders.projectQuery().sort(ProjectSort.NAME).build();
Iterator<Project> projectIterator = client.getProjects(query);
while(projectIterator.hasNext()) System.out.println(projectIterator.next().getName());

Changelog:

* 1.0.1 fixed the groupId
* 1.0.0 first release

Versions

Version
1.0.1