Closed jamesdabbs closed 8 years ago
require 'httparty' require 'pry' require './token'
body = { state: "closed" }.to_json
HTTParty.patch( "https://api.github.com/repos/tiyd-ror-2016-06/class-notes/issues/5", headers: { "Authorization" => "token #{Token}", "User-Agent" => "microsoft wandows" }, body: body ) binding.pry
body2 = { body: File.read(FILE) }.to_json
HTTParty.post( "https://api.github.com/repos/tiyd-ror-2016-06/class-notes/issues/5/comments", headers: { "Authorization" => "token #{Token}", "User-Agent" => "microsoft wandows" }, body: body2 )
Write (and run) a ruby script that
You'll probably want to use
File.read __FILE__
for the script to read its own contents.