{"size": 654, "ext": "js", "max_stars_repo_path": "scripts/http-requests.js", "max_stars_repo_name": "Dilshat/telegram-bot", "max_stars_repo_stars_event_min_datetime": "2020-06-05T05:09:22.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-19T04:39:01.000Z", "max_issues_repo_path": "scripts/http-requests.js", "max_issues_repo_name": "Dilshat/telegram-bot", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scripts/http-requests.js", "max_forks_repo_name": "Dilshat/telegram-bot", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.3571428571, "max_line_length": 108, "alphanum_fraction": 0.6483180428}

bot = {
  onMessage: function (message) {
    process(message, null)
  },
  onCallback: function (callback) {
    process(callback.message, callback)
  },
  onTimer: function () {
  },
  onInit: function () {
  }
}

function process(message) {

  var resp1 = doGet("https://jsonplaceholder.typicode.com/comments", { postId: "1" })
  resp1Json = JSON.parse(resp1)
  console.log(resp1Json[0].email)
  send("Hi " + resp1Json[0].name)


  var resp2 = doPost("https://jsonplaceholder.typicode.com/posts", { title: 'foo', body: 'bar', userId: 1 })
  var resp2Json = JSON.parse(resp2)
  console.log(resp2)
  send("Post with id " + resp2Json.id + " created")

}