tiyd-ror-2016-06 / class-notes

The Fightin' Aardwolves
0 stars 0 forks source link

Close this #3

Closed jamesdabbs closed 8 years ago

jamesdabbs commented 8 years ago

Write (and run) a ruby script that

You'll probably want to use File.read __FILE__ for the script to read its own contents.

jsonjordan commented 8 years ago

require 'httparty' require 'pry' require './token'

body = { state: "closed" }.to_json

body2 = { body: File.read(FILE) }.to_json

close_3 = HTTParty.patch( "https://api.github.com/repos/tiyd-ror-2016-06/class-notes/issues/3", headers: { "Authorization" => "token #{Token}", "User-Agent" => "goggle cromagnus" }, body: body )

comment_3 = HTTParty.post( "https://api.github.com/repos/tiyd-ror-2016-06/class-notes/issues/3/comments", headers: { "Authorization" => "token #{Token}", "User-Agent" => "goggle cromagnus" }, body: body2 )

binding.pry