Project

modgen

0.0
No commit activity in last 3 years
No release in over 3 years
Modgen allow discover and use modgen's API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

Modgen API klient

Instalation

Install

gem install modgen

Bundler

gem 'modgen'

Ruby

require 'modgen'

Configuration

Modgen.configure do
  client_id "1"
end

# ------------ or ------------

Modgen.config.client_id = "1"

List of all available conf.

key example and description
oauth2.client_id Id of client generated by API server.

    <i>e.g. egt45e5t5trh54rth5rth54rt5h4r5t4h5rt4h</i>
  </td>
</tr>
<tr>
  <td>oauth2.client_secret</td>
  <td>
    Secret key generated by API server.<br><br>

    <i>e.g. 4546846846th468684684t684hthrthrt6h871rh78888</i>
  </td>
</tr>
<tr>
  <td>oauth2.redirect_uri</td>
  <td>
    Address of web page where request will be redirected for gain access code.<br><br>

    <i>e.g http://localhost/oauth2callback</i>
  </td>
</tr>

Usage

First you must discovery API. For displaying all available versions.

Discovery

Modgen::Discovery.versions

Details of specific version. If version is nil Modgen show preffered version.

Modgen::Discovery.version(version)

Discover specific version. If version is nil Modgen discover preffered version.

Modgen::Discovery.discover(version)

API details

Modgen::API.api.name
               .description
               .version
               .created_at
               .updated_at
               .base_url

API request

Modgen::API.dataset.get(id: 1)

Test

First start testing API in /test_api and than.

rake