tiyd-ror-2016-06 / class-notes

The Fightin' Aardwolves
0 stars 0 forks source link

Close this #5

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.

maryhowell commented 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 )