Member Service API

Member Service API is a Rails 5 application designed to serve ntriple files.

License

Contents

Requirements

Member Service API requires the following

Getting Started

Setup the main application repository:

git clone https://github.com/ukparliament/member-service-api.git
cd member-service-api
bundle install
cp .env.sample .env

Within the .env file, you will need to specify the UKPDS_DATA_ENDPOINT value. Without this, the application will not run successfully. The

Running the application

We recommend running the application through docker. With docker installed on your machine, run:

make build
make dev

make build creates a docker image on your machine

make dev runs the application and attaches the current directory into the docker container. This means updates you make to the views and contollers will be automatically reflected.

Making Requests

A request can be made to the triple store by passing the query to the response_streamer. For example,

response_streamer(query)

Multiple requests can be made in the controller and they will be returned as one response. For example,

response_streamer(query_one)
response_streamer(query_two)

The response streamer will append the subsequent response to the first, creating a single response.

Contributing

If you wish to submit a bug fix or feature, you can create a pull request and it will be merged pending a code review.

  1. Fork the repository
  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

License

Member Service API is licensed under the Open Parliament Licence.