Git Product home page Git Product logo

jraw's Introduction

#Java Reddit API Wrapper

travis-ci build status Coverage Status Reddit API coverage Latest release

JRAW is currently in an experimental stage, and therefore subject to breaking API changes that could occur at any time.

Quick Note: Due to the fact that the unit tests rely on a solid internet connection and that the reddit API is working properly, a failing build does not necessarily mean that the library is currently unstable. For example, this build failed because reddit was having issues with SSL at the time. JRAW tries its best to recover from server errors, but it can only do so much.

##Notable Features

  • OAuth2 support
  • Full multireddit support
  • All common actions (login, vote, submit, comment, messages, etc.)
  • Java 7 compatible
  • Simple HTTP framework capable of wrapping most any HTTP library
  • Dynamic ratelimit adjustment

See Quickstart to get you up and running. Javadoc can be found here

##Building

JRAW uses Gradle as its build system. If you come from a Maven background, see Gradle's user guide to get you started.

gradle release will generate four Jar files in build/releases: a normal jar with just the library, a "fat" jar with all of JRAW's runtime dependencies, a Javadoc jar, and a sources jar. See here for an example.

gradle test will run the unit tests

##Contributing

Before contributing, it is recommended that you have a decent knowledge of how the Reddit API works.

Some references:

####Want to contribute? Follow these steps:

  1. Fork the repository
  2. Put your testing user's credentials in /src/test/java/resources/credentials.json. It should be in this format. If you don't have a testing user, see below.
  3. Add your code. Implement an endpoint, make the code prettier, or even just fix up some whitespace or documentation.
  4. Write TestNG tests covering your changes
  5. Test your code by executing gradle test
  6. Update ENDPOINTS.md and Endpoints.java by running gradle endpoints:update (see the wiki)
  7. Send the pull request

####Creating a user for unit testing

The :testingUser subproject is a script to help you get set up with JRAW. To run it, execute TERM=dumb gradle testingUser:run. This script will:

  1. Register a new user
  2. Create an OAuth2 app
  3. Record the username, password, client ID, and client secret in credentials.json
  4. Prompt you to create a subreddit (JRAW can't do this as of now)
  5. Create a multireddit
  6. Submit a self post to /r/jraw_testing2

jraw's People

Contributors

guipsp avatar hsbakshi avatar kkari avatar likoms avatar mattbdean avatar mtt88 avatar phanigaddipati avatar pnemonic78 avatar zacsweers avatar zglazer avatar

Watchers

 avatar  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.