Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Mar 30, 2015
  1. @alangpierce

    Fix OAuth signing with repeated parameters in the sample client

    alangpierce authored
    I just deployed a fix to the server signing implementation, so the sample client
    needs to be fixed as well.
    
    Test Plan:
    Log in with the test client.
    Run this request:
    /api/v1/user/exercises?username=alangpierce&exercises=addition_1&exercises=multiplication_1&format=pretty
    The request succeeds, and the response contains two elements.
    
    Auditors: benkomalo
Commits on Mar 27, 2015
  1. @alangpierce

    Merge pull request #86 from jb-1980/master

    alangpierce authored
    Allow multiple values per parameter
Commits on Mar 4, 2015
  1. @jb-1980
  2. @jb-1980
Commits on Feb 4, 2015
  1. @alangpierce
  2. @alangpierce

    Add a sample PHP client

    alangpierce authored
    This uses the oauth-php library to go through a browser-based authentication
    flow. I also included the oauth-php library directly as a dependency.
    
    Test Plan:
    Visit localhost:8001/ka_client.php, click the login button, log in, it redirects
    to a page with a form for making a GET request. Run the default request and
    gives back my user data.
    
    Auditors: marcos
Commits on Aug 13, 2014
  1. @alangpierce

    Make the test client show the response body for HTTP errors

    alangpierce authored
    Summary:
    Previously, only the title of an error response (e.g. "Unauthorized" for 401)
    was displayed when there was an HTTP error. I'm introducing a new error and I
    want the message to be more visible, so this at least makes it visible in the
    example client.
    
    Test Plan:
    Register a consumer in dev_appserver.
    Run /api/v1/user/students. It fails with 401 because the consumer isn't
    anointed, and the response message is displayed in the client (previously, it
    just said "Unauthorized").
    
    Reviewers: alpert
    
    Reviewed By: alpert
    
    Subscribers: ben
    
    Differential Revision: http://phabricator.khanacademy.org/D12243
Commits on Aug 23, 2013
  1. @robert3005

    Update lint_blacklist to include node_modules. Remove js_version.py f…

    robert3005 authored
    …rom source control
    
    Summary: Cosmetic fix, but it was bothering me a lot
    
    Test Plan:
    js_version.py is ignored and node_modules is not linted
    on commit
    
    Reviewers: csilvers, alpert
    
    Reviewed By: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D3712
  2. @robert3005

    Fix for google app engine truncating too long headers

    robert3005 authored
    Summary:
    This is an ugly hack which is necessary due to google app engine design. It is not stated anywhere directly but google app engine trims headers which are more than 498 bytes long (this number might be wrong). I have managed to dig out an old issue that mentions this but it is nowhere in official documentation. Anyway this is consistent with the behaviour I have observed where X-Original-Headers gets removed from the response. If you have any other suggestions how this might be avoided I will be more than happy to implement them. Also if you want to file a bug report with google then you're more than welcome.
    
    Remove function included for testing
    
    Test Plan:
    headers are present in the api response.
    
    <see below>
    
    Reviewers: alpert, csilvers
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3098
Commits on Jul 19, 2013
  1. @robert3005

    Merge pull request #55 from bcipolli/fix_test_example

    robert3005 authored
    updating changed 3rd party package refs
  2. updating changed 3rd party package refs

    Ben Cipollini authored
Commits on Jul 17, 2013
  1. @robert3005

    Minification process for javascript

    robert3005 authored
    Summary: Add minification build. Only minified file gets uploaded to production. We cannot load jquery from CDN on shim based config. It's a limitation of require.js. This way we only get minified file and require.js on the server. I think I have not messed up deployment and everything works.
    
    Test Plan: deploy and see if it works (don't change default!)
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D3076
Commits on Jul 16, 2013
  1. @robert3005

    External libraries for new explorer

    robert3005 authored
    Summary: Because those had to go somewhere
    
    Reviewers: csilvers, alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3018
  2. @robert3005

    Config bits for appengine, require.js, requirements, etc.

    robert3005 authored
    Summary: Configuration files that bring everything together. I decide to use require.js to avoid lots of frustration from javascript poor dependency management. What is more it also allows asynchronous loading of dependencies in contrast to how browser would have done it. It's easy to replace it if necessary.
    
    Reviewers: csilvers, alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3016
  3. @robert3005

    React view to draw api call form

    robert3005 authored
    Summary: Draws api call form and handles submission and validation.
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3014
  4. @robert3005

    React view for a given endpoint

    robert3005 authored
    Summary: React view to represent one endpoint. Handles expanding.
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3013
  5. @robert3005

    Top documentation react view

    robert3005 authored
    Summary: Main documentation view and Loader that precedes it while loading
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3012
  6. @robert3005

    Root react views

    robert3005 authored
    Summary: Most top level react views that put everything together. There is also nice link hijacking handler that allows us to have normal links (without hash)
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3011
  7. @robert3005

    Router for api explorer - imitates anchor links without custom ids on…

    robert3005 authored
    … elements
    
    Summary: Router that handles link clicks. Due to the fact that React hijacks ids this is a bit of a hack.
    
    Test Plan: check that clicking on menu links actually moves you to a different place on a page
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3010
Commits on Jul 15, 2013
  1. @robert3005

    utility functions that don't belong to any particular class

    robert3005 authored
    Summary: Simple utility functions that are used by many views and don't belong to any particular model
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3009
  2. @robert3005

    Models and Backbone Helper of API Explorer

    robert3005 authored
    Summary: Rather simple backbone models with backbone mixin for react (taken from react examples).
    
    Test Plan: Creating PublicApi collection and populating it creates a Backbone representation of our api
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3008
  3. @robert3005

    Template and CSS styles for API Explorer

    robert3005 authored
    Summary: templates and css styles for api explorer. Most of the client side code is generated by javascript. Stylus is a superset of CSS so any valid css can be used in the stylesheet. I can replace it with raw css if that's desired, but the syntax is so much nicer.
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3007
  4. @robert3005

    Refactored backend code to work with requests and google app engine

    robert3005 authored
    Summary: Most of the program structure has been preserved. Mostly cases for handling different that GET requests have been added. Using requests makes code a lot less awkward.
    
    Reviewers: csilvers, alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3006
  5. @robert3005

    grunt based build system

    robert3005 authored
    Summary: First in the series of reviews of my new api explorer. Rest is coming up shortly. I have create task T1210 to keep reviews together. The first one introduces grunt based build system with npm packages to make it possible. npm install && grunt (having grunt-cli installed beforehand) should build the project and launch devappserver on 0.0.0.0:8080.
    
    Test Plan:
    grunt still produces expected result
    
    running "grunt deploy" builds and deploys the app
    
    Reviewers: alpert, joel
    
    Reviewed By: alpert
    
    CC: ben
    
    Maniphest Tasks: T1210
    
    Differential Revision: http://phabricator.khanacademy.org/D3005
Commits on Apr 8, 2013
  1. @spicyj

    Specify Python test client version in README

    spicyj authored
    Closes #49.
    
    Auditors: ben
Commits on Dec 9, 2012
  1. @nsfmc

    Correctly escape displayed json values and put response in window.API…

    nsfmc authored
    …_RESPONSE
    
    Summary: add window.API_RESPONSE variable which contains the preformated api response and some helpful tips on the homepage about it. The original rationale behind escaping the displayed json was that it's probably not so unfathomable that a person using the explorer would try to parse the #response_body variable, but it's actually not encoded correctly. In any way, to discourage that (and to encourage actually poking of the api) i'm exposing the response json in a variable which gets set after each call is made.
    
    Test Plan:
    $.parseJSON($("#response_body").text()) works.
    additionally, and more usefully, window.API_RESPONSE is available for perusing rather than mucking with #response_body.
    
    Reviewers: kamens
    
    Reviewed By: kamens
    
    Differential Revision: http://phabricator.khanacademy.org/D975
Commits on Aug 18, 2012
  1. @spicyj

    Escape URLs and parameters appropriately

    spicyj authored
    Reviewers: emily
    
    Reviewed By: emily
    
    Differential Revision: http://phabricator.khanacademy.org/D660
Commits on Jul 2, 2012
  1. @spicyj

    Add requirements.txt and fix ../lib directory

    spicyj authored
    Summary: ../lib should have been relative to the script file but was instead relative to the working directory when the script was run.
    
    Test Plan: mod_wsgi works now
    
    Reviewers: kamens
    
    Reviewed By: kamens
    
    Differential Revision: http://phabricator.khanacademy.org/D345
Commits on Feb 27, 2012
  1. @kamens

    Merge pull request #9 from spicyj/master

    kamens authored
    Automatic token/secret-grabbing from a callback
Commits on Feb 25, 2012
  1. @spicyj
Commits on Feb 21, 2012
  1. @kamens
  2. @savetheclocktower
  3. @savetheclocktower
  4. @kamens

    Merge pull request #6 from savetheclocktower/master

    kamens authored
    Flask app (with OAuth)
Commits on Feb 15, 2012
  1. @savetheclocktower

    Add a Flask app for running the API explorer. Runs all API requests t…

    savetheclocktower authored
    …hrough a local proxy. Supports OAuth authentication.
    
    To use, navigate to the `explorer` directory, rename `secrets.example.py` to `secrets.py`, add the necessary information to `secrets.py`, then run `python explorer.py`.
Something went wrong with that request. Please try again.