Skip to content

ondra-m/modgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This gem allow discover and use modgen's API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published