Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7006965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:32:42+00:00 2026-05-27T21:32:42+00:00

I am writing a simple widget that renders a canvas participation graph just like

  • 0

I am writing a simple widget that renders a canvas participation graph just like the one’s on github.

It uses the data at http://github.com/%5Buser%5D/%5Brepo%5D/graphs/participation

The widget works great and is basically done. The only problem I have is when I try to retrieve the json data from the above link via XHR (rather than just copying and pasting into the widget as I have been), I run into the same origin access control problem.

Is there any way I can access this information at all, either via XHR or some hidden github api feature?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:32:43+00:00Added an answer on May 27, 2026 at 9:32 pm

    I believe Github supports JSONP and CORS through its API. You could also setup a server-side proxy, through which XHR requests are made to a same-origin page which then does a server-side request to Github.


    To answer your question about the proxy, yes it’s very simple. I had actually done this exact thing about two years ago using Python and Tornado. I realize this isn’t PHP, but it reads close enough to english to give you the idea about how it works. This particular proxy was returning a raw gist.

    # /proxy/gist
    class GetGistHandler(BaseHandler):
        def get(self, id, filename):
            url = 'http://gist.github.com/raw/%s/%s' % (id, urllib.quote(filename))
            resp = urlfetch.fetch(url)
            self.finish(resp.content)
    

    It can then be consumed with something along the lines of

    $.ajax({
        url: '/proxy/gist',
        dataType: 'JSON',
        data: {
            id: $('#id').val(),
            filename: $('#filename').val()
        },
        success: function(json) {
            // ...
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an application using gtkmm. I wrote a simple widget class, that I
I am writing simple site that requires users and profiles to be handled. The
I'm writing a simple splash page for a client to hold a like box
I writing simple application that need to make some record of the incoming sound.
I'm writing a PyGTK/Twisted app that uses Matplotlib for graphing. It's easy enough to
I'm writing a Dashboard widget in Dashcode, and I'd like to add some sort
I'm writing simple command-line program in C++ (windows). One functionality of it is to
I am writing a simple HTML code which uses YUI autocomplete (to display suggestion
I'm writing simple text log Entries to an SQL-table like so: private SqlConnection sqlcon;
I'm writing simple transformation using XSLT 1.0 and getting strange result.. Looks like I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.