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.
|
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