Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I recieve a list of a user's repositories?

Matthew Hawley December 15, 2013

I want to retrieve a list of a user's bitbucket repositories. I would like to do it similar to the way I did with to retrieve github repositories.

Or it can be different.

Here is the code I used for getting github repositories.

<script type="text/javascript">
    $(function() {
        $.ajax({
            type: "GET",
            url: "https://api.github.com/users/matthew2d/repos",
            dataType: "json",
            success: function(result) {
                for (i in result) {
                    $("#repo_list").append(
                    "<li><a href='" + result[i].html_url + "' target='_blank'>" +
                    result[i].name + "</a></li>"
                    );
                    console.log("i: " + i);
            }
                   console.log(result);
                    $("#repo_count").append(" " + result.length);
           
             
            }
        });
});
</script>

<li id="ourTab" class="profileContent">

    <div class="githubTitle">Repositories - <div id="repo_count" style="margin-left: 95px;margin-top: -19px;"></div></div>
   
    <div id="repos">
        <ul id="repo_list" ></ul>
    </div>
    <div id="repo_content">
   
    </div>
</li>

Thanks!

1 answer

0 votes
Matthew Hawley December 15, 2013

Does anyone know how to do this?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events