0.0
No commit activity in last 3 years
No release in over 3 years
https://github.com/laMarciana/panlex_client/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.13

Runtime

~> 2.2
~> 0.8
 Project Readme

panlex_client

Simple Ruby client for the public API of the PanLex Database. It uses rest-client gem.

Usage

Right now, there is just a PanlexClient module with only one query method wich takes two arguments: the URL parameter and the request body. It returns PanLex API response parsed to a Hash or raises an exception with the response in it.

require 'panlex_client'

begin
  response = PanlexClient.query 'lv', { :indent => true, :limit => 2 }
  response['result'].each do |language|
    puts language['tt']
  end
rescue RestClient::ExceptionWithResponse => e
  puts JSON.parse(e.response)['message']
end

Relase Policy

panlex_client follows the principles of semantic versioning. panlex_client is still in an 0.x.y version, so it is not considered stable and anything can change at any moment.

LICENSE

Copyright 2013 Marc Busqué - marc@lamarciana.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.