# # gravaty # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani # # This file is part of gravaty. # # gravaty 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. # # gravaty 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 gravaty. If not, see . # require_relative '../lib/gravaty' i = 0 # Creates the Gravaty object with an (example) email puts "------------------------------------------" puts "XML-RPC: '#{i}'. Creates the Gravaty object with an (example) email." puts "------------------------------------------" puts "irb(main):001:0> a_gravaty = Gravaty::gravatize 'user@example.com'" a_gravaty = Gravaty::gravatize 'user@example.com' puts i += 1 # Calls the test method of the XML-RPC API puts "------------------------------------------" puts "XML-RPC: '#{i}'. Calls the test method of the XML-RPC API with password 'password'." puts "------------------------------------------" puts 'irb(main):001:0> a_gravaty.xmlrpc Gravaty::RPC_TEST_METHOD' a_gravaty.xmlrpc Gravaty::RPC_TEST_METHOD, 'password' puts i += 1