IntroductionThis is an introduction to Base4R, a Ruby client library for the Google Base API. The code is licensed under the GNU General Public License. The current release is quite basic, and doesn't attempt to cover the whole of the Google Base API. In particular the code is write-only, there is functionality to create, update and delete Base items but nothing to query the Base API. Contributions of code to add this functionality would be welcomed, please contact the author if you are interested. Features - Authenticate your code against the Google Account Authentication API over HTTPS using the ClientLogin interface.
- Create Base items.
- Update existing Base items.
- Delete existing Base items.
- Item Types are extensible, but a Product Items type already exists.
Using base4r from your codeEither download the gem from the downloads page or build your own by typing rake in the top-level directory. See the unit tests for simple examples of creating, editing and deleting Base items. Running the unit testsTo run the unit tests you should make a file test/test_config.rb with content like the following, but replacing the example values with your Google Base login details and API key. TEST_CONFIG = {
:username => 'user@example.com',
:password => 'password',
:api_key => 'example_api_key'
}run rake test from the top-level directory to run the tests. These will create some junk items on your base account if everything is configured properly. You can use the tests as a guide for how to use base4r from your own code
|