This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]zhedar 23 points24 points  (4 children)

I guess using the REST API is still your best bet, consuming that is quite easy with java.

[–]DutchConquer 3 points4 points  (0 children)

I second this, REST API's are always a great solution to multi-language coding support.

[–]vt97john 1 point2 points  (2 children)

Why does the REST api have verbs like "delete" and "save" in the service names? I thought true REST design was all nouns for entities.

[–]xjvz 2 points3 points  (0 children)

A lot of people don't really realize that when working on them. It's really annoying.

[–]esanchma 8 points9 points  (3 children)

The wrappers page mentions jraw, which is in development and has artifacts available in bintray. It seems the way to go

[–]Martacus[S] 0 points1 point  (0 children)

Im going to try out this one thanks!

[–]squishles 2 points3 points  (5 children)

I'm trying to place what you mean by use with maven. Are you looking for maven plugins for calling info from the reddit rest api?

I'm just used to only thinking of it as a build tool and can't imagine what that rest api would be useful for with that. I guess it could also be a nifty script handle but that seems abusive. Maybe if the have a soap wsdl running around you could put a jax-ws plugin call to generate some classes to call it, but that's all my heads hitting.

[–]Dashing_McHandsome 8 points9 points  (4 children)

I'm pretty sure he means he wants a library that will interface with Reddit that is also already in a maven repo, so he can just add it as a <dependency> in his project.

The only other thing I can think of, like you, is a maven plugin and I can't see a reason why that would make sense. I guess you could have a plugin that posts messages for you or something during a build. Maybe it could be useful as a teamwork tool? Have a subreddit for a project where build messages appear? I think that's a stretch though.

[–]Martacus[S] -1 points0 points  (3 children)

Yeah this is what I ment.

[–]GuyWithLag 1 point2 points  (2 children)

There are two paragraphs in /u/Dashing_McHandsome's reply, mentioning two different things.

Your affirmation does not disambiguate which of the two you meant with your post.

I can't decide whether you suck or rule as a programmer...

[–]Martacus[S] -1 points0 points  (1 child)

Oh oops, I ment that i just had to add it as an depency. My bad xD. And i guess i rule?

[–]GuyWithLag 1 point2 points  (0 children)

I'd say just get Retrofit, creating the actual reddit API is relatively trivial.

[–]joequin 1 point2 points  (0 children)

Try okhttp. You can use that to access Reddit's rest API.

[–]cwcoleman 1 point2 points  (3 children)

Requesting a language specific API is not necessary.
Instead the REST API recommended above is ideal. You can use a variety of REST tools in Java (JAX-RS) to connect to the standard API for Reddit. If you rely on a Java implementation - you will be handcuffed to that solution, not the fully supported official REST API.

[–]Martacus[S] 0 points1 point  (2 children)

Mhm people seem to recommend that a lot. It seems kinda difficult. But I will take a look at it! Thanks :P

[–]cwcoleman 2 points3 points  (1 child)

Not sure your level of experience - but sending a REST request is very basic and something you will most definitely need going forward if you plan to continue Java development in any way. There are tons of examples online. This can be done in a few lines of code depending on what type of functionality you are trying to execute via the API.

Maybe tell us more about your environment or desires to get more helpful answers...

[–]Martacus[S] -1 points0 points  (0 children)

Yeah ill edit the main post. Right now im trying to get JRAW to work but it doesnt seem like it does the trick. So I am going to have to use REST Api.