Hello Account (Ruby)

Ruby(gem:databasedotcom) で Hello Account。

$ rails console

[1] pry(main)> client = Databasedotcom::Client.new(host: "test.salesforce.com", client_secret: <client secret>, client_id: <client id>)
[2] pry(main)> client.authenticate(username: <user name>, password: <password>)
[3] pry(main)> result = client.query("SELECT Id, Name FROM Account")
[4] pry(main)> result.each do |record| ; p record ; end

コメントを残す