class Zotero::Api
Public Class Methods
new(user_id, key)
click to toggle source
# File lib/zotero/api.rb, line 5 def initialize(user_id, key) @user_id = user_id @key = key end
Public Instance Methods
get(path_fragment)
click to toggle source
# File lib/zotero/api.rb, line 10 def get(path_fragment) ::JSON.parse(RestClient.get("https://api.zotero.org/users/#{@user_id}/#{path_fragment}", { 'Zotero-API-Version' => 3, 'Zotero-API-Key' => @key }).body) end