Given a web API, Generate client libraries in node, php, python, ruby
Given a web API, Generate client libraries in node, php, python, ruby
Api Libraries Powered And Created by Alpaca
Tired of maintaining API libraries in different languages for your website API? This is for you
You have an API for your website but no API libraries for whatever reason? This is for you
You are planning to build an API for your website and develop API libraries? This is for you
You define your API according to the format given below, alpaca builds the API libraries along with their documentation. All you have to do is publishing them to their respective package managers.
Join us at gitter if you need any help.
You can download the binaries (v0.2.1)
Or by using deb packages (v0.2.1)
Or by using golang (v1.2)
# Clone the project into your golang workspace
$ git clone git://github.com/pksunkara/alpaca
$ cd alpaca
# Install program
$ make && make install
You can find some api definitions in the examples directory. The api libraries generated are at https://github.com/alpaca-api
Completed api definitions are buffer.
$ alpaca </path/to/dir>
The path here should be a directory with api.json, pkg.json, doc.json
Usage:
alpaca [options] <dir>
Application Options:
-v, --version Show version information
Language Options:
--no-php Do not write php library
--no-python Do not write python library
--no-ruby Do not write ruby library
--no-node Do not write node library
Help Options:
-h, --help Show this help message
Please remove the comments when actually using these json files
All the following fields are required unless mentioned.
…
All the following fields are required unless mentioned.
…
The following is filled according to the entries in api.json
…
Supported request formats are raw, form, json. The format raw is always true.
This means, the body set in the options when calling an API method will be able to be encoded according to the respective request_type
If set to raw, body is not modified at all
Supported response formats are html, json.
Supported are basic, header, oauth
Supported programming language versions are:
| Language | V | E | R | S | I | O | N |
|---|---|---|---|---|---|---|---|
| node | 0.8 | 0.9 | 0.10 | 0.11 | 0.12 | ||
| php | 5.4 | 5.5 | |||||
| python | 2.6 | 2.7 | 3.2 | 3.3 | |||
| ruby | 1.8.7 | 1.9.1 | 1.9.2 | 1.9.3 | 2.0.0 | 2.1.0 | 2.1.1 |
| Language | Package Manager |
|---|---|
| node | https://npmjs.org |
| php | https://packagist.org |
| python | https://pypi.python.org |
| ruby | https://rubygems.org |
Check here to learn about testing.
Here is a list of Contributors
I accept pull requests and guarantee a reply back within a day
You get internet points for pull requesting the following features.
Alternatively, you can write your own converter from alpaca.json to the following
MIT/X11
Report here. Guaranteed reply within a day.
Pavan Kumar Sunkara ([email protected])
No open issues yet, or sync has not completed.