News for hackers. Stuff that matters.
Re:Show HN: Given an API, Generate client libraries in Node,... by sunkarapk on Friday January 03, 2014 @09:03AM (#7005425)
Author here. I covered almost everything in the documentation. And there is also a small example which is hosted at https://github.com/alpaca-api.

Please ask if you have any questions. Thanks

Re:Show HN: Given an API, Generate client libraries in Node,... by htuao on Friday January 03, 2014 @09:15AM (#7005471)
How do you differ from Swagger, Blueprint, I/O Docs, RAML and all these API endpoint descriptions?
Re:Show HN: Given an API, Generate client libraries in Node,... by sunkarapk on Friday January 03, 2014 @09:35AM (#7005569)
I tried searching for a program which generates client libraries in different programming languages and failed.

Could you please link if something does it? From what I gather, the above mentioned sites only provide methods of describing the API and/or Automating the API on the server side. Nothing is said about client libraries.

Thanks

Re:Show HN: Given an API, Generate client libraries in Node,... by mattdawson on Friday January 03, 2014 @09:40AM (#7005592)
Re:Show HN: Given an API, Generate client libraries in Node,... by jerf on Friday January 03, 2014 @10:59AM (#7006044)
I think that creates an API, then exposes it in numerous languages. This writes wrappers to existing APIs. Not the same thing. (Lots of code similarity under the hood, though.)
Re:Show HN: Given an API, Generate client libraries in Node,... by mattdawson on Friday January 03, 2014 @02:44PM (#7007632)
No, it actually does both - which is why I was so interested in it initially.

from the above link: "generates code to be used to easily build RPC clients and servers"

TBF, I haven't used it as a developer, but I did contract work with a company that had invested in it heavily. From what I saw of their workflow, it ended up being a pretty nice bootstrap tool and little more.

edit: Oh, I see what you're saying. Yes, you're correct - thrift does not wrap existing APIs.

Re:Show HN: Given an API, Generate client libraries in Node,... by michaelmior on Friday January 03, 2014 @09:42AM (#7005597)
Why create a new format for describing APIs instead of using something like RAML? The client library generation is very useful, but it would be nice if there wasn't yet another format needed to describe the API.
Re:Show HN: Given an API, Generate client libraries in Node,... by fzltrp on Friday January 03, 2014 @09:55PM (#7009765)
There's this utility called swig(http://www.swig.org/) which let you create wrappers for C/C++ libraries to a number of different target languages (dynamic and static), though often time languages offer ffi on their own.

The code generated by this tool is rather heavy weight though. Also I'm not quite sure if this is what you're looking for.

Re:Show HN: Given an API, Generate client libraries in Node,... by fehguy on Saturday January 04, 2014 @01:42AM (#7010271)
https://github.com/wordnik/swagger-codegen

does javascript, scala, java, objective-c, php, python (3), ruby, android, and even flash

Also has the benefit of a commercial backer (https://helloreverb.com) and a real app depending on it

Re:Show HN: Given an API, Generate client libraries in Node,... by matt_kantor on Friday January 03, 2014 @11:50AM (#7006410)
Re:Show HN: Given an API, Generate client libraries in Node,... by rybosome on Friday January 03, 2014 @12:25PM (#7006653)
Hey, I noticed you mentioned that you were interested in having client library generation in Obj-C, Java, and Scala, yet all of the existing client lib support is for dynamic languages. I think you may find that some fundamental changes need to be made to support this, unless every datatype is just going to be a string.
Re:Show HN: Given an API, Generate client libraries in Node,... by sunkarapk on Friday January 03, 2014 @12:33PM (#7006712)
If you are talking about API definition, there need not be many changes since api.json do not define any objects.

If you are talking about the code of the program, they wont be changed because, the program just compiles and executes the templates.

If I didnt answer your question properly, could you please elaborate?