I just started working with the Mailchimp API. So far I have configured the open authentication using Node.js and Angular.js. I want to implement an export of customers (First name, Last name and Email) from my app to a Mailchimp list. I want to do this in a Java worker, so I started looking for a Mailchimp API wrapper for Java. So far I have managed to find ecwid-mailchimp wrapper, but it is for Mailchimp API v2.0 and it looks like the project is dead.
Is there an active implementation of a Java wrapper for Mailchimp API v3.0?
It does not seem a good idea to use the old API (v2.0) and a dead implementation in a new project.
The alternative is to do the implementation by myself, but it is a waste of time if someone has already done it.
MaleOrang is a new Java Wrapper for Mailchimp API v3.0. It is a replacement for ecwid-mailchimp from the same vendor.
After a lot of searching I found this project on github. It is incomplete, but I created a pull request with the OAuth and am currently working on batches.
AFAIK, there is no existing Java wrapper, but it shouldn't be too hard to do yourself. You'll want to look into the API v3 batch operations docs to make this as easy on yourself as possible.
Found one more Java wrapper library, relatively fresh, bananaj. At least I've found those API methods that were needed for me, but were missing in libraries from previous answers.
bananaj is amazing library I forked already or another way is calling the rest API https://mailchimp.com/developer/api/marketing/automation-email-queue/ , I was testing using postman and Java http library.
Related
I'm using Azure for the first time and wanting to make a very simple RESTful API, but trying to follow the example using Swagger.io feels like a lot of work for what I want to achieve. Is there a way to just write Java code for JAX-RX without going through the Swagger.io generator process?
Service description stating that you can bring your API as is:
Bring your existing API as-is - You don't have to change any of the
code in your existing APIs to take advantage of API Apps -- just
deploy your code to an API app. Your API can use any language or
framework supported by App Service, including ASP.NET and C#, Java,
PHP, Node.js, and Python.
Swagger support facilitate ease of consumption, since you able to auto generate client sdks in various languages based on swagger spec. Nothing prevent you not having swagger and still use service.
I am trying to create my own REST-based API using Java and Akka. I have created my main algorithmic implementation using Akka already. My confusion is coming in the form of how to implement the REST part of this. Most examples and libraries I have seen are specifically for Scala, which I am at the moment trying to stay away from.
I see Spray is a good way to go, but I see it's supposed to be for Scala. However, I know Scala compiles down to Java Byte Code and Java should be able to call Scala and visa versa. Is it possible to do this with Spray? If so, are there any working examples or tutorials online? I am not having any luck anywhere.
Thanks for your help and time.
I would recommend you to use playframework 2.0. It is already integrated with akka and you can choose to write your code in Java or Scala. Its will be very easy to implement a REST-based API.
Actually, I went down the same exact path: wanted to use Akka for REST-based services implementation and did not want to use Scala.
Akka can be used with Play-mini, which gives you the Sinatra-like REST mapping without any of the ui stuff (you don't need).
You may also want to look at the Spray Framework http://spray.io/.
It might be the lightweight alternative to Play Framework.
Here is a github repo with Jersey 2 Rest Service using Akka actors for processing in a Java project based on Maven.
https://github.com/pofallon/jersey2-akka-java
I think you want to look at this:
https://www.typesafe.com/activator/template/akka-http-microservice
Simple (micro)service which demonstrates how to accomplish tasks typical for REST service using Akka HTTP. Project includes: starting standalone HTTP server, handling simple file-based configuration, logging, routing, deconstructing requests, unmarshalling JSON entities to Scala's case classes, marshaling Scala's case classes to JSON responses, error handling, issuing requests to external services, testing with mocking of external services.
There is an old entry (2010) on akka github for a akka-sample-rest-java example that would be really interesting. However it's removed in following versions, don't know why.
https://github.com/akka/akka-modules/tree/v1.0/akka-samples/akka-sample-rest-java/src/main/java/sample/rest/java
Since it has been unmaintained, most of the classes rely on old versions of akka and does not works with the most recent ones.
at the moment two modern microservices & REST technologies: Vert.x and dropwizard
Akka-HTTP is the defacto Spray 2.0 as this stackoverflow thread shows:
Spray, Akka-http and Play, Which is the best bet for a new HTTP/REST project
So, I would opt for choosing Akka-HTTP if REST based API for Akka was what you were looking for.
I have used restkit framework in ios. Which is very powerful and provides features like caching and all. I am looking whether a similar framework is available in android?
I came across a framework called restlet. But didnt find any samples to work with.
Is there any frameworks out there for the same, for caching data from rest services? Also could some one direct me to good tutorials for restlet in android?
Thanks
In addition, there is this first application tutorial covering Restlet edition for Android:
http://restlet.org/learn/guide/2.2/introduction/first-steps/first-application
There is a sample to work :
http://restlet.org/learn/guide/2.2/introduction/first-steps/first-application
It should solve your problem
I wouldn't call it a framework, but there is a library called Robospice that supports Caching Rest Calls.
Here is the description they posted in their webpage:
RoboSpice is a modular android library that makes writing asynchronous
long running tasks easy. It is specialized in network requests,
supports caching and offers REST requests out-of-the box using
extension modules
Give Retrofit a shot. It's easy with plenty of customization available.
It also has OkHttp that can pair with it.
Also check out this SO link. It compares Retrofit to Android AsyncTasks and Volley. As far as speed goes, Retrofit wins hands down.
I think the RestTemplate included in Spring for Android is a good solution: http://static.springsource.org/spring-android/docs/1.0.x/reference/html/rest-template.html
There is a book that provides a tutorial: http://www.packtpub.com/spring-for-android-starter/book
Unlike Restkit which comes with backed in Core Data support, you would still have to find a separate solution if you want to plug your Android Spring REST client into your local sqlite db. It should be possible to use something like http://greendao-orm.com/ in connection with the Spring REST client.
Is there a standard implementation in Java for the Facebook Api?
From what I read the http://code.google.com/p/facebook-java-api/ doesn't work.
There is no official Java API.
They had a nice list of all third party java libraries but they deleted that page and prohibited web spiders from accessing it so I can't even get cached version now (wtf is wrong with you facebook?)
RestFB is actually pretty much the library to go right now. It supports both old REST api and new OpenGraph stuff. Has lots of examples and actively developed.
That java library you posted was abandoned a year ago. No bugfixes or updates ever since. It works fine with old REST API but doesn't support new one.
Are you sure that it doesn't work? I'm using facebook-java-api, and haven't found any problem yet.
There also exists RestFB client, but it not looks like a mature library. And also it haven't maven support :(
There's a lot of information out there, but I can't quite figure out:
What's Java's answer to PHP's SoapClient()?
No frills, just want to create a client to access the methods described by a .wsdl document.
See this question. There are many Web Services frameworks in Java that can generate a client from a WSDL file. Eclipse has a plug-in to create a client stub from a WSDL file using the Axis2 framework. Perhaps this is the easiest option for a beginner.
If all you want is a piece of software to generate client code from an existing WSDL, you have more options than you can shake a stick at. I've tried several, and they all do pretty much the same thing in the same way, the big difference between them being the documentation. For me, the best documented of the lot is Apache CXF, which will generate JAX-WS-compliant code that you can then use with any JAX-WS library in your application (such as CXF itself, or Sun's JAX-WS-RI, and so on).
It's going to be more complex than SoapClient, I would imagine.
JAX-WS, most appserver vendors supply implementations and tooling.
See glassfish for an exmple implementation. The glassfish guide docs give details of how to go about developing, there are many variations depending upon how you would normally go about doing Java development. For me, I work with IBM tools and therefore simply load up RAD point as the WSDL and click "generate".
You can try using RCPServiceClient class in axis2.
Here is the java doc for it:
ws.apache.org/axis2/1_1_1/api/org/apache/axis2/rpc/client/RPCServiceClient.html
It doesn't require you to generate code to call web services.
Here is a decent example of how you can interact with a service using RPCServiceClient.
ws.apache.org/axis2/1_2/pojoguide.html#testingpojows
Do remember that java is strongly typed language so you can't do things like serviceClient->someRandomFunction(params), since someRandomFunction will not be defined ahead of time if you are trying to do something like PHP's SoapClient.
However, it will be equivalent to $soapClient->_soapCall function, as you will be able to do something like
serviceClient.invokeBlocking(
opProcess, -- function you are trying to call..
opResponseArgs, -- these are arguments you are passing
returnTypes); -- types that you are expecting back
Hope this helps.