I googled a bit, but all java clients for the tumblr API were outdated, poorly written, not supported, etc.
Is there something that is up-to-date, is of sufficient quality, and (optionally) has a maven dependency? Something like twitter4j, but for tumblr.
If you're willing to also use Spring Social, I've written a Tumblr client for it here:
https://github.com/sdouglass/spring-social-tumblr
Spring Social is a great, solid library for building and using OAuth 1/2 API clients. Using it gives you the ability to just drop in support for a variety of other APIs very easily.
http://www.springsource.org/spring-social
I've included info for adding spring-social-tumbler as a Maven dependency in the README for the project, which you can see at first the link above.
I think if you want to use it, the simplest approach would be something like:
Tumblr tumblr = new TumblrTemplate(yourTumblrApiKey);
If you want to access the API on behalf of a user, you'd need to use OAuth to get an access token and access token secret for the user, at which point you could do something like:
Tumblr tumblr = new TumblrTemplate(yourTumblrAppConsumerKey, yourTumblrAppSecret, userAccessToken, userAccessTokenSecret);
If you integrate Spring Social into your project it can help with building appropriately authorized Tumblr instances, obtaining and storing access tokens/secrets for users, etc. You'll have to check their docs for more info about that. My code is designed to "plug in" to a typical Spring Social setup the same way as the official libraries like Spring Social Facebook, Spring Social Twitter, etc.
Jumblr is the official Java API for Tumblr, here is a link! And here is the documentation
You may also have a look at Temboo. Temboo offers streamlined and normalized access to many APIs, including Tumblr, via a native Java SDK.
My personal favorite reasons for using this library is how easy it makes OAuth and that Temboo lets me save API credentials in the cloud so I don't have to go through the hoops of abstracting them from my code or securing it on my machines.
You can check it out and play with it at http://temboo.com/library/Library/Tumblr
I should also note that I work at Temboo. So when you check it out, if you have any questions, feel free to message me.
You may have a look at Webshell.
They provide a simple REST API that can be used to call third party APIs. Among those apis, there is the tumblr API.
Don't forget to check out their hilarious blog : http://apijoy.tumblr.com/ :)
You can look at Jumblr library. It is very easy and powerful.
Related
I'm still learning spring and currently I'm trying to create webapplication and RESTful API at the same server. It was easy until I tried to add OAuth2 authorizaton to be able to consume that API in Android application.
I have a problem because I don't completely understand what is happening under the hood of spring.
I want achieve something like this:
localhost:8080**/** - webapp authorized in normal way
localhost:8080**/login** - webapp login page
localhost:8080**/api/** -RESTfull API
localhost:8080**/oauth/[authorize|token]** - OAuth2
Android application to consume API
Is it even possible? Can you provide an example code or just the way I should do it?
Well, Spring Boot has plenty of documentation.
I'd recommend the Spring Boot manual
As for what you want, yes, it's possible.
See this demo which has OAuth, REST API and normal HTML, CSS, JS files all in one. Also, this demo is based on spring-boot, so what more do you want :)
Again, the demo url:
https://github.com/szerhusenBC/jwt-spring-security-demo/
As I said above, it's possible. Not recommended, but possible. It would be recommended to split them, for a better separation of concerns. Also for performance reasons: Apache for instance can serve static files much faster than SpringBoot/Tomcat can.
Of course you can start this way and do it later. Enjoy.
Yes! Take a look at JHipster and how they realize OAuth2. http://jhipster.github.io You can generate app and check how everything is done under the hood. You can also find many useful patterns for development.
I have already created a web project (not in google app engine) and at last wanted to integrate Googe OAuth with my existing web project.Will I be needing Google Engine Plugin for Eclipse or can it be done using just google-appengine and google-sdk jars?I have gone through many links, many of them suggest about creating a maven project which destroys my project structure.
No you technically do not need any of the google jars because OAuth is a protocol, not a program of sorts. Google jars may however simplify your application.
If you want to write it from scratch, please refer to google's website about it. This website also provides clients which, and I quote from the given link:
Note: Given the security implications of getting the implementation
correct, we strongly encourage you to use OAuth 2.0 libraries when
interacting with Google's OAuth 2.0 endpoints. It is a best practice
to use well-debugged code provided by others, and it will help you
protect yourself and your users. For more information, see Client
libraries.
I’m trying to build a Sync application for Google Task API using Java.
An additional constraint I have is to use 2-legged OAuth.
I followed the article Using 2-legged OAuth with Google Tasks API for Google Apps domain administrators but the code sample they provided for Java doesn’t compile with the latest API libraries.
Also, there is lot of material available about Google Tasks, but either its deprecated or using non existent API/references.
It would be great help if someone could point me to a relevant article or working example.
Articles and sites I referred to:
https://developers.google.com/google-apps/tasks/
Thanks
Can you explain the constraint to use 2LO? There are ways to write sync apps that use OAuth2 and tokens, which has more current library and sample support. You can request "offline" access and save the refresh token in the client. Then you can continually sync that data for the user in question. Is the reason you need 2LO that you need to do this for an entire domain of users without prompting them?
In any case, the tasks api and 2LO should be compatible even if you're having issues with some libraries. I can't comment on the state of all the samples and libraries, but if you follow the steps to approve the tasks api scope for your client_id in ManageOAuthClients and you know the ids of your domain users, and you sign your requests properly, it should 'just work'
Is there any open source CMS in a java/xml platform which supports REST based apis ?
Basically i like to deploy a CMS as well a widget like application who can communicate each other via REST? Have tried openCms and couple of others too, but couldn't figure out a proper interface either via http or rest?
Drupal allows you to do that using the Services project at http://drupal.org/project/services
It provides a REST based interface for CRUD access to its content and some other services.
Take a look at Hippo CMS; it's open source, Java based and offers a JCR based content repository with REST capabilities.
I've never used it, however, https://getdirectus.com/ looks promising. I like the fact that it's built to be headless, meaning it's core function is to be a CMS with RESTful API, as opposed to the API being a secondary feature.
I am looking to write a desktop/cli Java app that interacts with Tumblr. To do that I need to use xAuth. I was hoping that Spring Security could be used to here however, I can't find any supporting documentation. Can someone point me to some documentation for how to support xAuth in Java? I am open to to using a framework other than Spring Security.
The best description I've seen of xAuth is on the twitter site. You've probably found the same by searching online.
As for implementing a client in Java, one approach is to reuse the xAuth pieces of the Twitter API ME. The docs make a point of saying that the "xAuth classes are fully reusable by any other API or app, so you can use it to work with any other xAuth service, besides Twitter. So whether you are looking for just a xAuth lib, Twitter API ME provides it for you."