Skip to content

democratech/api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaPrimaire logo

Services API

Context

In order not to require extensive coding resources for coding websites, democratech makes an extensive use of web services behind the scene, most notably:

Nevertheless, we needed an API of ours (think "Zapier") to properly synchronize all those services.

Process overview

The services API is located on the green "Supporteurs" node.

Citizen signing process

Citizen subscription process

Citizen contributing process

Citizen contributing process

About the Services API

The Services API is written in Ruby and leverages the Grape API framework. The Webserver used is Unicorn (behing nginx).

Installing and starting the Services API

  1. Make sure your run bundle install to make sure all dependencies get installed
  2. Create a config/keys.local.rb file with all the necessary information (cf config/keys.rb)
  3. launch the unicorn server with the following command:
bundle exec unicorn -c config/unicorn.conf.rb config/config.ru

Alternatively for development purposes, you can also just run the Services API with rackup to use the default WEBRick web server:

rackup config/config.ru

Accessing the Services API

You can test that the Services API is up and running by calling:

curl http://127.0.0.1:9292/api/v1/test

It should return an HTTP 200 OK

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Authors

So far, democratech's Services API is being developed and maintained by

License

About

API used to interconnect services used by LaPrimaire.org

Resources

License

Stars

Watchers

Forks

Packages

No packages published