Skip to content

Instantly share code, notes, and snippets.

@vyahhi
vyahhi / gist:f2644e0297e6ca601d27956dacaad47e
Last active April 25, 2016 22:17
How to use Stepic API with OAuth, advanced edition
# Run with Python 3
import json
import requests
# 1. Get your keys at https://stepic.org/oauth2/applications/ (client type = confidential, authorization grant type = client credentials)
client_id = ...
client_secret = ...
# 2. Get a token
@vyahhi
vyahhi / gist:0c639c7a17c4fc828cc0
Last active February 18, 2017 19:34
How to use Stepic API with OAuth
# Run with Python 3
import json
import requests
# 1. Get your keys at https://stepic.org/oauth2/applications/ (client type = confidential, authorization grant type = client credentials)
client_id = ...
client_secret = ...
# 2. Get a token
##
## begin of Fullscreen + History API fix based on http://stackoverflow.com/a/21963459/92396
##
fixed_location = null
class Em.FixedHistoryLocation extends Em.HistoryLocation
implementation: 'history-fullscreen'
pathQueue = []