gist

Missing secret gists in GitHub's API

Missing secret gists in GitHub's API Question: According to the documentation, I can either send the request with authorization (token) in order to get all of my gists, or anonymously and I will get public popular gists. My Python code is: url = "https://api.github.com/gists" with Get( url, headers={"Accept": accept}, params={"since": since, "per_page": per_page, "page": page}, …

Total answers: 2

Python how to edit/update a GitHub gist?

Python how to edit/update a GitHub gist? Question: I am trying to update a already created json file in a gist from a python program. The problem is, I can’t figure out how to do it. I’ve found this api, which I’m pretty sure is related to what I’m trying to do. I once again …

Total answers: 2

Posting to a Gist with Github API

Posting to a Gist with Github API Question: I’ve been trying to write to a gist using Python urllib2 with the following: def _log_error(information, date=datetime.date.today(), current_time=time.strftime(“%H:%M:%S”)): log_string = “”” Info: {} Date: {} Time: {} “””.format(information, date, current_time) filename = “<file>” token = “<token>” access_url = “https://api.github.com/gists/{}”.format(filename) req = urllib2.Request(access_url) req.add_header(“Authorization”, “token {}”.format(token)) req.add_header(“Content-Type”, “application/json”) …

Total answers: 3