GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MichaelMChan/JRAW: Java Reddit API Wrapper

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

396 Commits
396 Commits

Folders and files

NameName
Last commit message
Last commit date
build/generated-src/net/dean/jraw
build/generated-src/net/dean/jraw
 
 
endpoints
endpoints
 
 
gradle/wrapper
gradle/wrapper
 
 
src
src
 
 
testingUser
testingUser
 
 
uml
uml
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
ENDPOINTS.md
ENDPOINTS.md
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 
upload_docs.sh
upload_docs.sh
 
 

Repository files navigation

#Java Reddit API Wrapper

travis-ci build status Coverage Status Reddit API coverage

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

##Notable Features

  • Java 7 compatible
  • Mini HTTP framework that wraps OkHttp
  • Basic site actions (login, vote, submit, comment, read inbox, etc.)
  • Full multireddit support
  • Full captcha support
  • Get trending subreddits
  • Get random posts and subreddits
  • Incubating OAuth2 usage

##Getting Started ####Adding the Dependency

JRAW is hosted on Bintray's jCenter.

Gradle:

repositories {
    jcenter()
}

dependencies {
    compile 'net.dean.jraw:JRAW:0.6.1'
}

Maven:

Add jCenter to your repositories (see here and press "Set me up!" on the right hand side) and then add the repository:

<dependency>
    <groupId>net.dean.jraw</groupId>
    <artifactId>JRAW</artifactId>
    <version>0.6.1</version>
</dependency>

####Using the Library See the wiki to get you up and running

Javadoc can be found here

##Building

JRAW uses Gradle as its build system. If you're coming from a Maven background, you can read this StackOverflow question to help you get started.

./gradlew 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.

./gradlew 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:

  • reddit/reddit's 'API' wiki page: Quick overview of the API and its rules
  • reddit/reddit's 'JSON' wiki page: Shows the data structure of the objects returned by the API
  • And of course, don't forget the official Reddit API documentation

####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
  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 ./gradlew test
  6. Update ENDPOINTS.md and Endpoints.java by running ./gradlew endpoints:update
  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 ./gradlew 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. Create a subreddit
  5. Create a multireddit
  6. Submit a self post to /r/jraw_testing2

About

Java Reddit API Wrapper

thatjavanerd.github.io/JRAW/

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.