Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add dependencies to gemspec * Set up a subledata namespace * Require all models and lib files * Add an example to the readme
- Loading branch information
Showing
5 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
subtledata_ruby | ||
=============== | ||
SubtleData Ruby Library | ||
======================= | ||
|
||
Ruby Library for SubtleData's SubtleJSON API | ||
|
||
Install | ||
======= | ||
|
||
gem install subtledata | ||
|
||
Example | ||
======= | ||
|
||
require 'subtledata' | ||
|
||
key = 'S0YrNTJY' | ||
|
||
puts SubtleData::Standard::Locations.get_all_locationst(key, false).inspect | ||
puts SubtleData::Standard::Locations.get_location(959, key, false).inspect | ||
|
||
Ruby Library for SubtleData's SubtleJSON API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
models = File.join(File.dirname(__FILE__), '..', 'models', '*.rb') | ||
Dir[models].each {|file| require file } | ||
|
||
require_relative './general_api.rb' | ||
require_relative './locations_api.rb' | ||
require_relative './monkey.rb' | ||
require_relative './swagger.rb' | ||
require_relative './users_api.rb' | ||
|
||
Swagger.configure do |config| | ||
config.format = 'json' | ||
config.scheme = 'https' | ||
config.host = 'api.subtledata.com' | ||
config.base_path = '/v1' | ||
config.inject_format = false | ||
end | ||
|
||
module SubtleData | ||
module Standard | ||
Locations = ::Locations_api | ||
Users = ::Users_api | ||
General = ::General_api | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters