Giter VIP home page Giter VIP logo

deliciousfeeds4j's Introduction

#deliciousfeeds4J - Wrapper for delicious feeds-API v2

##Introduction

I started this project in order to build a recommender to find new and interesting links and websites by using delicious. They have an API for posting links and managing your account - a wrapper for this can be found here: https://github.com/czarneckid/delicious-java.

But they also have another API called "delicious feeds" where you can retrieve information in JSON- or RSS-format. This library wraps this feeds API in an comfortable way to work with.

A few examples of what you can get:

  • Recent bookmarks posted on delicious
  • Public bookmarks for a specific user
  • Public summary information about a user
  • Recent bookmarks for a URL
  • Summary information about a URL
  • ...

##A small example of usage Simple and easy to use - here an example of finding the 10 most recent bookmarks posted on delicious (from all users):

//Create an instance and set expandUrls to true
final DeliciousFeeds deliciousFeeds = new DeliciousFeeds();
deliciousFeeds.setExpandUrls(true);

//Find the 10 most recent bookmarks
final List<Bookmark> bookmarks = deliciousFeeds.findBookmarks();

...

##How to install and setup this library Be sure you have installed git and Apache Maven correctly. Then you can run the following commands to install this library in your local repository:

git clone git://github.com/p-meier/deliciousfeeds4J.git
cd deliciousfeeds4J/
mvn install

#Optional delete the sources
rm -rf deliciousfeeds4J/

After this you have the current version of the library in your local repository and have to add this to your pom.xml:

<dependency>
    <groupId>com.delicious</groupId>
    <artifactId>deliciousfeeds4J</artifactId>
    <version>0.9.0</version>
</dependency>

##Options explained ###expandUrls (defaults to false) Some URLs are shortened when they are returned by delicious (e.g. http://icio.us/+a7f570d6d6842). With this option this URLs get expanded (for the previous example to: http://www.competitionline.com/de/wettbewerbe/116699). The only downside on this is it takes time because another request must be made to get the expanded version - that's why it defaults to false.

###constainAPILimit (defaults to false) The delicious API has an constraint to wait 1 second between requests. So far as I can tell this does not apply to the Feeds-API (this is why it defaults to false). But if you encounter errors, you can try to set this to true.

###userAgent (defaults to "deliciousfeeds4j Java/1.6") Set another userAgent-String which is used for requests. For the normal delicious API this should be "something identifiable". So far as I can tell this does not apply to the Feeds-API. But if you encounter unexpected errors, maybe you set the userAgent to something more suitable or real (e.g. "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1)").

##Logging ###Uses SLF4J This library uses SLF4J for logging. But you need an implementation of this API - for example logback.

###Configure Logback First you need to include the logback-library in your classpath. If you use Maven add this to your pom.xml:

<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>1.0.9</version>
</dependency>

Then add a file named logback.xml with the following content to your classpath:

<configuration scan="true" scanPeriod="15 seconds">
    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>%d{HH:mm:ss.SSS} [%thread] %.-1level %logger{36} - %msg%n</Pattern>
        </layout>
    </appender>

    <root level="TRACE">
        <appender-ref ref="CONSOLE"/>
    </root>
</configuration>

##License If you find deliciousfeeds4J useful or have issues please drop me a line, I would love to hear how you're using it.

deliciousfeeds4J is licensed under the Apache 2.0 license, see the LICENSE file for more details.

##Delicious-Feeds API and Javadoc You can find the official documentation from Delicious here: https://delicious.com/developers

The Javadoc can be found here: http://p-meier.github.com/deliciousfeeds4J/

deliciousfeeds4j's People

Watchers

James Cloos avatar Patrick Meier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.