YQL4J Parent

A YQL client library for Java

License

License

GroupId

GroupId

org.yql4j
ArtifactId

ArtifactId

yql4j-parent
Last Version

Last Version

0.9.5
Release Date

Release Date

Type

Type

pom
Description

Description

YQL4J Parent
A YQL client library for Java
Source Code Management

Source Code Management

https://github.com/philippn/yql4j

Download yql4j-parent

Filename Size
yql4j-parent-0.9.5.pom 5 KB
Browse

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • yql4j-client

About

This repository contains a simple client library that can be used to query the Yahoo Query Language (YQL) web service.

For more information on YQL, please refer to: https://developer.yahoo.com/yql/

Usage Example

YqlClient client = YqlClients.createDefault();
YqlQuery query = YqlQueryBuilder
				.fromQueryString("select * from geo.oceans where name=@name")
				.withVariable("name", "Arctic Ocean").build();
YqlResult result = client.query(query);

// Now you can do whatever you like with the raw result
String rawResult = result.getContentAsString();

// But if you are lazy, you may also get the content mapped as object graph
// Please note though: You will have to provide your own mapping classes, 
// i.e. PlaceArrayType and PlaceType!
QueryResultType<PlaceArrayType> mappedResult = 
		result.getContentAsMappedObject(
				new TypeReference<QueryResultType<PlaceArrayType>>() {});
for (PlaceType item : mappedResult.getResults().getPlace()) {
	// Do something with the item
}

Features

  • YqlQuery takes care of building the request URL for you
    • Built-in parameters diagnostics, env etc. are supported
    • Support for YQL variable substitution
    • Support for YQL query aliases
  • YqlResult supports mapping the content to an object graph
  • Support OAuth signed requests (may or may not be useful)

What's missing

  • Streaming support
  • OAuth authentication (two-legged and three-legged)

Download

The recommended way to get started using YQL4J in your project is by using the following Maven coordinates:

<dependency>
    <groupId>org.yql4j</groupId>
    <artifactId>yql4j-client</artifactId>
    <version>0.9.4</version>
</dependency>

Versions

Version
0.9.5
0.9.4
0.9.2
0.9.1
0.9.0