Cookbook 01: Hello, Computer
Three calls make a computer in the cloud, open a browser on it and load a page.
By The Pine Computer team
The first recipe is the shortest. Your program makes a computer, opens a session with a browser on it, and loads a page. The window on the right of the film is the computer’s own screen, live.
computer = pine.create_computer
puts "computer ready"
session = computer.create_session(browser: true)
puts "browser open"
tab = session.create_tab(url: "https://pinecomputer.io")
session.patch_tab(tab.target_id, active: true)
puts "opened https://pinecomputer.io"
gets # press Enter to stop
computer.stoppine is your client. Setting it up is the first step in the developer docs.