Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmeiklejohn/wine_dot_com_api_request
Provides a simple interface to cut down on code duplication when querying the wine.com API.
https://github.com/cmeiklejohn/wine_dot_com_api_request
Last synced: 2 months ago
JSON representation
Provides a simple interface to cut down on code duplication when querying the wine.com API.
- Host: GitHub
- URL: https://github.com/cmeiklejohn/wine_dot_com_api_request
- Owner: cmeiklejohn
- License: mit
- Created: 2010-01-02T03:00:05.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2010-01-02T06:46:01.000Z (almost 15 years ago)
- Last Synced: 2024-09-03T18:18:23.931Z (4 months ago)
- Language: Ruby
- Homepage: http://rubygems.org/gems/wine_dot_com_api_request
- Size: 113 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- Changelog: CHANGELOG
- License: MIT-LICENSE
Awesome Lists containing this project
README
= Introduction
WineDotComApiRequest provides a simple no-frills interface to the Wine.com query API.
Its purpose is to eliminate the code duplication in setting up the request each time
you which to receive information from the API.It returns pure JSON or XML depending on which type of response you request.
= Installation
To install, run:
$ sudo gem install wine_dot_com_api_request
Then, place your API key from wine.com in the lib/wine_dot_com_api_request/configuration.rb file.
= Examples
To perform a request, follow the example below:
w = WineDotComApiRequest.new(:search => 'mondavi cabernet',
:format => :xml,
:resource => :catalog,
:size => 1,
:offset => 0)res = w.query
View the documentation for possible search arguments.
The query routine will return either the raw XML or JSON request, depending on which you specify.
= Documentation
You can generate documentation if you have the source by typing:
$ rake doc
= Release Notes
First release.
= Credits
WineDotComApiRequest is maintained by {Christopher Meiklejohn}[mailto:[email protected]]. Contact me if you'd like to request any features or have any questions or feedback.
= License
WineDotComApiRequest is Copyright 2010 Christopher Meiklejohn.
It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file, which is attached below:
Copyright (c) 2010 Christopher MeiklejohnPermission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.