abunashir / api.relaton.org

Relaton Service API

Home Page:https://relaton-api.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Relaton API

Getting Started

View performance data on Skylight View performance data on Skylight

Usage

Fetch a standard

The /api/standard endpoint allow us to fetch any of the supported standards.

Request

Method: GET
Endpoint: /api/standard
Content-Type: application/json
Parameters: code, year, document_format

Example: /api/standard?code=ISO 19011&year=2011&document_format=json

Response

Status: 200
Content-Type: application/json
Body:

{
  type: "ISO",
  code: "ISO 19011",
  document: {
    id: "ISO19011-2011",
    .............
  },
  updated_at: "2019-10-10T11:03:11Z"
}

Note: In the underneath, it is using the relaton library, so please check that documentation for all supported standards.

Development

Native development

After you have cloned this repo, run this setup script to set up your machine with the necessary dependencies to run and test this app:

% ./bin/setup

It assumes you have a machine equipped with Ruby, Postgres, etc. If not, set up your machine with this script.

After setting up, you can run the application using Heroku Local:

% heroku local

# or plain old
bin/rails server

Development with docker

If you prefer to run this application with docker, then you need to follow the following steps.

  1. Copy the environment variables
cp .samplle.env .env
vim .env
  1. Setup and Run the app
# setup / rebuild
make setup

# run - no rebuild
make up

The makefile also includes couple of other target to run the test suite or console in those containers. Please check out the Makefile for more details

Guidelines

Use the following guides for getting things done, programming well, and programming in style.

Contributing

First, thank you for contributing! We love pull requests from everyone. By participating in this project, you hereby grant Ribose Inc. the right to grant or transfer an unlimited number of non exclusive licenses or sub-licenses to third parties, under the copyright covering the contribution to use the contribution by all means.

Here are a few technical guidelines to follow:

  1. Open an issue to discuss a new feature.
  2. Write tests to support your new feature.
  3. Make sure the entire test suite passes locally and on CI.
  4. Open a Pull Request.
  5. Squash your commits after receiving feedback.
  6. Party!

Deploying

If you have previously run the ./bin/setup script, you can deploy to staging and production with:

% ./bin/deploy staging
% ./bin/deploy production

About

Relaton Service API

https://relaton-api.herokuapp.com


Languages

Language:Ruby 81.0%Language:HTML 12.9%Language:Shell 2.7%Language:JavaScript 1.9%Language:Dockerfile 1.0%Language:Makefile 0.6%Language:CSS 0.0%